[comp.windows.ms] SDK Question - CreateWWindow

hoss@ethz.UUCP (Guido Hoss) (12/10/88)

I wish to create a resizable child window with a system menu. The 'Minimize'
function should be disabled. I can delete the 'Minimize' option from the
system menu, but how do I get rid of the down arrow in the upper right
corner?

Thanks for any answers - G. Hoss

vpsingha@athena.mit.edu (Vivek P. Singhal) (12/13/88)

In article <713@ethz.UUCP> hoss@ethz.UUCP (Guido Hoss) writes:
>I wish to create a resizable child window with a system menu. The 'Minimize'
>function should be disabled. I can delete the 'Minimize' option from the
>system menu, but how do I get rid of the down arrow in the upper right
>corner?

When you create the window using the CreateWindow function, you must
specify a 'style' for the window.  If you XOR the style with
WS_MINIMIZEBOX (e.g. WS_CHILD | ... | ... ^ WS_MINIMIZEBOX), then the
down arrow will be removed.  Also, it will automatically grey out the
Minimize option on the system menu.  It is probably a good idea to
follow the Applications Style Guide and not remove the menu item, but
just mark it as unusable.

Vivek

_____________________________________________________________________________
| Vivek Singhal:  vpsingha@athena.mit.edu        474 Memorial Drive         |
|                 vivek@newt.lcs.mit.edu         Cambridge, MA 02139        |
|                 (617) 225-7576                 (617) 621-0405             |

bturner@hpcvlx.HP.COM (Bill Turner) (12/13/88)

> I wish to create a resizable child window with a system menu. The 'Minimize'
> function should be disabled. I can delete the 'Minimize' option from the
> system menu, but how do I get rid of the down arrow in the upper right
> corner?

When you call CreateWindow, the different style bits tell what non-client
decorations are desired.  One option is WS_MINIMIZEBOX -- if you don't want
the minimize box, don't include this option.  Be forwarned, some of the 
options are really a collection of other options; read the PRef for more 
info (Gawd, I hate saying that!)

--Bill Turner

brent@well.UUCP (Brent Southard) (12/13/88)

In article <713@ethz.UUCP> hoss@ethz.UUCP (Guido Hoss) writes:
>I wish to create a resizable child window with a system menu. The 'Minimize'
>function should be disabled. I can delete the 'Minimize' option from the
>system menu, but how do I get rid of the down arrow in the upper right
>corner?

Simple.  When you use CreateWindow(), eliminate the WS_MINIMIZEBOX style from
the dwStyle (third) parameter.  This should also remove the Minimize
menuitem for you.  I'm not sure about the Minimize box, but Microsoft has
stated that the Maximize box is supported only in the WS_OVERLAPPED class.
I suspect the same is true of the Minimize box, so it's a good idea not to
include either one in a child window's style specification.

What?  You mean the Programmer's Reference doesn't make this clear?!  :)

	brent

-- 
Brent Southard, ImageTech Corp.   |  Everybody's trying to be a friend of mine,
Usenet:  ...well!brent            |  Even a dog can shake hands. - W. Zevon
   CIS:  76657,415                |  We fell into love, love's a very deep hole.
 GEnie:  b.southard               |                      - Loudon Wainwright III