TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: John Beal
from: Johan Siegers
date: 1995-11-08 12:17:22
subject: INITIAL WINDOW SIZE

Hi John,

 JB> How do I create a window whose frame does not include a client
 JB> area (ie, just a titlebar and menu)?

I Don't know for what purpose you need just the frame, but an option would
be creating a window using WinCreateStdWindow(), and NOT to fill the client
area with CLR_PALEGRAY during a WM_PAINT. This gives you a transparent
client window, in which you can still paint.

Another option would be (not tested)
     #define ID_MYFRAME 1
 
     HWND hwndFrame;
     hwndFrame = WinCreateWindow(
         HWND_DESKTOP,
         WC_FRAME,    
         (PSZ) NULL,
         WS_VISIBLE,
         10, 10,  100, 100,  /* Position & Size   */
         HWND_DESKTOP, 
         HWND_TOP,   
         ID_MYFRAME, 
         NULL, 
         NULL);

 JB> Barring that, how do I find the height of a titlebar and menu?

I would say: subclass it to get it's hwnd if neccesary, and do a
WinQueryWindowRect();

Bye, Johan.

--- The-Box Point 0.15+ PC
* Origin: johan{at}bitbike.iaf.nl - CIS: 100120,2502 (2:283/512.16)
SEEN-BY: 270/101 620/243 711/401 409 410 413 430 807 808 809 934 955 712/407
SEEN-BY: 712/515 517 628 713/888 800/1 7877/2809
@PATH: 283/512 280/801 270/101 712/515 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.