Re: CFrameWnd client area rect



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,

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,

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
Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.



Relevant Pages

  • Re: can only change one windows client area?
    ... CFormView in which the drawing in your current "client area" now takes place on a child ... control of the dialog. ... you resize the child window to half-size and position ...
    (microsoft.public.vc.mfc)
  • Re: Diff between View, FormView and Dialog???
    ... Right now I have given up on having a CFormView based app with tabbed pages. ... I am looking at using a tabbed control class suggest by ... class gives you control over the entire client area, ... then what is drawn in the user area of a CView, a window? ...
    (microsoft.public.vc.mfc)
  • Re: Diff between View, FormView and Dialog???
    ... I am looking at using a tabbed control class suggest by ... CView - Used mostly for paint and word-processor style programs. ... class gives you control over the entire client area, ... then what is drawn in the user area of a CView, a window? ...
    (microsoft.public.vc.mfc)
  • Re: Diff between View, FormView and Dialog???
    ... because a CFormView is just a wrapper to manage a dialog. ... In fact in the FormView apps I have seen, the data is handled at the control ... class gives you control over the entire client area, ... then what is drawn in the user area of a CView, a window? ...
    (microsoft.public.vc.mfc)
  • Re: Windows caption bar size problem
    ... Either of these would only work if the control ... > If you went with #1, you could use the SystemParametersInfo API function. ... > You would have to take into account menu bars, toolbars, borders, etc. ... anything part of the non-client area of the window. ...
    (microsoft.public.vb.winapi)