Click here to Skip to main content
15,898,010 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Question about list Box Pin
zizzzz30-Oct-06 2:16
zizzzz30-Oct-06 2:16 
AnswerRe: Question about list Box Pin
David Crow30-Oct-06 3:18
David Crow30-Oct-06 3:18 
GeneralRe: Question about list Box Pin
zizzzz30-Oct-06 3:23
zizzzz30-Oct-06 3:23 
QuestionHow to get the resources of parallel port on the system Pin
mt_samiei30-Oct-06 0:36
mt_samiei30-Oct-06 0:36 
QuestionMultiDocTemplate Pin
keyurbhatnagar30-Oct-06 0:16
keyurbhatnagar30-Oct-06 0:16 
AnswerRe: MultiDocTemplate Pin
Mark Salsbery30-Oct-06 5:31
Mark Salsbery30-Oct-06 5:31 
GeneralRe: MultiDocTemplate Pin
keyurbhatnagar30-Oct-06 17:46
keyurbhatnagar30-Oct-06 17:46 
GeneralRe: MultiDocTemplate Pin
Mark Salsbery30-Oct-06 18:26
Mark Salsbery30-Oct-06 18:26 
I'm assuming you are using Doc/View MDI.
The first created MDI child window has id == AFX_IDM_FIRST_MDICHILD, second is
AFX_IDM_FIRST_MDICHILD+1, etc.

So, with only 3 child frames...
ON_COMMAND(ID_MYBUTTON1, OnButton1)
ON_COMMAND(ID_MYBUTTON2, OnButton2)
ON_COMMAND(ID_MYBUTTON3, OnButton3)
...
void CMainFrame::OnButton1() 
{
	CWnd *pWnd = GetDescendantWindow(AFX_IDM_FIRST_MDICHILD);
	if (pWnd)
		MDIActivate(pWnd);
}
void CMainFrame::OnButton2() 
{
	CWnd *pWnd = GetDescendantWindow(AFX_IDM_FIRST_MDICHILD + 1);
	if (pWnd)
		MDIActivate(pWnd);
}
void CMainFrame::OnButton3() 
{
	CWnd *pWnd = GetDescendantWindow(AFX_IDM_FIRST_MDICHILD + 2);
	if (pWnd)
		MDIActivate(pWnd);
}

GeneralRe: MultiDocTemplate Pin
keyurbhatnagar30-Oct-06 19:09
keyurbhatnagar30-Oct-06 19:09 
QuestionEdit Pin
Sunil P V30-Oct-06 0:07
Sunil P V30-Oct-06 0:07 
AnswerRe: Edit Pin
uday kiran janaswamy30-Oct-06 1:19
uday kiran janaswamy30-Oct-06 1:19 
GeneralRe: Edit Pin
Sunil P V30-Oct-06 2:01
Sunil P V30-Oct-06 2:01 
AnswerRe: Edit Pin
James R. Twine30-Oct-06 5:19
James R. Twine30-Oct-06 5:19 
GeneralRe: Edit Pin
Sunil P V30-Oct-06 17:44
Sunil P V30-Oct-06 17:44 
QuestionInvalidating a rect Pin
RadPC29-Oct-06 23:55
RadPC29-Oct-06 23:55 
AnswerRe: Invalidating a rect Pin
Hamid_RT29-Oct-06 23:59
Hamid_RT29-Oct-06 23:59 
GeneralRe: Invalidating a rect Pin
RadPC30-Oct-06 0:14
RadPC30-Oct-06 0:14 
AnswerRe: Invalidating a rect Pin
Blake Miller30-Oct-06 4:02
Blake Miller30-Oct-06 4:02 
QuestionGet HBITMAP from JPEG/JPG Pin
QuickDeveloper29-Oct-06 23:25
QuickDeveloper29-Oct-06 23:25 
AnswerRe: Get HBITMAP from JPEG/JPG Pin
Hamid_RT29-Oct-06 23:56
Hamid_RT29-Oct-06 23:56 
Questionhow to access a COM component from ASP.net? Pin
voorugonda prashanth29-Oct-06 23:08
voorugonda prashanth29-Oct-06 23:08 
Questionsyntax in using for_each() on lists. Pin
minkowski29-Oct-06 22:46
minkowski29-Oct-06 22:46 
AnswerRe: syntax in using for_each() on lists. Pin
Niklas L29-Oct-06 23:02
Niklas L29-Oct-06 23:02 
QuestionGDI handles Pin
Waldermort29-Oct-06 22:24
Waldermort29-Oct-06 22:24 
AnswerRe: GDI handles Pin
Mark Salsbery30-Oct-06 5:37
Mark Salsbery30-Oct-06 5:37 

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.