Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I get back "handle of" created control via CreateWindowEx ?

Status
Not open for further replies.

vmars

Programmer
Jan 11, 2005
4
0
0
US
Greetings;
I am looking for a way to createWindowEx and to get the handle of the control just created. I do exactly what the specs say, but all I get back is a return code.
I have tried both these ways:
callfunc CreateWindowExA,
hwnd = CreateWindowExA(
but all i get back is a "0", telling me that all is well.
Pls, how can i do this.
Code in C+ or VB or HotBasic would be great!
Thanks...vmars
 
>all i get back is a "0", telling me that all is well.

Er, actually not. 0 means it failed.


 
Sorry, but strongm is right...
Return Value


If the function succeeds, the return value is a handle to the new window.

If the function fails, the return value is NULL. To get extended error information, call GetLastError.

This function typically fails for one of the following reasons:

an invalid parameter value
the system class was registered by a different module
The WH_CBT hook is installed and returns a failure code
if one of the controls in the dialog template is not registered, or its window window procedure fails WM_CREATE or WM_NCCREATE


A return value of null can equate to zero...



Good Luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top