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

C / C++ / MFC

 
GeneralRe: Spin control Pin
Member 30398435-Jul-06 21:39
Member 30398435-Jul-06 21:39 
AnswerRe: Spin control Pin
Nishad S6-Jul-06 1:17
Nishad S6-Jul-06 1:17 
Questionproblem in receiving correct packet [modified] Pin
thathvamsi5-Jul-06 19:44
thathvamsi5-Jul-06 19:44 
QuestionCommunication from Dialog to CFormView Pin
Uday Janaswamy5-Jul-06 19:26
Uday Janaswamy5-Jul-06 19:26 
QuestionRe: Communication from Dialog to CFormView Pin
Hamid_RT5-Jul-06 20:31
Hamid_RT5-Jul-06 20:31 
AnswerRe: Communication from Dialog to CFormView Pin
Uday Janaswamy5-Jul-06 20:41
Uday Janaswamy5-Jul-06 20:41 
QuestionRe: Communication from Dialog to CFormView Pin
Hamid_RT5-Jul-06 20:48
Hamid_RT5-Jul-06 20:48 
AnswerRe: Communication from Dialog to CFormView Pin
Uday Janaswamy5-Jul-06 21:22
Uday Janaswamy5-Jul-06 21:22 
hi whitesky,


when i am clicking the Button Control in Dialog, i am trying to populate the Form View but that Form View is Showing inside the Dialog Window Itself. Now i want to show that Form View as Separate Window/Frame as the Dialog 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.
GeneralRe: Communication from Dialog to CFormView Pin
Uday Janaswamy5-Jul-06 21:56
Uday Janaswamy5-Jul-06 21:56 
GeneralRe: Communication from Dialog to CFormView Pin
Hamid_RT5-Jul-06 22:18
Hamid_RT5-Jul-06 22:18 
GeneralRe: Communication from Dialog to CFormView Pin
Uday Janaswamy5-Jul-06 23:50
Uday Janaswamy5-Jul-06 23:50 
QuestionObject moving [modified] Pin
trinh_van5-Jul-06 18:54
trinh_van5-Jul-06 18:54 
AnswerRe: Object moving Pin
_AnsHUMAN_ 5-Jul-06 19:18
_AnsHUMAN_ 5-Jul-06 19:18 
GeneralRe: Object moving Pin
ThatsAlok5-Jul-06 19:38
ThatsAlok5-Jul-06 19:38 
AnswerRe: Object moving Pin
ThatsAlok5-Jul-06 19:38
ThatsAlok5-Jul-06 19:38 
AnswerRe: Object moving Pin
Hamid_RT5-Jul-06 20:26
Hamid_RT5-Jul-06 20:26 
Questionremoving a .h or .cpp from a project Pin
locoone5-Jul-06 18:08
locoone5-Jul-06 18:08 
AnswerRe: removing a .h or .cpp from a project Pin
Ram Murali5-Jul-06 18:17
Ram Murali5-Jul-06 18:17 
GeneralRe: removing a .h or .cpp from a project Pin
locoone5-Jul-06 18:22
locoone5-Jul-06 18:22 
Questionkeyboard key event Pin
Ram Murali5-Jul-06 17:35
Ram Murali5-Jul-06 17:35 
AnswerRe: keyboard key event Pin
see me5-Jul-06 18:33
see me5-Jul-06 18:33 
GeneralRe: keyboard key event Pin
Ram Murali5-Jul-06 18:39
Ram Murali5-Jul-06 18:39 
GeneralRe: keyboard key event Pin
ThatsAlok5-Jul-06 19:45
ThatsAlok5-Jul-06 19:45 
GeneralRe: keyboard key event Pin
Ram Murali5-Jul-06 19:49
Ram Murali5-Jul-06 19:49 
GeneralRe: keyboard key event Pin
ThatsAlok5-Jul-06 20:20
ThatsAlok5-Jul-06 20:20 

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.