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

C / C++ / MFC

 
GeneralRe: message BN_CLICKED for button in flexgrid Pin
zeus_master11-May-06 22:14
zeus_master11-May-06 22:14 
GeneralRe: message BN_CLICKED for button in flexgrid Pin
Cedric Moonen11-May-06 22:19
Cedric Moonen11-May-06 22:19 
GeneralRe: message BN_CLICKED for button in flexgrid Pin
zeus_master11-May-06 22:51
zeus_master11-May-06 22:51 
GeneralRe: message BN_CLICKED for button in flexgrid Pin
Cedric Moonen11-May-06 22:58
Cedric Moonen11-May-06 22:58 
GeneralRe: message BN_CLICKED for button in flexgrid Pin
zeus_master11-May-06 23:13
zeus_master11-May-06 23:13 
GeneralRe: message BN_CLICKED for button in flexgrid Pin
zeus_master11-May-06 23:43
zeus_master11-May-06 23:43 
QuestionCreate a child window Pin
v3r50r10-May-06 23:34
v3r50r10-May-06 23:34 
AnswerRe: Create a child window Pin
Russell'10-May-06 23:57
Russell'10-May-06 23:57 
v3r50r wrote:
My first post


WellcomeBig Grin | :-D


Open a new window could be a big problem if you have to initialize it, but if you want to understand how create a standard new window (in an MDI app) follow the sample code used in
CMDIFrameWnd::OnWindowNew() in winMDI.cpp
that create a copy of the current window.


void CMDIFrameWnd::OnWindowNew()<br />
{<br />
	CMDIChildWnd* pActiveChild = MDIGetActive();<br />
	CDocument* pDocument;<br />
	if (pActiveChild == NULL ||<br />
	  (pDocument = pActiveChild->GetActiveDocument()) == NULL)<br />
	{<br />
		TRACE(traceAppMsg, 0, "Warning: No active document for WindowNew command.\n");<br />
		AfxMessageBox(AFX_IDP_COMMAND_FAILURE);<br />
		return;     // command failed<br />
	}<br />
<br />
	// otherwise we have a new frame !<br />
	CDocTemplate* pTemplate = pDocument->GetDocTemplate();<br />
	ASSERT_VALID(pTemplate);<br />
	CFrameWnd* pFrame = pTemplate->CreateNewFrame(pDocument, pActiveChild);<br />
	if (pFrame == NULL)<br />
	{<br />
		TRACE(traceAppMsg, 0, "Warning: failed to create new frame.\n");<br />
		return;     // command failed<br />
	}<br />
<br />
	pTemplate->InitialUpdateFrame(pFrame, pDocument);<br />
}

GeneralRe: Create a child window Pin
v3r50r11-May-06 0:01
v3r50r11-May-06 0:01 
GeneralRe: Create a child window Pin
Cedric Moonen11-May-06 0:05
Cedric Moonen11-May-06 0:05 
GeneralRe: Create a child window Pin
v3r50r11-May-06 0:13
v3r50r11-May-06 0:13 
GeneralRe: Create a child window Pin
Cedric Moonen11-May-06 0:56
Cedric Moonen11-May-06 0:56 
GeneralRe: Create a child window Pin
Russell'11-May-06 0:05
Russell'11-May-06 0:05 
GeneralRe: Create a child window Pin
v3r50r11-May-06 0:07
v3r50r11-May-06 0:07 
GeneralRe: Create a child window Pin
Russell'11-May-06 0:17
Russell'11-May-06 0:17 
Questioncharset for the current language OS. Pin
Sandeep. Vaidya10-May-06 23:33
Sandeep. Vaidya10-May-06 23:33 
QuestionSerial Port interrupt Pin
aasstt10-May-06 22:55
aasstt10-May-06 22:55 
AnswerRe: Serial Port interrupt Pin
Cedric Moonen10-May-06 23:02
Cedric Moonen10-May-06 23:02 
GeneralRe: Serial Port interrupt Pin
Maxwell Chen10-May-06 23:34
Maxwell Chen10-May-06 23:34 
AnswerRe: Serial Port interrupt Pin
kakan11-May-06 0:37
professionalkakan11-May-06 0:37 
AnswerRe: Serial Port interrupt Pin
ThatsAlok11-May-06 19:52
ThatsAlok11-May-06 19:52 
AnswerRe: Update AllViews To a Doc from a Dialog Pin
Russell'10-May-06 23:03
Russell'10-May-06 23:03 
GeneralRe: Update AllViews To a Doc from a Dialog Pin
Hamid_RT11-May-06 0:16
Hamid_RT11-May-06 0:16 
JokeRe: Update AllViews To a Doc from a Dialog Pin
Russell'11-May-06 0:29
Russell'11-May-06 0:29 
GeneralRe: Update AllViews To a Doc from a Dialog Pin
Hamid_RT11-May-06 0:34
Hamid_RT11-May-06 0:34 

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.