🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #13432

Re: How to get the windows desktop taskbar to temporarily stay belowmy apps window?

#13432
From: Damon Chandler (TeamB)
Date: Sun, 12 Oct 2003 08:41
32 lines
2095 bytes
Bruce,
> I have an application that displays images full screen. How can I get
> the window desktop task bar to NOT stay on top of my window when
> displaying an image full screen?

Windows will make a window a full-screen-sized (covering the Task Bar) if
the window's style is WS_POPUP and it's sized to the dimensions of the
screen.  If you're using a TForm-type window, you can effect this like so...

  BorderStyle = bsNone;
  WindowState = wsMaximized;
  SetBounds(0, 0, Screen->Width, Screen->Height);

If you're not using the VCL, you can do the following...

  // get the dimensions of the screen
  // (see also http://tinyurl.com/qmcw)
  HDC const hScreenDC = GetDC(NULL);
  SIZE const SScreen = {
    GetDeviceCaps(hScreenDC, HORZRES),
    GetDeviceCaps(hScreenDC, VERTRES)
    };
  ReleaseDC(NULL, hScreenDC);

  // change the window's style and then resize
  HWND const hWnd = // handle to the window
  SetWindowLong(hWnd, GWL_STYLE, WS_VISIBLE | WS_POPUP | WS_MAXIMIZE);
  SetWindowPos(hWnd, NULL, 0, 0, SScreen.cx, SScreen.cy,
    SWP_NOZORDER | SWP_FRAMECHANGED); 

Good luck,
Damon (TeamB)
Technical Details
Message-ID: <3F8913AC.33CD9E4B@cornell.edu>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3F8819CC.6090405@lycos.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,498ebb6b5777b799
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-10-12 02:09:07 PST
Message-ID: <3F8913AC.33CD9E4B@cornell.edu>
Date: Sun, 12 Oct 2003 04:41:16 -0400
From: "Damon Chandler (TeamB)" <dmc27@cornell.edu>
X-Mailer: Mozilla 4.8 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: How to get the windows desktop taskbar to temporarily stay belowmy 
 apps window?
References: <3F8819CC.6090405@lycos.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 24.59.79.32
X-Trace: newsgroups.borland.com 1065948032 24.59.79.32 (12 Oct 2003 01:40:32 -0700)
Lines: 32
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail