Please help with window class..

May 4, 2020 at 12:05pm
What's the difference between these .... WNDCLASSW WNDSCLASSEX

I-m creating a new program C++ Code::Blocks ver. 17.12 WIN32 application

So.. I have created the main window an interface for my program, but I just break a bit and wander which is better to use of these two classes cause they have different suffixes W and Ex .. what are they stand for and which is better for use. Is some of these classes limited to do certain things, Please explain..
May 4, 2020 at 1:08pm
WNDCLASSEX requires 2 additional variables to be filled (cbSize and hIconSm) please refer to the documentation for more info
https://docs.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-wndclassw
https://docs.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-wndclassexa
May 4, 2020 at 1:26pm
The W and EX suffixes are entirely different.

W is indicating the structure is a WIDE CHAR (Unicode) version of the generic WNDCLASS structure. Specifically for the character encoding of the menu and winclass name strings.

WNDCLASSEX is a generic macro name that is replaced by WNDCLASSEXA or WNDCLASSEXW depending on whether Unicode/_Unicode is defined or not.

If you are using WNDCLASSW then you should consider using WNDCLASSEXW.
https://docs.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-wndclassexw

Code::Blocks ver. 17.12

There is a newer version available, 20.03. You might want to upgrade.
May 4, 2020 at 5:45pm
Yes indeed I am using the WNDCLASSW .. so i should continue coding without any problems ..
thank you both Fury and fewdiefie .. you guys are so kind .. :)
Topic archived. No new replies allowed.