Hello Guys,

i have problem in my project, i'm using WIN API when i make the CreatewindowEx like this:

Handle:= CreateWindowEx(WS_EX_TOOLWINDOW,'Classname','Title',WS_SYSMENU or WS_VISIBLE,0,0,80,80,0,0,Instancia,nil);

the socket dont work [IMG]http://www.devarchive.com/forum/images/smiles/icon_exclaim.gif[/IMG]

and if make it like this:
Handle:= CreateWindowEx(WS_EX_TOOLWINDOW,'Classname','Title',WS_SYSMENU or WS_VISIBLE,1,1,80,80,1,1,Instancia,nil);

the socket work and everything ok! so whats the problem with it?? i understood the socket work if the handle return null if it's not the socket dont work!! can i have help pls ... and sorry for my bad language [IMG]http://www.devarchive.com/forum/images/smiles/icon_sad.gif[/IMG]

Member Avatar for Micheus

Handle:= CreateWindowEx(WS_EX_TOOLWINDOW,'Classname','Title',WS_SYSMENU or WS_VISIBLE,0,0,80,80,0,0,Instancia,nil);

the socket dont work [IMG]http://www.devarchive.com/forum/images/smiles/icon_exclaim.gif[/IMG]

and if make it like this:
Handle:= CreateWindowEx(WS_EX_TOOLWINDOW,'Classname','Title',WS_SYSMENU or WS_VISIBLE,1,1,80,80,1,1,Instancia,nil);

the socket work and everything ok! so whats the problem with it??

Take a look on the help for details. But, the problem is probably the hWndParent value. In the first you passed 0 and at second 1. I think that You must pass the main window handle to this param. hMenu could be null (0). (See below)
Handle:= CreateWindowEx(WS_EX_TOOLWINDOW,'Classname','Title',WS_SYSMENU or WS_VISIBLE,0,0,80,80,hWndParent,hMenu,Instancia,nil);

p.s. sorry for my bad english.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.