Print Page | Close Window

Flat MDIClient edges

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=160
Printed Date: 06 May 2024 at 11:37pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Flat MDIClient edges
Posted By: Lenz
Subject: Flat MDIClient edges
Date Posted: 11 September 2003 at 10:01am

I'm using the XTreme Suite. Does anyone know how to create a MDI application so that the client edges are flat? Ive included an image of the area.



-------------
Lenz



Replies:
Posted By: Sven
Date Posted: 11 September 2003 at 2:46pm
The link to your image is invalid.


Posted By: kstowell
Date Posted: 02 November 2003 at 11:01am

Hello,

Override the WindowProc virtual function for your view and add the following code:

LRESULT CSampleView::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
    switch (message)
   
{
   
case WM_NCPAINT:
       
{
          
CWindowDC dc(this);

          
CRect rc;
          
GetWindowRect(&rc);

          
int cx = rc.Width();
          
int cy = rc.Height();

          
const COLORREF clrFrame = GetXtremeColor(XPCOLOR_3DSHADOW);
          
dc.Draw3dRect(0, 0, cx, cy, clrFrame, clrFrame);

           return TRUE;
       
}

        case WM_NCCALCSIZE:
       
{
            
NCCALCSIZE_PARAMS FAR* lpncsp = (NCCALCSIZE_PARAMS FAR*)lParam;

           // adjust non-client area for border space
          
lpncsp->rgrc[0].left += 1;
          
lpncsp->rgrc[0].top += 1;
          
lpncsp->rgrc[0].right -= 1;
          
lpncsp->rgrc[0].bottom -= 1;

          
return TRUE;
       
}
    
}

    return CView::WindowProc(message, wParam, lParam);
}

Let me know if this helps.

Cheers,
Codejock Support




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net