Click here to Skip to main content
16,008,183 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: MFC tutorial on the web Pin
David Fleming9-May-01 23:40
David Fleming9-May-01 23:40 
GeneralRe: MFC tutorial on the web Pin
Richard Cheng10-May-01 8:26
Richard Cheng10-May-01 8:26 
Generaluninitialised pointer Pin
hearties9-May-01 21:48
hearties9-May-01 21:48 
GeneralRe: uninitialised pointer Pin
9-May-01 22:18
suss9-May-01 22:18 
GeneralARGH !!! Pin
Christian Graus9-May-01 23:43
protectorChristian Graus9-May-01 23:43 
GeneralRe: ARGH !!! Pin
10-May-01 1:09
suss10-May-01 1:09 
GeneralDirectShow, Source Needed Pin
Nick Young9-May-01 21:01
Nick Young9-May-01 21:01 
GeneralSwitch Applications programatically ?... Pin
Danoo9-May-01 20:58
Danoo9-May-01 20:58 
I writing an app which should bring itself to top upon a particular internal event. I managed to make it the toplevelwindow, but I found no way to make it have the input focus, neither the button in the taskbar to get selected.

This is my final code:
if (RNEWMESS)
{ 
	if (pMain->IsIconic())
		pMain->ShowWindow(SW_RESTORE);
	pMain->SetWindowPos(&CWnd::wndTop,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE); 
	pMain->SetWindowPos(&CWnd::wndTopMost,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);
	pMain->SendMessage(WM_ACTIVATEAPP,(WPARAM)TRUE,(LPARAM)this->m_nThreadID);
	pMain->SendMessage(WM_ACTIVATE,WA_ACTIVE);
        // the last 4 lines bring my window correctly to top
        // now i want to have the input focus
	pMain->ActivateFrame();
	pChild = (CPMCFrm*) pMain->GetActiveFrame();
	if (pChild)
	{
		pChild->ActivateFrame();
		pChild->SetFocus();
		pChild->SetActiveWindow();
		CView* pView = pChild->GetActiveView();
		if (pView) 
		{
			pView->SetActiveWindow();
			pView->SetFocus(); 
		}
	} 
}

Anybody has some suggestions? Confused | :confused:
GeneralRe: Switch Applications programatically ?... Pin
Tomasz Sowinski10-May-01 1:09
Tomasz Sowinski10-May-01 1:09 
GeneralRe: Switch Applications programatically ?... Pin
Danoo10-May-01 22:10
Danoo10-May-01 22:10 
GeneralRe: Switch Applications programatically ?... Pin
5-Jun-01 16:44
suss5-Jun-01 16:44 
GeneralOK im a dummy Pin
9-May-01 20:11
suss9-May-01 20:11 
QuestionHow to bring on top a popup dialog while its parent window is hidding? Pin
Do Quyet Tien9-May-01 19:34
Do Quyet Tien9-May-01 19:34 
AnswerRe: How to bring on top a popup dialog while its parent window is hidding? Pin
Christian Graus9-May-01 20:07
protectorChristian Graus9-May-01 20:07 
GeneralSorry, but it don't work Pin
Do Quyet Tien9-May-01 20:52
Do Quyet Tien9-May-01 20:52 
GeneralRe: Try to use MoveWindow! Pin
Masaaki Onishi10-May-01 4:01
Masaaki Onishi10-May-01 4:01 
AnswerRe: How to bring on top a popup dialog while its parent window is hidding? Pin
#realJSOP10-May-01 1:12
professional#realJSOP10-May-01 1:12 
GeneralDateTimePicker in Win32API Pin
QEugene9-May-01 19:15
QEugene9-May-01 19:15 
GeneralRe: DateTimePicker in Win32API Pin
Michael Dunn9-May-01 19:38
sitebuilderMichael Dunn9-May-01 19:38 
Generalappearance of the scroll bar in a List View control Pin
QEugene9-May-01 19:13
QEugene9-May-01 19:13 
GeneralBitmap in ListView control Pin
QEugene9-May-01 19:12
QEugene9-May-01 19:12 
GeneralRe: Bitmap in ListView control Pin
Tomasz Sowinski10-May-01 1:12
Tomasz Sowinski10-May-01 1:12 
QuestionHow to totally hide main frame window of SDI MFC application? Pin
Do Quyet Tien9-May-01 18:23
Do Quyet Tien9-May-01 18:23 
AnswerRe: How to totally hide main frame window of SDI MFC application? Pin
markkuk9-May-01 23:49
markkuk9-May-01 23:49 
GeneralCFileDialog with OFN_ALLOWMULTISELECT Pin
9-May-01 16:44
suss9-May-01 16: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.