CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 1 of 1
  1. #1
    Join Date
    Jan 2011
    Posts
    8

    Angry Visual Style Issues

    ok. I have read forum after forum doc after doc. Someone please just tell me why the visual styles wont enable.

    I am debugging in VC++ 2010 express.

    Things I have done:

    1: created a New2.exe.manifest file
    2: added the file in the project properties->Manifest Tools->Input and Output->Additional manifest files = New2.exe.manifest.
    3: added these lines in my resource.h file

    #define CREATEPROCESS_MANIFEST_RESOURCE_ID 1
    #define CONTROL_PANEL_RESOURCE_ID 123
    #define RT_MANIFEST 24


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

    4: added this bit of code to the { int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) } function

    added code:
    INITCOMMONCONTROLSEX InitCtrls;
    InitCtrls.dwSize = sizeof(InitCtrls);
    // Set this to include all the common control classes you want to use
    // in your application.
    InitCtrls.dwICC = ICC_WIN95_CLASSES;
    InitCommonControlsEx(&InitCtrls);


    I know that the program is reading the manifest file because if I change static parts (ie: version="6.0.0.0" to version="20.0.0.0") I get an error. Regardless of what I do, every time I debug the program the same win 95 styled controls come back. Oh, I can found that if I change the styles of the computer the program does follow that style, and I currently have the computer in that classic style.

    many thanks to the person who can point me in the right direction.
    Last edited by JPatchSPSU; August 11th, 2011 at 08:17 PM. Reason: typo

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured