Yes, the API is all the same. I do not understand hooks... but I would like to. The Send() command uses old code I got off someone based on keybd_event(). Type() is only in the newest version SbV3-P2 and it uses a function I wrote from scratch with all VK_Keys based on SendInput. Your embed commands are the same as mine (for non-ES_EX_LAYERED), but you forgot SetParent() to make it a part of your own window (needed for cropping and dynamic re-sizing). I still need to work on making Layered windows better (for transparency/background-removal).
...so how could this cause such behavior? I don't even do anything on the Close() command other than free the item from my array:
It is also very strange how the exit button does not work the second time. I don't have any idea what is going on. Maybe the program explicitly checks to make sure its child-window was closed (not stolen by SKINbedder's SetParent() command) and behaves badly if it wasn't.
else if (copy(CurrCommand, 1, 6) = 'CLOSE(') then
CurrCommand := copy(CurrCommand, 7, length(CurrCommand) - 7);
Index2 := 0;
while Index2 < length(WindowArray) do
if WindowArray[Index2].Name = CurrCommand then
if (WindowArray[Index2].CloseCommand = '') then
if (Index2 = length(WindowArray) - 1) then
SetLength(WindowArray, length(WindowArray) - 1) ;
System.Move(WindowArray[Index2 + 1], WindowArray[Index2],(Length(WindowArray) - Index2 - 1) * SizeOf(string) + 1) ;
SetLength(WindowArray, Length(WindowArray) - 1) ;
Index2 := length(WindowArray) + 1; //Skip to end
Index2 := Index2 + 1;
...Speaking of layered windows, maybe it would work if you have the window embedded with semi-transparency (because a layered windows parent is automatically the desktop, and trying to use SetParent will cause a crash). If you set it to 254 transparency or remove a color that doesn't exist (or just remove the background color), then it might work differently.