Solved

Changing the size of a CMDIFrameWnd's border

Posted on 1997-03-01
1
354 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
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
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.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

744 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

12 Experts available now in Live!

Get 1:1 Help Now