Click here to Skip to main content
15,949,686 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionCommunication from Dialog to CFormView Pin
Uday Janaswamy3-Jul-06 23:36
Uday Janaswamy3-Jul-06 23:36 
AnswerRe: Communication from Dialog to CFormView Pin
Weiye Chen3-Jul-06 23:39
Weiye Chen3-Jul-06 23:39 
GeneralRe: Communication from Dialog to CFormView Pin
Uday Janaswamy4-Jul-06 3:17
Uday Janaswamy4-Jul-06 3:17 
AnswerRe: Communication from Dialog to CFormView Pin
huynhnb3-Jul-06 23:55
huynhnb3-Jul-06 23:55 
GeneralRe: Communication from Dialog to CFormView [modified] Pin
Uday Janaswamy4-Jul-06 3:07
Uday Janaswamy4-Jul-06 3:07 
GeneralRe: Communication from Dialog to CFormView Pin
huynhnb4-Jul-06 16:32
huynhnb4-Jul-06 16:32 
GeneralRe: Communication from Dialog to CFormView Pin
Uday Janaswamy4-Jul-06 18:36
Uday Janaswamy4-Jul-06 18:36 
GeneralRe: Communication from Dialog to CFormView Pin
Uday Janaswamy5-Jul-06 18:26
Uday Janaswamy5-Jul-06 18:26 
Hi,

Every thing is Ok, But with this Code i am only able to see the Form View Embeded in the Dialog. Could you please provide me the solution for showing in different Window.

Here is the Code.

//========================================================================

void CMydlgDlg::OnButton1()
{
CFrameWnd *pMainFrame = (CFrameWnd*)RUNTIME_CLASS(kiranfrm)->CreateObject();

CSingleDocTemplate* pDocTemplate;
pDocTemplate = new CSingleDocTemplate(IDI_ICON1,
RUNTIME_CLASS(kirandoc),
RUNTIME_CLASS(kiranfrm),
RUNTIME_CLASS(kiran));

CCreateContext sContext;
sContext.m_pCurrentDoc = (CDocument*) RUNTIME_CLASS(kirandoc)->CreateObject();
sContext.m_pCurrentFrame = NULL;
sContext.m_pLastView = NULL;
sContext.m_pNewDocTemplate = pDocTemplate;
sContext.m_pNewViewClass = RUNTIME_CLASS(kiran);

CString strClass= AfxRegisterWndClass(CS_VREDRAW|CS_HREDRAW, ::LoadCursor(NULL, IDC_ARROW), (HBRUSH)::GetStockObject(WHITE_BRUSH), ::LoadIcon(NULL, IDI_APPLICATION));
pMainFrame ->Create(strClass, _T(""), WS_CHILD, CRect(0,0,1,1), this, NULL, 0, &sContext);
pMainFrame ->MoveWindow(200,100,300,300);
pMainFrame ->ShowWindow(SW_SHOW);
}
//========================================================================

Please help me out.



Uday
AnswerRe: Communication from Dialog to CFormView Pin
Hamid_RT4-Jul-06 2:03
Hamid_RT4-Jul-06 2:03 
Questiona snapshot Pin
V_shr3-Jul-06 23:35
V_shr3-Jul-06 23:35 
AnswerRe: a snapshot Pin
Justin Tay3-Jul-06 23:49
Justin Tay3-Jul-06 23:49 
QuestionCommunication between Two Dialog Pin
Amit Agarrwal3-Jul-06 23:28
Amit Agarrwal3-Jul-06 23:28 
AnswerRe: Communication between Two Dialog Pin
_AnsHUMAN_ 3-Jul-06 23:36
_AnsHUMAN_ 3-Jul-06 23:36 
GeneralRe: Communication between Two Dialog Pin
Amit Agarrwal3-Jul-06 23:44
Amit Agarrwal3-Jul-06 23:44 
GeneralRe: Communication between Two Dialog Pin
_AnsHUMAN_ 3-Jul-06 23:51
_AnsHUMAN_ 3-Jul-06 23:51 
GeneralRe: Communication between Two Dialog Pin
Amit Agarrwal4-Jul-06 0:12
Amit Agarrwal4-Jul-06 0:12 
GeneralRe: Communication between Two Dialog Pin
Amit Agarrwal4-Jul-06 0:51
Amit Agarrwal4-Jul-06 0:51 
AnswerRe: Communication between Two Dialog Pin
Weiye Chen3-Jul-06 23:45
Weiye Chen3-Jul-06 23:45 
QuestionLoading the correct icons Pin
Remco Hoogenboezem3-Jul-06 23:27
Remco Hoogenboezem3-Jul-06 23:27 
Questionoutput to CSV file Pin
PhilWalker3-Jul-06 23:16
PhilWalker3-Jul-06 23:16 
AnswerRe: output to CSV file Pin
*Dreamz3-Jul-06 23:40
*Dreamz3-Jul-06 23:40 
GeneralRe: output to CSV file Pin
PhilWalker3-Jul-06 23:53
PhilWalker3-Jul-06 23:53 
QuestionONCREAECLIENT Pin
ashish dogra3-Jul-06 23:09
ashish dogra3-Jul-06 23:09 
AnswerRe: ONCREAECLIENT Pin
_AnsHUMAN_ 3-Jul-06 23:15
_AnsHUMAN_ 3-Jul-06 23:15 
GeneralRe: ONCREAECLIENT Pin
ashish dogra3-Jul-06 23:24
ashish dogra3-Jul-06 23:24 

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.