Home > Software engineering >  Dialog title color problem
Dialog title color problem

Time:09-26

With DoModal created a Popup style dialog, VS2010, compiled under the window10,
Compiled after the color of the title bar is white, the diagram below:


Then the mouse click on the back of the desktop and then casually, title bar into a normal color, the diagram below:


Excuse me each great god to how to solve this problem? How to make it a start is normal color, does not need to click other places,

CodePudding user response:

That is not active? Give it a try or OnInitDialog SetForegroundWindow set DS_SETFOREGROUND attribute

CodePudding user response:

reference 1st floor zgl7903 response:
is not active? Try set DS_SETFOREGROUND properties or in OnInitDialog SetForegroundWindow

: : SetForegroundWindow (this - & gt; M_hWnd); I add it also was not used in OnInitDialog, add in OnNcPaint also doesn't work,

CodePudding user response:

Did you rewrite OnNcPaint?
Normal use dialog will not appear this kind of problem
  • Related