when i use the RegisterClass(&WndClass); under wine the call fails. I'm using it to sub class the button class. Does wine not support this?
Interdynamics Web Page : http://www.interdynamics.com
"Craig Chandler" craig.chandler@interdynamics.com wrote:
when i use the RegisterClass(&WndClass); under wine the call fails. I'm using it to sub class the button class. Does wine not support this?
As I already wrote in the newsgroup: please provide the source of your code. -- Dmitry.
WNDCLASS WndClass;
GetClassInfo(NULL, IF_BUTTON_NAME, &WndClass);
WndClass.lpszClassName = IF_BUTTON_NAME; WndClass.hInstance = hInstance; WndClass.hbrBackground = (HBRUSH)GetStockObject( LTGRAY_BRUSH );
WndClass.cbWndExtra = kIFWNDEXTRA;
IF_BUTTON_PROC = WndClass.lpfnWndProc; WndClass.lpfnWndProc = ButtonWndProcBridge;
return RegisterClass(&WndClass);
where IF_BUTTON_NAME = "button"
"Craig Chandler" craig.chandler@interdynamics.com wrote:
when i use the RegisterClass(&WndClass); under wine the call fails. I'm using it to sub class the button class. Does wine not support this?
As I already wrote in the newsgroup: please provide the source of your code. -- Dmitry.
"Craig Chandler" craig.chandler@interdynamics.com wrote:
WNDCLASS WndClass;
GetClassInfo(NULL, IF_BUTTON_NAME, &WndClass);
WndClass.lpszClassName = IF_BUTTON_NAME;
Use here different name for your own class. For instance "my_button"
WndClass.hInstance = hInstance; WndClass.hbrBackground = (HBRUSH)GetStockObject( LTGRAY_BRUSH );
WndClass.cbWndExtra = kIFWNDEXTRA;
IF_BUTTON_PROC = WndClass.lpfnWndProc; WndClass.lpfnWndProc = ButtonWndProcBridge;
return RegisterClass(&WndClass);
where IF_BUTTON_NAME = "button"
Are you sure that the code above works under Windows?
-- Dmitry.
positive on the code working under all forms of windows (95, 98, me, nt, 2k), has been since 1997
-----Original Message----- From: Dmitry Timoshkov [mailto:dmitry@baikal.ru] Sent: Friday, 10 August 2001 13:02 To: Craig Chandler Cc: wine-devel@winehq.com Subject: Re: Unable to use RegisterClass(&WndClass);
"Craig Chandler" craig.chandler@interdynamics.com wrote:
WNDCLASS WndClass;
GetClassInfo(NULL, IF_BUTTON_NAME, &WndClass);
WndClass.lpszClassName = IF_BUTTON_NAME;
Use here different name for your own class. For instance "my_button"
WndClass.hInstance = hInstance; WndClass.hbrBackground = (HBRUSH)GetStockObject( LTGRAY_BRUSH );
WndClass.cbWndExtra = kIFWNDEXTRA;
IF_BUTTON_PROC = WndClass.lpfnWndProc; WndClass.lpfnWndProc = ButtonWndProcBridge;
return RegisterClass(&WndClass);
where IF_BUTTON_NAME = "button"
Are you sure that the code above works under Windows?
-- Dmitry.
"Craig Chandler" craig.chandler@interdynamics.com wrote:
positive on the code working under all forms of windows (95, 98, me, nt, 2k), has been since 1997
That probably means that global/local atom management in Wine is broken.
As a temporary workaround you could use unique class names for local classes. -- Dmitry.
"Craig Chandler" craig.chandler@interdynamics.com wrote:
positive on the code working under all forms of windows (95, 98, me, nt, 2k), has been since 1997
Please try whether the attached patch fixes your problem. -- Dmitry.
Hello all.
According to MSDN all classes in Win32 are local.
My experiments under Win2000 show that user32 always turns off CS_GLOBALCLASS (actually even "system" classes doesn't have it set) and does fix hInstance to the module handle.
The attached patch tries to do the same in Wine.
Comments, suggestions? -- Dmitry.
Hello all.
According to MSDN all classes in Win32 are local.
My experiments under Win2000 show that user32 always turns off CS_GLOBALCLASS (actually even "system" classes doesn't have it set) and does fix hInstance to the module handle.
The attached patch tries to do the same in Wine.
Comments, suggestions?
Dmitry.
ok, played around with both patches, both refuse to start the application with errors in invalid class names. Changed my own source to rename the "button" class to my own custom name ("ifbutton") and it starts fine. (so the original class.c works). Had a whole lot of other errors but i'll get to them later. I'm reading up on how to debug wine at the moment (i'm a new user) so hopefully i'll get some more usefull info to you later.