Home > Back-end >  BCG MDI mode under the child window close button how take out
BCG MDI mode under the child window close button how take out

Time:12-05

I made a MDI interface, BCG child window has three button at top right corner, maximize, minimize and close, now need a close button, or remove, minimize and maximize reserve, could you tell me what to do?

EnableMenuItem, DeleteMenu RemoveMenu methods are tried, can't click, but there will be color on the mouse and move, said I need to keep gray,

CodePudding user response:

I want to use the system button, remove the close button alone is not enough, can only remove the maximize and minimize button,
If must do so, you may consider to make without borders, form give us part for a title bar above, your picture (put) a close button,

CodePudding user response:

Myself drew a picture on the close button himself, covered the original button, also calculate implements functions,
But now after the child window to maximize, buttons or have questions, don't know in which function drew

Online has examined the child Windows of maximization and the parent window's title bar after overlap together,
Parent window and the child window Onpaint and OnNcPaint tried not line, I doubt is I draw good, after BCG again drew up a layer of skin covered,

CodePudding user response:

In the MFC controls with ON_WM_CTLCOLOR_REFLECT picture, or can,
 
HBRUSH CtlColor (CDC * pDC, UINT nCtlColor/* */)
{
CRect the rect,;
GetClientRect (& amp; The rect);
PDC - & gt; FillRect (& amp; The rect, & amp; CBrush (RGB (0, 255)));
Return (HBRUSH) GetStockObject (NULL_BRUSH);
}

Child window treatment can also be a similar way? Lz can have a try,
  • Related