Solved

Changing the size of a CMDIFrameWnd's border

Posted on 1997-03-01
1
358 Views
Last Modified: 2013-11-20
Is it possible to change the size of a CMDIFrameWnd's border?  I have an MDI app and I want to paint some controls in along the left side (vertically) of the frame window.  Thus moving it's client area over to the right more.  

I only want to change the left side of the border, the other side can stay the same.


0
Comment
Question by:tdietz
1 Comment
 
LVL 1

Accepted Solution

by:
serge010697 earned 25 total points
ID: 1300212
You may try something like that:

void CMainFrame::OnNcCalcSize(BOOL bCalcValidRects, NCCALCSIZE_PARAMS FAR* lpncsp)
{
CMDIFrameWnd::OnNcCalcSize(bCalcValidRects, lpncsp);
if (bCalcValidRects)
          lpncsp->rgrc[0].left += 32;
}

Also you have to rewrite OnNcPaint:

void CMainFrame::OnNcPaint()
{
Default();
...Draw your stuff here
}
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
bobThere java chalenge 45 91
Excel Use VBA to get user's Mac Address for their computer 5 115
sumHeights  challenge 17 66
Annoying "thing" blocks my view 4 83
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now