Click here to Skip to main content
15,882,598 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Migrating from Visual Studio 2005 to Visual Studio 2015 Still Tries to Link MFC 8 Pin
SP Chapman9-Jan-17 5:44
SP Chapman9-Jan-17 5:44 
GeneralRe: Migrating from Visual Studio 2005 to Visual Studio 2015 Still Tries to Link MFC 8 Pin
Stefan_Lang27-Jan-17 2:31
Stefan_Lang27-Jan-17 2:31 
GeneralRe: Migrating from Visual Studio 2005 to Visual Studio 2015 Still Tries to Link MFC 8 Pin
SP Chapman27-Jan-17 5:26
SP Chapman27-Jan-17 5:26 
QuestionWM_SHOWWINDOW not called Pin
_Flaviu29-Dec-16 9:56
_Flaviu29-Dec-16 9:56 
AnswerRe: WM_SHOWWINDOW not called Pin
Richard MacCutchan29-Dec-16 21:38
mveRichard MacCutchan29-Dec-16 21:38 
GeneralRe: WM_SHOWWINDOW not called Pin
_Flaviu29-Dec-16 21:58
_Flaviu29-Dec-16 21:58 
GeneralRe: WM_SHOWWINDOW not called Pin
leon de boer29-Dec-16 22:33
leon de boer29-Dec-16 22:33 
GeneralRe: WM_SHOWWINDOW not called Pin
_Flaviu29-Dec-16 23:36
_Flaviu29-Dec-16 23:36 
Kindly thank you for your information. Actually I want to setup the window placement which have been saved in CChildFrame::OnDestroy():
C++
void CChildFrame::OnDestroy() 
{
	CMDIChildWnd::OnDestroy();

	// TODO: Add your message handler code here

	WINDOWPLACEMENT wp;
	GetWindowPlacement(&wp);
	if(wp.showCmd == SW_SHOWMINIMIZED)
		wp.showCmd = SW_SHOWMAXIMIZED;
	AfxGetApp()->WriteProfileBinary(_T("Settings"), _T("WindowPlacementChild"), (LPBYTE)&wp, sizeof(wp));
}

and previously I setup the window placement on first CChildFrame::OnShowWindow call:
C++
void CChildFrame::OnShowWindow(BOOL bShow, UINT nStatus) 
{
	CMDIChildWnd::OnShowWindow(bShow, nStatus);

	// TODO: Add your message handler code here
	if(bShow && ! IsWindowVisible() && m_bOnce)
	{
		m_bOnce = FALSE;
		UINT nBytes = 0;
		WINDOWPLACEMENT* lwp;
		if(AfxGetApp()->GetProfileBinary(_T("Settings"), _T("WindowPlacementChild"), (LPBYTE*)&lwp, &nBytes))
			SetWindowPlacement(lwp);
		delete []lwp;
	}
}

but I discovered that this handler are not called when the previous child frame open are maximized ... where should be the proper place to set the child frame placement on opening ?

modified 30-Dec-16 6:32am.

GeneralRe: WM_SHOWWINDOW not called Pin
_Flaviu29-Dec-16 23:37
_Flaviu29-Dec-16 23:37 
GeneralRe: WM_SHOWWINDOW not called Pin
_Flaviu30-Dec-16 1:07
_Flaviu30-Dec-16 1:07 
GeneralRe: WM_SHOWWINDOW not called Pin
leon de boer30-Dec-16 3:15
leon de boer30-Dec-16 3:15 
GeneralRe: WM_SHOWWINDOW not called Pin
_Flaviu30-Dec-16 3:18
_Flaviu30-Dec-16 3:18 
GeneralRe: WM_SHOWWINDOW not called Pin
leon de boer30-Dec-16 3:38
leon de boer30-Dec-16 3:38 
GeneralRe: WM_SHOWWINDOW not called Pin
_Flaviu31-Dec-16 11:49
_Flaviu31-Dec-16 11:49 
GeneralRe: WM_SHOWWINDOW not called Pin
leon de boer5-Jan-17 22:05
leon de boer5-Jan-17 22:05 
GeneralRe: WM_SHOWWINDOW not called Pin
_Flaviu8-Jan-17 20:39
_Flaviu8-Jan-17 20:39 
Questionc++, how to make an array program one dimension from( 1 to 7 numbers)that the user insert these numbers in terminal that finally display sum,average,GPA,grade,min and max. please help me Pin
Alma2829-Dec-16 4:08
Alma2829-Dec-16 4:08 
AnswerRe: c++, how to make an array program one dimension from( 1 to 7 numbers)that the user insert these numbers in terminal that finally display sum,average,GPA,grade,min and max. please help me Pin
Midi_Mick29-Dec-16 4:20
professionalMidi_Mick29-Dec-16 4:20 
AnswerRe: c++, how to make an array program one dimension from( 1 to 7 numbers)that the user insert these numbers in terminal that finally display sum,average,GPA,grade,min and max. please help me Pin
Patrice T30-Dec-16 11:57
mvePatrice T30-Dec-16 11:57 
QuestionEmbedding Python in C++ Pin
VISWESWARAN199824-Dec-16 1:14
professionalVISWESWARAN199824-Dec-16 1:14 
AnswerRe: Embedding Python in C++ Pin
Afzaal Ahmad Zeeshan24-Dec-16 2:54
professionalAfzaal Ahmad Zeeshan24-Dec-16 2:54 
PraiseRe: Embedding Python in C++ Pin
VISWESWARAN199824-Dec-16 3:15
professionalVISWESWARAN199824-Dec-16 3:15 
GeneralClass and Object memory layout question Pin
samzcs21-Dec-16 4:24
samzcs21-Dec-16 4:24 
GeneralRe: Class and Object memory layout question Pin
Richard MacCutchan21-Dec-16 4:44
mveRichard MacCutchan21-Dec-16 4:44 
GeneralRe: Class and Object memory layout question Pin
samzcs21-Dec-16 5:37
samzcs21-Dec-16 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.