Re: CFrameWnd client area rect
- From: Joseph M. Newcomer <newcomer@xxxxxxxxxxxx>
- Date: Tue, 30 Oct 2007 20:56:46 -0500
For a simple app that needs simple controls, a dialog-based app is usually the best
choice. There are simple ways to add toolbars and status bars to a dialog-based app; see
projects on www.codeview.com for techniques to handle this.
joe
On Tue, 30 Oct 2007 21:40:35 +0000, Pedro Ferreira <none@xxxxxxxx> wrote:
Hello Joseph,Joseph M. Newcomer [MVP]
You are right, its not about overhead or the amount of code. I was just
trying to see if it was possible to do it this way. Will be back to
traditional doc/view if I can't manage it.
This is a small application that needs a framewnd with a toolbar, and a
single full size window/view in the frame client area. The window to be
displayed is an activex control (Crystal Reports Viewer), and the way
I'm displaying it now is by place the window in a formview with the
"Insert ActiveX control" menu, and then sizing it to the size of the
parent formview.
I just thought I could skip the formview and place the activex control
right on the framewnd.
Thanks,
Pedro
Joseph M. Newcomer wrote:
Why not use doc/view? Most times I hear "I don't want to use doc/view" it is usually
based on an idea that there is "unnecessary overhead" or "too much code" to do this; both
of these are nonsensical, so it is important to understand why you think doc/view is not
desirable.
joe
On Mon, 29 Oct 2007 17:06:19 +0000, Pedro Ferreira <none@xxxxxxxx> wrote:
Hi,Joseph M. Newcomer [MVP]
Is it possible to know the client area size of a CFrameWnd?
I want to use a CFrameWnd without doc/view support, just with a menu,
toolbars and a status bar, and in the client area, I want to place a
custom window.
I successfully created the custom window in my
CFrameWnd::OnCreateClient but now I need to change its size to fill
the empty area where the views are usually placed. Using the client
rect (GetClientRect) gives me the rect of the whole client area, and
my window gets on top of toolbars and menus.
Any ideas?
Thanks,
Pedro Ferreira
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.
- Follow-Ups:
- Re: CFrameWnd client area rect
- From: David Ching
- Re: CFrameWnd client area rect
- References:
- CFrameWnd client area rect
- From: Pedro Ferreira
- Re: CFrameWnd client area rect
- From: Joseph M . Newcomer
- Re: CFrameWnd client area rect
- From: Pedro Ferreira
- CFrameWnd client area rect
- Prev by Date: Re: MFC resources
- Next by Date: Re: CFrameWnd client area rect
- Previous by thread: Re: CFrameWnd client area rect
- Next by thread: Re: CFrameWnd client area rect
- Index(es):
Relevant Pages
|