Question

I've created an MFC html dialog based application the dialog inherits from CDHtmlDialog, all buttons on the html has classic style not the visual style, why is that?? how can i change this behaviour??? the visual style is enabled on other dialogs, In the same project when I displayed a normal dialog that inherits from CDialog it's button displayed visual style.

why is that??

Was it helpful?

Solution

I've found the answer in this article http://www.webdbtips.com/89962/

add this tag to html page

<META HTTP-EQUIV="MSThemeCompatible" CONTENT="Yes">   

or add the following line to the body of the class that inherits from CDHtmlDialog

STDMETHOD(GetHostInfo)(DOCHOSTUIINFO *pInfo){pInfo->dwFlags |= DOCHOSTUIFLAG_THEME; return S_OK;};

that enabled the visual style for me

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top