Click here to Skip to main content
15,848,594 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionCommunication from Dialog to CFormView Pin
Uday Janaswamy4-Jul-06 0:36
Uday Janaswamy4-Jul-06 0:36 
AnswerRe: Communication from Dialog to CFormView Pin
Weiye Chen4-Jul-06 0:39
Weiye Chen4-Jul-06 0:39 
GeneralRe: Communication from Dialog to CFormView Pin
Uday Janaswamy4-Jul-06 4:17
Uday Janaswamy4-Jul-06 4:17 
AnswerRe: Communication from Dialog to CFormView Pin
huynhnb4-Jul-06 0:55
huynhnb4-Jul-06 0:55 
GeneralRe: Communication from Dialog to CFormView [modified] Pin
Uday Janaswamy4-Jul-06 4:07
Uday Janaswamy4-Jul-06 4:07 
GeneralRe: Communication from Dialog to CFormView Pin
huynhnb4-Jul-06 17:32
huynhnb4-Jul-06 17:32 
GeneralRe: Communication from Dialog to CFormView Pin
Uday Janaswamy4-Jul-06 19:36
Uday Janaswamy4-Jul-06 19:36 
GeneralRe: Communication from Dialog to CFormView Pin
Uday Janaswamy5-Jul-06 19:26
Uday Janaswamy5-Jul-06 19: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 3:03
Hamid_RT4-Jul-06 3:03 
Questiona snapshot Pin
V_shr4-Jul-06 0:35
V_shr4-Jul-06 0:35 
AnswerRe: a snapshot Pin
Justin Tay4-Jul-06 0:49
Justin Tay4-Jul-06 0:49 
QuestionCommunication between Two Dialog Pin
Amit Agarrwal4-Jul-06 0:28
Amit Agarrwal4-Jul-06 0:28 
AnswerRe: Communication between Two Dialog Pin
_AnsHUMAN_ 4-Jul-06 0:36
_AnsHUMAN_ 4-Jul-06 0:36 
GeneralRe: Communication between Two Dialog Pin
Amit Agarrwal4-Jul-06 0:44
Amit Agarrwal4-Jul-06 0:44 
GeneralRe: Communication between Two Dialog Pin
_AnsHUMAN_ 4-Jul-06 0:51
_AnsHUMAN_ 4-Jul-06 0:51 
GeneralRe: Communication between Two Dialog Pin
Amit Agarrwal4-Jul-06 1:12
Amit Agarrwal4-Jul-06 1:12 
GeneralRe: Communication between Two Dialog Pin
Amit Agarrwal4-Jul-06 1:51
Amit Agarrwal4-Jul-06 1:51 
AnswerRe: Communication between Two Dialog Pin
Weiye Chen4-Jul-06 0:45
Weiye Chen4-Jul-06 0:45 
QuestionLoading the correct icons Pin
Remco Hoogenboezem4-Jul-06 0:27
Remco Hoogenboezem4-Jul-06 0:27 
Questionoutput to CSV file Pin
PhilWalker4-Jul-06 0:16
PhilWalker4-Jul-06 0:16 
AnswerRe: output to CSV file Pin
*Dreamz4-Jul-06 0:40
*Dreamz4-Jul-06 0:40 
GeneralRe: output to CSV file Pin
PhilWalker4-Jul-06 0:53
PhilWalker4-Jul-06 0:53 
QuestionONCREAECLIENT Pin
ashish dogra4-Jul-06 0:09
ashish dogra4-Jul-06 0:09 
AnswerRe: ONCREAECLIENT Pin
_AnsHUMAN_ 4-Jul-06 0:15
_AnsHUMAN_ 4-Jul-06 0:15 
GeneralRe: ONCREAECLIENT Pin
ashish dogra4-Jul-06 0:24
ashish dogra4-Jul-06 0: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.