Full screen, SDI with no Frames , status or title bar 
Author Message
 Full screen, SDI with no Frames , status or title bar

I was wondering how to create a SDI with NO scroll bars, status bar, or
Title bar, etc.
I am trying to get the illusion of a fullscreen.  Any help would be
appreciated.

Robin



Sun, 26 Sep 2004 19:55:53 GMT  
 Full screen, SDI with no Frames , status or title bar
You can simply turn off scroll bars, status bar and toolbars. Then get the
screen (desktop) metrics and resize your *client* window area to its size.
ScreenToClient(), ClientToScreen() should do the job, if you wonder how to
position your window.
I always created an independent window for such purposes, so I can't post
you sample code. However, if you'd like to do this in an OpenGL way for
instance (fullscreens are obtained by creating and registering new windows),
let me know.

Good luck :)
Peter



Sun, 26 Sep 2004 20:18:16 GMT  
 Full screen, SDI with no Frames , status or title bar
How do you turn off scroll bars, status bar, etc.
Sample code would  helpful.


Quote:
> You can simply turn off scroll bars, status bar and toolbars. Then get the
> screen (desktop) metrics and resize your *client* window area to its size.
> ScreenToClient(), ClientToScreen() should do the job, if you wonder how to
> position your window.
> I always created an independent window for such purposes, so I can't post
> you sample code. However, if you'd like to do this in an OpenGL way for
> instance (fullscreens are obtained by creating and registering new
windows),
> let me know.

> Good luck :)
> Peter



Sun, 26 Sep 2004 20:36:30 GMT  
 Full screen, SDI with no Frames , status or title bar
In the CView derived class (I assume that you use MFC app wizzard generated
app), modify the following:

void CYourView::OnInitialUpdate()
{

 CFormView::OnInitialUpdate(); //In my case, base class is CFormView
 GetParentFrame()->RecalcLayout();
 ResizeParentToFit();

    //Get rid of scrollbars:
    //For example - sets small window - scroll bars wouldn't appear
    SetScrollSizes( MM_TEXT, CSize(100, 100) );

Quote:
}

then, from within CMainFrame::OnCreate(...) either remove or comment lines
responsible for creating standard toolbar and status bar:

OnCreate(LPCREATESTRUCT lpCreateStruct)
{
 if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
  return -1;

//Comment from here:

/*

 if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE |
CBRS_TOP
  | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
  !m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
 {
  TRACE0("Failed to create toolbar\n");
  return -1;      // fail to create
 }

 if (!m_wndStatusBar.Create(this) ||
  !m_wndStatusBar.SetIndicators(indicators,
    sizeof(indicators)/sizeof(UINT)))
 {
  TRACE0("Failed to create status bar\n");
  return -1;      // fail to create
 }

 // TODO: Delete these three lines if you don't want the toolbar to
 //  be dockable
 m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
 EnableDocking(CBRS_ALIGN_ANY);
 DockControlBar(&m_wndToolBar);

*/
//To there

 return 0;

Quote:
}

You will get window with caption and menu. GetClientRect(...) from
CMainFrame and GetClientRect from CYourView. Substract the rects, then
inflate CMainFrame rect. to desktop size (for example 1024x768) +
(CMainFrame rect - CYourView rec). Position the window using MoveWindow,
SetWindowPos, etc (left corner of CYourView should be at 0,0 position of
desktop window).

I know that this is very {*filter*} way, but if you don't want to create another
window, I can't figure nothing better now :)
Regards,
Peter



Sun, 26 Sep 2004 21:53:58 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. How to make a full-screen window without frame and title bar

2. How to make a full-screen window without frame and title bar

3. Full screen without title bar

4. Title in SDI Title Bar

5. Displaying full path names in window title bars

6. Show full path in VC title bar

7. Full Screen with NO frame in MFC

8. full-screen frame/ no border?

9. Full Screen Dialog in a SDI

10. Help creating full-screen sdi w/o caption,borders

11. Hiding title, menu, and status bars?

12. Update title bar of a Frame Window

 

 
Powered by phpBB® Forum Software