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

C / C++ / MFC

 
GeneralRe: Spin control Pin
Member 30398435-Jul-06 20:39
Member 30398435-Jul-06 20:39 
AnswerRe: Spin control Pin
Nishad S6-Jul-06 0:17
Nishad S6-Jul-06 0:17 
Questionproblem in receiving correct packet [modified] Pin
thathvamsi5-Jul-06 18:44
thathvamsi5-Jul-06 18:44 
QuestionCommunication from Dialog to CFormView Pin
Uday Janaswamy5-Jul-06 18:26
Uday Janaswamy5-Jul-06 18:26 
QuestionRe: Communication from Dialog to CFormView Pin
Hamid_RT5-Jul-06 19:31
Hamid_RT5-Jul-06 19:31 
AnswerRe: Communication from Dialog to CFormView Pin
Uday Janaswamy5-Jul-06 19:41
Uday Janaswamy5-Jul-06 19:41 
QuestionRe: Communication from Dialog to CFormView Pin
Hamid_RT5-Jul-06 19:48
Hamid_RT5-Jul-06 19:48 
AnswerRe: Communication from Dialog to CFormView Pin
Uday Janaswamy5-Jul-06 20:22
Uday Janaswamy5-Jul-06 20: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 20:56
Uday Janaswamy5-Jul-06 20:56 
GeneralRe: Communication from Dialog to CFormView Pin
Hamid_RT5-Jul-06 21:18
Hamid_RT5-Jul-06 21:18 
GeneralRe: Communication from Dialog to CFormView Pin
Uday Janaswamy5-Jul-06 22:50
Uday Janaswamy5-Jul-06 22:50 
QuestionObject moving [modified] Pin
trinh_van5-Jul-06 17:54
trinh_van5-Jul-06 17:54 
AnswerRe: Object moving Pin
_AnsHUMAN_ 5-Jul-06 18:18
_AnsHUMAN_ 5-Jul-06 18:18 
GeneralRe: Object moving Pin
ThatsAlok5-Jul-06 18:38
ThatsAlok5-Jul-06 18:38 
AnswerRe: Object moving Pin
ThatsAlok5-Jul-06 18:38
ThatsAlok5-Jul-06 18:38 
AnswerRe: Object moving Pin
Hamid_RT5-Jul-06 19:26
Hamid_RT5-Jul-06 19:26 
Questionremoving a .h or .cpp from a project Pin
locoone5-Jul-06 17:08
locoone5-Jul-06 17:08 
AnswerRe: removing a .h or .cpp from a project Pin
Ram Murali5-Jul-06 17:17
Ram Murali5-Jul-06 17:17 
GeneralRe: removing a .h or .cpp from a project Pin
locoone5-Jul-06 17:22
locoone5-Jul-06 17:22 
Questionkeyboard key event Pin
Ram Murali5-Jul-06 16:35
Ram Murali5-Jul-06 16:35 
AnswerRe: keyboard key event Pin
see me5-Jul-06 17:33
see me5-Jul-06 17:33 
GeneralRe: keyboard key event Pin
Ram Murali5-Jul-06 17:39
Ram Murali5-Jul-06 17:39 
GeneralRe: keyboard key event Pin
ThatsAlok5-Jul-06 18:45
ThatsAlok5-Jul-06 18:45 
GeneralRe: keyboard key event Pin
Ram Murali5-Jul-06 18:49
Ram Murali5-Jul-06 18:49 
GeneralRe: keyboard key event Pin
ThatsAlok5-Jul-06 19:20
ThatsAlok5-Jul-06 19: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.