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

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


How to Add 'No Selection' property page on a modeless

Niels Ull Jacobsen -- nuj@kruger.dk
Friday, June 14, 1996

At 15:18 12-06-96 EAT, you wrote:
>Environment: MFC 4.0  Win32 (NT/95)
>
>MSVC/Developer Studio uses property sheets (or inspectors) to
>display properties of selected objects.  When no object is displayed
>the tabs disappear and a "No Selection" message appears.
>
>We mortals can also create modeless property sheets, but how
>does one display the "No Selection" message when all the tabs
>are removed?
>
>Here's how...
>
>(1) Create a modeless property sheet (using component gallery)
>
>(2) add a CStatic member to the sheet class
> CStatic m_static;
>
>(3) Write a member function to show or hide the m_static as appropriate

Is this point really necessary? Couldn't you just force the static
to lie below all the pages in Z-order? It'll be hidden when=20
any pages are present.
[...]

Thanks for the tip. It's nice to have something other than=20
"How do I.." once in a while.

>Roger Onslow
Niels Ull Jacobsen, Kr=FCger A/S (nuj@kruger.dk)
Everything stated herein is THE OFFICIAL POLICY of the entire Kruger=20
group and should be taken as legally binding in every respect.=20
Pigs will grow wings and fly.








Roger Onslow -- Roger_Onslow@compsys.com.au
Friday, June 21, 1996

Niels Ull Jacobsen,

>Is this point really necessary? Couldn't you just force the static
>to lie below all the pages in Z-order? It'll be hidden when 
>any pages are present.

I don't think that the dialogs that make up property pages have "solid" 
backgrounds.
I *think* they are transparent, cause I couldn't seem to get the static to be 
hidden by them.
Anyway, I couldn't make it automatically disappear when there was a page on top 
and appear when not without resorting to changing visibility.
Hope you can prove me wrong, cause I don't like having to change the visibility 
like that
If you can -- please tell me how and I'll update the tip approriately (and my 
code as well!)

>Thanks for the tip. It's nice to have something other than 
>"How do I.." once in a while.

Glad it has been of help...

Roger






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