Skip to main content
GameDev.net gamedev.net
🔒 Locked

win32 control styles

Started by flounder May 3, 2008 at 1:23 PM 2 replies 1.2k views
Original Post
flounder
flounder
I'm using CreateWindowEx to create the controls for a window, however, for both XP and vista, the buttons, fonts, edit boxes, etc all look like this: And I want them to look something like this: As an example of what I'm using to create the controls

CreateWindowEx(0,"STATIC","text2",WS_CHILD|WS_VISIBLE,10,35,50,16,appwindow,(HMENU)1000,appinstance,NULL);
CreateWindowEx(0,"EDIT","edit",WS_CHILD|ES_AUTOHSCROLL|WS_VISIBLE,65,10,300,16,appwindow,(HMENU)1001,appinstance,NULL);
CreateWindowEx(0,"BUTTON","cancel",WS_CHILD|WS_VISIBLE,10,60,50,18,appwindow,(HMENU)1002,appinstance,NULL);

Is there some flag I have to set somehow? I've come across some examples online of people using CreateWindowEx to create the window controls; some of them look like what I have now, others look like how I want it to, and I haven't been able to spot why.
ZeroSum
ZeroSum
One way is to use a manifest. This PDF should help. Thats for XP, I'm not sure if its the same for Vista.
Colin Jeanne
Colin Jeanne
It's the same for Vista.

Also, if you use a Dialog resource the default font should match the system's dialog font. In general, I tend to prefer using resources of CreateWindowEx().
flounder
flounder
@ZeroSum: yes, that does work for vista, although it doesn't change the font as Colin Jeanne said.

Thank you both! This problem had been bugging me for a while now.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.