When i test my dialog box in Visual Studio 2008 by CTRL+T shortcut, i can see the dialog box items with neat slick borders. But when i compile the project and launch it via the program itself, it looks "3d" style: every dialog box has shading like old Windows 98 style.
I want to use the slick 1 pixel borders that the testing mode shows. How do i enable/disable between these two styles?
Here is example of how those two styles look like, i want to use the upper one:
STEP1 add this code to your stdafx.h:
#ifdef _UNICODE
#if defined _M_IX86
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
#elif defined _M_X64
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
#else
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
#endif
#endif
STEP2 on method InitInstance():
BOOL Ctest_stylesApp::InitInstance()
{
INITCOMMONCONTROLSEX InitCtrls;
InitCtrls.dwSize = sizeof(InitCtrls);
InitCtrls.dwICC = ICC_WIN95_CLASSES;
InitCommonControlsEx(&InitCtrls);
}
I'm using Visual Studio 2010 and it works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With