Re: Show Child window always in maximize state
Thanks Tom,
I am facing one more problem in this application. I have one
function IfVideoOpen(). Function definition is
HVIDEO IFVideoOpen(HWND hParent, RECT rect)
{
CSGIronApp *app;
HINSTANCE inst;
HVIDEO hVideo;
HVIDEO (FAR PASCAL *lpfnOpenVideo)(HWND, RECT);
app = (CSGIronApp *)AfxGetApp();
inst = app->GetLibInstance();
if(!inst)
return NULL;
lpfnOpenVideo = (HVIDEO (FAR PASCAL *)(HWND,
RECT))::GetProcAddress(inst, "VideoOpen");
if(!lpfnOpenVideo)
return NULL;
hVideo = (*lpfnOpenVideo)(hParent, rect);
return hVideo;
}
This function I am calling in view.cpp.But it is giving Debug error
called Abort,rertry and ignore after line hVideo =
(*lpfnOpenVideo)(hParent, rect);
I am not getting why it is giving this error?
Tom Serface wrote:
Where is says something like:
m_pMainWnd->ShowWindow(SW_SHOW);
in InitInstance()... change SW_SHOW to SW_SHOWMAXIMIZED to make the
mainframe full size (the applicaiton). Put something like:
BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)
{
cs.style = WS_CHILD | WS_VISIBLE | WS_OVERLAPPED | WS_CAPTION
| WS_SYSMENU | WS_MAXIMIZEBOX | WS_MINIMIZEBOX | WS_MAXIMIZE
| FWS_ADDTOTITLE | WS_THICKFRAME;
if( !CMDIChildWnd::PreCreateWindow(cs))//,nIcon) )
return FALSE;
return TRUE;
}
Note the style WS_MAXIMIZE in the list. This will maximize new child
windows in the mainframe. Of course, the user can make them smaller or
icons in themain window if they like, but I think it's nice to let them do
that if you intend for it to loook like and MDI application.
Tom
"renu" <renuka.kashikar@gmail.com> wrote in message
news:1157111840.565950.45230@b28g2000cwb.googlegroups.com...
hello,
I am converting one application from SDI to MDI.I want the child
window should be opened in maximize state when I execute the
application. When I click on restore down button then window should
look small.
Waiting for your favourable response.
Thanking you.
Renuka.