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

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


Changing Window Style for a Property Sheet

MICHAEL@datatree.com
Monday, July 15, 1996

Enviroment: VC++ 4.1 and Windows 95

How do you add the WS_MINIMIZEBOX
style to a PropertySheet?

The following code did not work.

BOOL CMyMiniFrameWnd::PreCreateWindow(CREATESTRUCT& cs) 
{
   cs.style |= WS_MINIMIZEBOX;
   return CMiniFrameWnd::PreCreateWindow(cs);
}

---------------------------
Michael Thal
Data Tree Corporation
voice: (619) 231-3300
fax:      (619) 231-3301




Jeff Bourne -- jbourne@eburg.com
Friday, July 19, 1996

[Mini-digest: 2 responses]

michael wrote:
> 
> Enviroment: VC++ 4.1 and Windows 95
> 
> How do you add the WS_MINIMIZEBOX
> style to a PropertySheet?
> 
> The following code did not work.
> 
> BOOL CMyMiniFrameWnd::PreCreateWindow(CREATESTRUCT& cs)
> {
>    cs.style |= WS_MINIMIZEBOX;
>    return CMiniFrameWnd::PreCreateWindow(cs);
> }
> 
> ---------------------------
> Michael Thal
> Data Tree Corporation
> voice: (619) 231-3300
> fax:      (619) 231-3301

Handle OnCreate in your CPropertySheet class and call ModifyStyle.  Works like a 
charm.  For example...

int CMyPropertySheet::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
        if (CPropertySheet::OnCreate(lpCreateStruct) == -1)
                return -1;
        ModifyStyle(WS_MINIMIZEBOX, NULL);

        

        // TODO: Add your specialized creation code here
        
        return 0;
}


Jeff

-----From: "Mike Blaszczak" 

Try calling the base class first:

BOOL CMyMiniFrameWnd::PreCreateWindow(CREATESTRUCT& cs) 
{
   if (!CMiniFrameWnd::PreCreateWindow(cs))
	return FALSE;
cs.style |= WS_MINIMIZEBOX;
	return TRUE;
}

.B ekiM
http://www.nwlink.com/~mikeblas



MICHAEL@datatree.com
Monday, July 22, 1996

Michael says...

Your ModifyStyle works fine for a modal Property
Sheet, unfortunately my "sheet" is modeless.

Thanks anyway.

Jeff says..
>
>Handle OnCreate in your CPropertySheet class and call ModifyStyle.  Works
like a 
>charm.  For example...
>
>int CMyPropertySheet::OnCreate(LPCREATESTRUCT lpCreateStruct)
>{
>        if (CPropertySheet::OnCreate(lpCreateStruct) == -1)
>                return -1;
>        ModifyStyle(WS_MINIMIZEBOX, NULL);
>
---------------------------
Michael Thal
Data Tree Corporation
voice: (619) 231-3300
fax:      (619) 231-3301





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