Solved

How to disable the  resize of SDI application

Posted on 1998-12-17
2
425 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
How to calculate times for developing software? 8 60
sumNumber challenge 16 99
haveThree challenge 22 100
Fibonacci challenge 11 82
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

705 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

19 Experts available now in Live!

Get 1:1 Help Now