15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


Child Windows style

John Lu -- lujohn@plhp002.comm.mot.com
Wednesday, April 10, 1996



Environment:  VC++ 4.1, Win95/NT3.51

I am developing a MDI application. I want all the child windows to be
resizable and the Maximize button only resizes the window to the user
defined maximum size instead of maximizing as standard. Also, I want
to have restore button replacing the maximize button when I do such
"customized maximazing". Here are the questions:

How to replace the maximize button with the restore button after the
customized maximizing. (Do I have to repaint the caption bar?)

How can I set the resizable child window style to have sizing grip in
the right-bottom corner? (where is SBS_SIZEGRIP?)

Any help is highly appreciated.

John Lu


-- 
+----------------------------------+-------------------------------------+
+ John Lu                          | Phone : (954) 723-6889              +
+ Motorola, Inc.                   | Pager : (954) 723-4567 #4986        +
+ Next Generation RSS Development  | E-mail: lujohn@plhp002.comm.mot.com +
+ Radio Software Technology Center | 8000 West  Sunrise Blvd, Room 1162  +
+ Land Mobile Product Sector       | Fort Lauderdale, FL 33322           +
+----------------------------------+-------------------------------------+



Mike Blaszczak -- mikeblas@msn.com
Saturday, April 13, 1996

----------
From: 	owner-mfc-l@netcom.com on behalf of John Lu
Sent: 	Wednesday, April 10, 1996 7:09 AM

> Environment:  VC++ 4.1, Win95/NT3.51

Thanks.

> I am developing a MDI application. I want all the child windows to be
> resizable and the Maximize button only resizes the window to the user
> defined maximum size instead of maximizing as standard.

Aren't you afraid this will confuse your users?

> Also, I want
> to have restore button replacing the maximize button when I do such
> "customized maximazing". Here are the questions:
> How to replace the maximize button with the restore button after the
> customized maximizing. (Do I have to repaint the caption bar?)

Are you saying that you want to replace the behaviour of the button?  If so, 
just handle the WM_MAXIMIZE or WM_RESTORE messages.  Or are you saying that 
you want to draw the window buttons differnetly?  If so, you'll have to handle 
the WM_NCPAINT messages to draw the frame and caption yourself.

> How can I set the resizable child window style to have sizing grip in
> the right-bottom corner? (where is SBS_SIZEGRIP?)

SBS_SIZEGRIP is only available to status bars.  "SBS_" stands for "Status Bar 
Style".  "PBS_" stands for "Piano Bar Style", and "BBS_" stands for "Biker Bar 
Style".  You could:

+ make some room by changing the layout of your view in your frame and draw a 
grip thingie yourself. If you're aggressively handling WM_NCPAINT, this is 
actually pretty easy. Or you could

+ add a status bar to your window.

.B ekiM
TCHAR sz[] = _T("I don't speak for Microsoft");




| Вернуться в корень Архива |