?
Solved

How to disable the  resize of SDI application

Posted on 1998-12-17
2
Medium Priority
?
475 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Accepted Solution

by:
arunprakash earned 150 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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 …
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

741 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