Original code:
BOOL CMainFrame: : PreCreateWindow (CREATESTRUCT& Cs)
{
if( ! CFrameWnd: : PreCreateWindow (cs))
return FALSE;
Cs. Style&=~ WS_BORDER;
Cs. Style&=~ WS_CAPTION;
//cs. Style&=~ WS_THICKFRAME;
Cs. DwExStyle & amp;=~ WS_EX_CLIENTEDGE;
//cs. DwExStyle&=~ WS_EX_WINDOWEDGE;
Cs. LpszClass=AfxRegisterWndClass (0);
Cs. Style & amp;=~ WS_MAXIMIZEBOX;
return TRUE;
}
Then I put cs. Style & amp;=~ WS_MAXIMIZEBOX; Commented out, but still not maximize box after running out,
To solve ah, give some advice or guess
CodePudding user response:
Cs. Style & amp;=~ WS_MAXIMIZEBOX;//cancel the maximize buttonCs. Style |=WS_MAXIMIZEBOX;//add the maximize button
CodePudding user response:
Cs. Style |=WS_MAXIMIZEBOX; I also tried, it won't work,Another problem is: this PreCreateWindow (cs) function and not to the cs. Style assignment, that I will have a little look not to understand,
CodePudding user response:
There is not to maximize box shows likely related to software skin?CodePudding user response:
Cs. Style |=(LONG) WS_MAXIMIZEBOX;CodePudding user response:
BOOL CMainFrame: : PreCreateWindow (CREATESTRUCT& Cs)
{
Cs. Style |=(WS_MAXIMIZE | WS_MAXIMIZEBOX);//add in the previous
if( ! CFrameWnd: : PreCreateWindow (cs))
return FALSE;
//TODO: Modify the Window class or styles here by modifying the
//the CREATESTRUCT cs
return TRUE;
}
CodePudding user response:
Cs. Style&=~ WS_CAPTION;You remove the title bar is the ~
CodePudding user response:
Yes, why is the skin file, modify the skin file is ok