Archived

This topic is now archived and is closed to further replies.

Steve-B

Is the RegisterClassEx Function Redundant???

Recommended Posts

Steve-B    150
I''m learning C++ and Windows programming from a huge book called Jamsa''s C/C++ Programmer''s Bible. It''s a really good book. Has anyone here heard of it? Anyway on Tip 1282 it talks about the RegisterClassEx API function. It says the only difference between that and the normal RegisterClass function is that it allows Windows to place a small icon in the top corner of your programs title bar. I''m using the standard RegisterClass function and I am able to add my own custom icon to the corner of my title bar anyway. Is RegisterClassEx not used anymore or something??? The only addition to the WNDCLASS structure in the WNDCLASSEX structure is the HICON handle and hIconSM member.

Share this post


Link to post
Share on other sites
ChaoticCanuck    358
The RegisterClassEx function allows you to set two icons for the applicaiton; one normal sized icon (such that will be used when you ALT+TAB), and a small icon to be used in the top left corner of the window.

RegisterClass is the old version of RegisterClassEx

Share this post


Link to post
Share on other sites
Steve-B    150
I use the RegisterClass function which can also perform these icon tasks. Why should I use RegisterClassEx??

Oh hang on. When you say "set two icons" do you mean two completely different icons?? That probably explains it. Although I can't really see the point in having two different icons. Seems a bit pointless to me.

[edited by - Steve-B on August 9, 2003 2:12:40 PM]

[edited by - Steve-B on August 9, 2003 2:13:11 PM]

Share this post


Link to post
Share on other sites
Naku    151
Yes, you can set 2 different icons. Useful if the large one you use doesn''t look very good small or you want to resize it manually to get it better quality.

Share this post


Link to post
Share on other sites
Burning_Ice    122
i don't quite understand your logic... if registerclassex is the successor of registerclass and can do more (even if it's just the icons) i'd rather call the old registerclass obsolete and use the new one




[edited by - Burning_Ice on August 9, 2003 2:52:29 PM]

Share this post


Link to post
Share on other sites