Click here to Skip to main content
15,886,919 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: dll creation with Dialog Pin
Hamid_RT29-Sep-08 7:19
Hamid_RT29-Sep-08 7:19 
QuestionGetting Drives name Pin
VCProgrammer26-Sep-08 19:28
VCProgrammer26-Sep-08 19:28 
AnswerRe: Getting Drives name Pin
Mahesh Kulkarni26-Sep-08 20:11
Mahesh Kulkarni26-Sep-08 20:11 
AnswerRe: Getting Drives name Pin
Xeqtr27-Sep-08 0:43
Xeqtr27-Sep-08 0:43 
AnswerRe: Getting Drives name Pin
Hamid_RT29-Sep-08 7:18
Hamid_RT29-Sep-08 7:18 
QuestionCommand Line Error !! Pin
Le@rner26-Sep-08 18:23
Le@rner26-Sep-08 18:23 
AnswerRe: Command Line Error !! Pin
Mahesh Kulkarni26-Sep-08 19:47
Mahesh Kulkarni26-Sep-08 19:47 
QuestionMy unsolved "Restore window" question, help me plz! Pin
fantasy121526-Sep-08 17:41
fantasy121526-Sep-08 17:41 
When right click my tray icon, show the menu, And there is a menu item "Restore window".
When click this menu item, it should restore window.
My code implement "Restore window" below:

void CWinSearchDlg::OnTrayRestoreWnd()
{
	DestroyTray();
	ShowWindow(SW_SHOW);
<font color="blue">
	if (CWnd::GetActiveWindow() != this)
	{
		SetActiveWindow();
		AfxMessageBox(_T("SetActiveWindow"));
	}
	else
	{
		AfxMessageBox(_T("no SetActiveWindow"));  <font color="red">//it goes here</font>
	}
	BOOL bRet = FALSE;
	bRet = SetWindowPos(&wndTop, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);
	if (bRet)
		AfxMessageBox(_T("SetWindowPos true"));<font color="red">//it goes here</font>
	else
		AfxMessageBox(_T("SetWindowPos false"));
	
	bRet = FALSE;
	bRet = SetForegroundWindow();
	if (bRet)
		AfxMessageBox(_T("true SetForegroundWindow"));<font color="red">//it goes here</font>
	else
		AfxMessageBox(_T("false SetForegroundWindow"));
	
	bRet = FALSE;
	bRet = ::BringWindowToTop(this->GetSafeHwnd());
	if (bRet)
		AfxMessageBox(_T("BringWindowToTop true"));<font color="red">//it goes here</font>
	else
		AfxMessageBox(_T("BringWindowToTop false"));

</font>
}

I've tried the code in blue font, but when restore the window, It doesn't bring to the top.
Please give me a sign!
AnswerRe: My unsolved "Restore window" question, help me plz! Pin
Iain Clarke, Warrior Programmer27-Sep-08 11:30
Iain Clarke, Warrior Programmer27-Sep-08 11:30 
Questionsetup of vc++ Pin
anilaabc26-Sep-08 17:12
anilaabc26-Sep-08 17:12 
AnswerRe: setup of vc++ Pin
Cedric Moonen26-Sep-08 22:28
Cedric Moonen26-Sep-08 22:28 
Questionset label font size Pin
anilaabc26-Sep-08 17:11
anilaabc26-Sep-08 17:11 
Questionset fontsize of static text..... Pin
ani_ikram26-Sep-08 17:10
ani_ikram26-Sep-08 17:10 
AnswerRe: set fontsize of static text..... Pin
Le@rner26-Sep-08 18:37
Le@rner26-Sep-08 18:37 
AnswerRe: set fontsize of static text..... Pin
Dhiraj kumar Saini26-Sep-08 19:13
Dhiraj kumar Saini26-Sep-08 19:13 
AnswerRe: set fontsize of static text..... Pin
CPallini26-Sep-08 23:09
mveCPallini26-Sep-08 23:09 
QuestionHow can Explorer.exe start loading my YC.DLL. Pin
ChinaTJBoy26-Sep-08 16:43
ChinaTJBoy26-Sep-08 16:43 
QuestionICustomDoc failing Pin
Abhi Lahare26-Sep-08 13:17
Abhi Lahare26-Sep-08 13:17 
QuestionUnhidden files/folders inside Hidden folders... [modified] Pin
Peter Weyzen26-Sep-08 12:14
Peter Weyzen26-Sep-08 12:14 
QuestionWhich host do I send my request to? [modified] Pin
Joseph Marzbani26-Sep-08 8:24
Joseph Marzbani26-Sep-08 8:24 
AnswerRe: Which host do I send my request to? Pin
Mark Salsbery26-Sep-08 8:42
Mark Salsbery26-Sep-08 8:42 
GeneralRe: Which host do I send my request to? Pin
Joseph Marzbani26-Sep-08 8:52
Joseph Marzbani26-Sep-08 8:52 
GeneralRe: Which host do I send my request to? Pin
led mike26-Sep-08 10:23
led mike26-Sep-08 10:23 
GeneralRe: Which host do I send my request to? Pin
Mark Salsbery26-Sep-08 10:36
Mark Salsbery26-Sep-08 10:36 
AnswerRe: Which host do I send my request to? Pin
Iain Clarke, Warrior Programmer27-Sep-08 11:35
Iain Clarke, Warrior Programmer27-Sep-08 11:35 

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.