Click here to Skip to main content
15,891,136 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionDisabling Restore button of a window Pin
Deepu Antony27-Oct-09 20:06
Deepu Antony27-Oct-09 20:06 
AnswerRe: Disabling Restore button of a window Pin
Randor 27-Oct-09 20:27
professional Randor 27-Oct-09 20:27 
GeneralDisabling Restore option(Minimize,Maximize ,Close) of a window Pin
Deepu Antony27-Oct-09 20:43
Deepu Antony27-Oct-09 20:43 
GeneralRe: Disabling Restore option(Minimize,Maximize ,Close) of a window Pin
Randor 27-Oct-09 21:53
professional Randor 27-Oct-09 21:53 
GeneralRe: Disabling Restore option(Minimize,Maximize ,Close) of a window Pin
Deepu Antony27-Oct-09 23:43
Deepu Antony27-Oct-09 23:43 
GeneralRe: Disabling Restore option(Minimize,Maximize ,Close) of a window Pin
Randor 28-Oct-09 6:18
professional Randor 28-Oct-09 6:18 
GeneralRe: Disabling Restore option(Minimize,Maximize ,Close) of a window Pin
Deepu Antony28-Oct-09 20:42
Deepu Antony28-Oct-09 20:42 
GeneralRe: Disabling Restore option(Minimize,Maximize ,Close) of a window Pin
Randor 28-Oct-09 22:04
professional Randor 28-Oct-09 22:04 
Deepu Antony wrote:
Is there any solution.


First lets try to get into the same code. If you have Visual Studio 2008 and have installed the samples navigate to the following folder:

Microsoft Visual Studio 9.0\Samples\1033\AllVCLanguageSamples\C++\MFC\advanced\mtmdi

Open this project and find the Bounce.cpp file. In the OnCreate function add:

CWnd *pParent = GetParent();
CMenu* pMenu = pParent->GetSystemMenu(FALSE); 
if (NULL != pMenu)
{
	pParent->ModifyStyle(WS_CAPTION|WS_MAXIMIZEBOX ,0,0);
	pParent->ModifyStyle(WS_THICKFRAME, 0, 0);
	pParent->ModifyStyle(0,WS_CAPTION,SWP_FRAMECHANGED);
}


And in the PreCreateWindow function add:

cs.style &= ~WS_THICKFRAME;


This should cause the MDI window to be non-resizable and the Maximize/Restore grayed out. If you have another version of Visual Studio let me know and we can change samples.

Best Wishes,
-David Delaune
QuestionDrawing in DC(device context) c++,MFC Pin
tibbasultanpur27-Oct-09 19:41
tibbasultanpur27-Oct-09 19:41 
AnswerRe: Drawing in DC(device context) c++,MFC Pin
Naveen27-Oct-09 19:54
Naveen27-Oct-09 19:54 
QuestionMaximum number to split any file. Pin
Le@rner27-Oct-09 19:35
Le@rner27-Oct-09 19:35 
AnswerRe: Maximum number to split any file. Pin
Randor 27-Oct-09 20:30
professional Randor 27-Oct-09 20:30 
GeneralRe: Maximum number to split any file. Pin
Le@rner27-Oct-09 20:36
Le@rner27-Oct-09 20:36 
QuestionRe: Maximum number to split any file. Pin
Adam Roderick J27-Oct-09 20:44
Adam Roderick J27-Oct-09 20:44 
AnswerRe: Maximum number to split any file. Pin
Le@rner27-Oct-09 20:50
Le@rner27-Oct-09 20:50 
GeneralRe: Maximum number to split any file. Pin
Adam Roderick J27-Oct-09 20:57
Adam Roderick J27-Oct-09 20:57 
GeneralRe: Maximum number to split any file. Pin
pallaka27-Oct-09 21:01
pallaka27-Oct-09 21:01 
GeneralRe: Maximum number to split any file. Pin
Richard MacCutchan27-Oct-09 22:21
mveRichard MacCutchan27-Oct-09 22:21 
GeneralRe: Maximum number to split any file. Pin
Michael Schubert27-Oct-09 22:40
Michael Schubert27-Oct-09 22:40 
GeneralRe: Maximum number to split any file. Pin
Le@rner27-Oct-09 23:04
Le@rner27-Oct-09 23:04 
GeneralRe: Maximum number to split any file. Pin
Richard MacCutchan27-Oct-09 23:27
mveRichard MacCutchan27-Oct-09 23:27 
GeneralRe: Maximum number to split any file. Pin
Adam Roderick J27-Oct-09 23:40
Adam Roderick J27-Oct-09 23:40 
GeneralRe: Maximum number to split any file. Pin
Michael Schubert27-Oct-09 23:48
Michael Schubert27-Oct-09 23:48 
GeneralRe: Maximum number to split any file. Pin
Adam Roderick J28-Oct-09 0:34
Adam Roderick J28-Oct-09 0:34 
GeneralRe: Maximum number to split any file. Pin
Michael Schubert27-Oct-09 23:44
Michael Schubert27-Oct-09 23:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.