Solved

How to disable the  resize of SDI application

Posted on 1998-12-17
2
436 Views
Last Modified: 2013-11-20
I want to disable the resize of a SDI application after creating it's window .  The develop environment is Visual C++ 4.1 under WIN95.
 
0
Comment
Question by:zqian103198
2 Comments
 
LVL 1

Accepted Solution

by:
arunprakash earned 50 total points
ID: 1326316
Hi here is what u need,
 Override the WM_SYSCOMMAND
 in that function
        if((nID == SC_MAXIMIZE) || (nID == SC_SIZE))
      return;
        CDialog::OnSysCommand(nID, lParam);

This will do.
thanx bye
0
 
LVL 4

Expert Comment

by:piano_boxer
ID: 1326317
To force the mainframe to a specific size, handle the message WM_GETMINMAXINFO. Modify ptMinTrackSize and ptMaxTrackSize in the MINMAXINFO struct passed to your message handler.

Ex: This will prevent the user from making the window smaller then 200 by 200:

void CMainFrame::OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI)
{
    lpMMI->ptMinTrackSize.x = 200;
    lpMMI->ptMinTrackSize.y = 200;
   
    // Pass to baseclass handler
    CMDIFrameWnd::OnGetMinMaxInfo(lpMMI);
}

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
How do you programatically show and hide the Windows 10 On-Screen-Keyboard? 3 538
countEvens challenge 2 78
sum67 challenge 35 93
x-bar in Google Sheets 2 27
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

867 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

24 Experts available now in Live!

Get 1:1 Help Now