MainFrame / ChildView positioning in SDI 
Author Message
 MainFrame / ChildView positioning in SDI

Hello everyone,

i have a SDI application. I make the MainFrame Window fullscreen, and want
to position the ChildView centered with a border. It should look like a
presentation-like application, with fullscreen MainFrame and a fixed-sized
ChildView which sits in there centered. I also want to have the background
of the MainFrame around the ChildView filled Black. How can this be
archieved? I dont have to much experience with MFC Doc/View, so any help is
appreciated.

Thanks in advance

--

Alexander Gr?f

_______________________________________________________

Alexander Gr?f
Milano Medien GmbH
Mainberger Stra?e 24
D-97422 Schweinfurt
Tel. +49 (0) 9721/38709-15
Fax. +49 (0) 9721/38709-20

http://www.*-*-*.com/



Wed, 14 Sep 2005 02:09:26 GMT  
 MainFrame / ChildView positioning in SDI
look here for the FullScreen bit

http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B164162

suggest either

Option 1
you catch the views WM_ERASEBKGND to draw a black background.
then in your OnPaint/OnDraw you can draw a white rectangle smaller than the
view size on which you then draw your output.
You can apply an appropriate clip region if you like.

or

Option 2
your stuck with tying to modify the MFC encoded relationship between the
frame and the view.
Start by looking at how the frame resizes the view whenever its own size
changes.
Then you might go back to option 1.

david m.


Quote:

> Hello everyone,

> i have a SDI application. I make the MainFrame Window fullscreen, and want
> to position the ChildView centered with a border. It should look like a
> presentation-like application, with fullscreen MainFrame and a fixed-sized
> ChildView which sits in there centered. I also want to have the background
> of the MainFrame around the ChildView filled Black. How can this be
> archieved? I dont have to much experience with MFC Doc/View, so any help
is
> appreciated.

> Thanks in advance

> --

> Alexander Gr?f

> _______________________________________________________

> Alexander Gr?f
> Milano Medien GmbH
> Mainberger Stra?e 24
> D-97422 Schweinfurt
> Tel. +49 (0) 9721/38709-15
> Fax. +49 (0) 9721/38709-20

> http://milanomedien.com/



Mon, 19 Sep 2005 03:08:36 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. mainframe / childview positioning

2. initialization in SDI ChildView

3. ChildView of a ChildView ?

4. How to obtain mouse position in mainframe???

5. Saving/restoring mainframe & view positions/sizes

6. how to change the color of the MainFrame in SDI or MDI

7. A dynamically made bitmap in a SDI MainFrame

8. How to maximize the Mainframe window (SDI)?

9. SDI MainFrame insted of ChildFrame

10. Getting Handle (SDI) to the View Class from MainFrame

11. How to maximize the mainframe of my SDI application

12. Annoying problem displaying SDI MainFrame window with splash screen

 

 
Powered by phpBB® Forum Software