its my first time im making a custom controls.
Im making the cc in a dll.
First a registers a global class named "STYLEBUTTON"

the class registers well and has its wndproc added

In the main program i load the library all ok, but when i create a window specifing "STYLEBUTTON"
there is no error return

but i put a breakpoint in WM_CREATE message of the wndproc of the cc and the breakpoint do not stop

the question is: why CreateWindowEx is not sending the message WM_CREATE to wndproc
and GetLastError do not return any error.

Please Help
Posted on 2004-03-21 15:29:11 by Ateneo
Be sure to specify CS_GLOBALCLASS in the class style definition or it will only be available to the DLL that created it.
Posted on 2004-03-21 15:40:36 by donkey
I have specified a global class and dont work, i dont know why.
Posted on 2004-03-21 19:00:23 by Ateneo
Well, without at least the code for your class definition what do you want me to say ? I can't very well help if you don't post the definition. Be sure that your class and window extra memory does not exceed 40 bytes, RegisterClassEx will fail on Win9x if it does.
Posted on 2004-03-21 19:42:30 by donkey
Dont get ungry EDonkey, i have fixed the problem. The problem was in the defnition of the callback function. I dont know why but the def. was the one that microsoft include in the msdn, but i changed it by the one that its in the example of creating class and windows.

i really dont know why it dont work with the "standard definitoin", but at last the problem fixed.

Regards :alright:
Posted on 2004-03-22 08:01:28 by Ateneo