full screen

This is a discussion on full screen within the Windows Programming forums, part of the Platform Specific Boards category; Is there anyway that you can create a window with no border or title bar or anything; i.e. have its ...

  1. #1
    Anal comment spacer DominicTrix's Avatar
    Join Date
    Apr 2002
    Posts
    120

    full screen

    Is there anyway that you can create a window with no border or title bar or anything; i.e. have its client area fill the entire screen?
    Or is there a seperate way to create such programs?


    thanks,

    dt

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    Yup....Create a standard window, but exchange the window style for WS_POPUP.......and set the window to cover the screen......like so..

    Code:
    #include <windows.h>
    
    LRESULT CALLBACK WindowProc(HWND, UINT, WPARAM, LPARAM);
    
    char szClassName[] = "WindowsApp";
    HINSTANCE g_hInst;
    
    
    int WINAPI WinMain(HINSTANCE hThisInstance, 
    HINSTANCE hPrevInstance, LPSTR lpszArgument, int nFunsterStil)
    
    {
        HWND hwnd;               
    	MSG messages;            
    	WNDCLASSEX wincl; 
    	int cx,cy;
    	
    	g_hInst = hThisInstance;
    
        wincl.hInstance = hThisInstance;
        wincl.lpszClassName = szClassName;
        wincl.lpfnWndProc = WindowProc;      
        wincl.style = CS_DBLCLKS;               
        wincl.cbSize = sizeof(WNDCLASSEX);
        wincl.hIcon = LoadIcon(NULL, IDI_APPLICATION);
        wincl.hIconSm = LoadIcon(NULL, IDI_APPLICATION);
        wincl.hCursor = LoadCursor(NULL, IDC_ARROW);
        wincl.lpszMenuName = NULL;
        wincl.cbClsExtra = 0; 
        wincl.cbWndExtra = 0; 
    	wincl.hbrBackground = (HBRUSH) GetStockObject(BLACK_BRUSH);
    
        
        if(!RegisterClassEx(&wincl)) return 0;
    
    	cx = GetSystemMetrics(SM_CXSCREEN);
    	cy = GetSystemMetrics(SM_CYSCREEN);
    
    
        hwnd = CreateWindowEx(0,szClassName, "Windows App",
    		WS_POPUP,0,0,cx,cy, HWND_DESKTOP,NULL,            
               hThisInstance,NULL );    
    
       
        ShowWindow(hwnd, nFunsterStil);
    	UpdateWindow(hwnd);
       
        while(GetMessage(&messages, NULL, 0, 0))
        {
              TranslateMessage(&messages);
              DispatchMessage(&messages);
        }
    
        return messages.wParam;
    }
    
    
    LRESULT CALLBACK WindowProc(HWND hwnd, UINT message, 
    							WPARAM wParam, LPARAM lParam)
    {
        switch (message)                
        {
               case WM_CREATE:            
               
               break;
               
               case WM_PAINT:
               
               break;
               
               case WM_DESTROY:
               PostQuitMessage(0);        
               break;
               default:                   
               return DefWindowProc(hwnd, message, wParam, lParam);
        }
        return 0;
    }

  3. #3
    Anal comment spacer DominicTrix's Avatar
    Join Date
    Apr 2002
    Posts
    120
    Fab, thank you

    dt

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C++ Full Screen
    By Unregistered in forum C++ Programming
    Replies: 25
    Last Post: 06-12-2009, 02:33 PM
  2. Opening in full screen
    By MaGaIn in forum C++ Programming
    Replies: 14
    Last Post: 08-21-2007, 12:12 PM
  3. Full Screen
    By Rainer in forum C++ Programming
    Replies: 4
    Last Post: 08-08-2003, 06:56 AM
  4. !!!!!!Full screen!!!!!
    By Lukas in forum C++ Programming
    Replies: 2
    Last Post: 03-19-2003, 04:43 AM
  5. Full Screen
    By JamMan in forum C++ Programming
    Replies: 3
    Last Post: 11-21-2001, 03:10 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21