How to make Windows buttons look Legit

closed account (ozUkoG1T)
Hey,
I am working on a UAC program and the button look very bad and i want to make it look like a normal windows 7 buttons
BTW
I am using Windows 7 so how do it get it to look like that :
Code for the Button:
 
HWND_UAC_Alert = CreateWindow(_T("Button"),_T("Enter"),BS_PUSHBOX|WS_CHILD|WS_VISIBLE|WS_BORDER,0,20,50,20,hwnd,(HMENU)1001,NULL,NULL);
If you mean that your buttons look old fashion and square but you want the smootherand sexier looking buttons - this is called the 'XP look and fee' theme.

It involves something called a manifest -

Are you using MS Visual Studio??
UAC first makes a screenshot, then launches in a secure desktop. Are you want to replicate this behaviour programatically ?

If you want to just enable visual styles, read this:
http://msdn.microsoft.com/en-us/library/windows/desktop/bb773175%28v=vs.85%29.aspx
If you're using visual studio, you can add this to the top of one of your CPP files:

1
2
3
4
#pragma comment(linker,"/manifestdependency:\"type='win32' \
    name='Microsoft.Windows.Common-Controls' version='6.0.0.0' \
    processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' \
    language='*'\"") 

Last edited on
Topic archived. No new replies allowed.