PDA

View Full Version : Windows API programming - where did the style go


DELOCH
04-07-2008, 04:34 AM
I have recently been trying to learn Windows API, I created a few programs and some things still confuse me.


One of them is the fact when I call:
MessageBox(hWnd, "Hello World", "Hello World", MB_OK | MB_ICONEXCLAMATION);

the buttons seem ... well have a weird style(as in not XP nor 98... prolly not even 95).

How do i make it so all the controls i put onto the window/messagebox have a style of the operating system(vista shiny buttons/xp silver buttons...)

Thanks

oracleguy
04-07-2008, 06:53 AM
You need to compile to use a specific version of the common controls and turn them on in your WinMain. I have a link: http://www.mathies.com/weblog/?p=225

But if you aren't using Visual Studio, you are going to have to do some more specific reading on how to do the same thing with the manifest.