Click here to Skip to main content
15,913,854 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: OpenFile dialog with source sontrol Pin
markshte14-Dec-05 23:57
markshte14-Dec-05 23:57 
GeneralRe: OpenFile dialog with source sontrol Pin
markshte14-Dec-05 23:47
markshte14-Dec-05 23:47 
QuestionHow to get virtual memory usage Pin
sachin.kumar14-Dec-05 22:37
sachin.kumar14-Dec-05 22:37 
AnswerRe: How to get virtual memory usage Pin
ThatsAlok14-Dec-05 22:48
ThatsAlok14-Dec-05 22:48 
GeneralRe: How to get virtual memory usage Pin
sachin.kumar14-Dec-05 23:17
sachin.kumar14-Dec-05 23:17 
QuestionDirect x using c++ Pin
marihan14-Dec-05 22:33
marihan14-Dec-05 22:33 
QuestionMDI child area with and without 3D border Pin
icklePhil14-Dec-05 22:23
icklePhil14-Dec-05 22:23 
AnswerRe: MDI child area with and without 3D border Pin
icklePhil22-Dec-05 4:00
icklePhil22-Dec-05 4:00 
Finally I solved the problem myself:
I needed to override the WndProc function of the child form and catch the WM_SYSCOMMAND message there. WM_SYSCOMMAND has in its wParam value one of the values SC_MAXIMIZE, SC_RESTORE, SC_MINIMIZE, or others. With this I can fire my own maximizing/minimizing/restoring events! These don't interfer with the child form switching.
Sample code:
// Override WndProc function to trap minimize, restore and maximize buttons
void WndProc(Message* m)
{
	if (m->Msg == WM_SYSCOMMAND) {
		switch (m->WParam.ToInt32()) {
			case SC_MAXIMIZE:
				ConnectionFormMaximizeEvent(this, new System::EventArgs());
				break;
			case SC_RESTORE:
				ConnectionFormRestoreEvent(this, new System::EventArgs());
				break;
			case SC_MINIMIZE:
				ConnectionFormMinimizeEvent(this, new System::EventArgs());
				break;
		}
	}
	else if (m->Msg == WM_NCLBUTTONDBLCLK) {
		ConnectionFormMaximizeEvent(this, new System::EventArgs());
	}
	__super::WndProc(m);
}

Note:
You will need some header file(s) from Win api that define(s) the WM_... and SC_... constants.
But I don't remember which one right now.

Bye, icklePhil
QuestionHow to get the browsername? Pin
Shailesh Ha14-Dec-05 22:17
Shailesh Ha14-Dec-05 22:17 
AnswerRe: How to get the browsername? Pin
David Crow15-Dec-05 2:31
David Crow15-Dec-05 2:31 
QuestionStupit Syntax Error Pin
Ametal14-Dec-05 22:06
Ametal14-Dec-05 22:06 
AnswerRe: Stupit Syntax Error Pin
toxcct14-Dec-05 22:17
toxcct14-Dec-05 22:17 
GeneralRe: Stupit Syntax Error Pin
Ametal14-Dec-05 22:25
Ametal14-Dec-05 22:25 
AnswerRe: Stupit Syntax Error Pin
8ki14-Dec-05 22:29
8ki14-Dec-05 22:29 
GeneralRe: Stupit Syntax Error Pin
Ametal14-Dec-05 22:35
Ametal14-Dec-05 22:35 
GeneralRe: Stupit Syntax Error Pin
toxcct14-Dec-05 23:03
toxcct14-Dec-05 23:03 
AnswerRe: Stupit Syntax Error Pin
kakan14-Dec-05 22:37
professionalkakan14-Dec-05 22:37 
GeneralRe: Stupit Syntax Error Pin
Ametal14-Dec-05 22:39
Ametal14-Dec-05 22:39 
GeneralRe: Stupit Syntax Error Pin
kakan14-Dec-05 22:44
professionalkakan14-Dec-05 22:44 
GeneralRe: Stupit Syntax Error Pin
Ametal14-Dec-05 22:45
Ametal14-Dec-05 22:45 
GeneralRe: Stupit Syntax Error Pin
kakan14-Dec-05 22:47
professionalkakan14-Dec-05 22:47 
AnswerRe: Stupit Syntax Error Pin
khan++14-Dec-05 23:11
khan++14-Dec-05 23:11 
GeneralRe: Stupit Syntax Error Pin
Ametal14-Dec-05 23:14
Ametal14-Dec-05 23:14 
QuestionRe: Stupit Syntax Error Pin
David Crow15-Dec-05 2:33
David Crow15-Dec-05 2:33 
QuestionHow to change the name of my application Pin
mikobi14-Dec-05 21:47
mikobi14-Dec-05 21:47 

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.