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

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


Interaction with 4.0 Taskbar

Matthias Bohlen -- MATTES@logotec.com
Thursday, October 17, 1996

Environment: VC++ 4.0, Windows NT 4.0

Hello,

today, I noticed that Developer Studio seems to know about changes of the
position of the taskbar of NT 4.0. How can I put such a knowledge into one
of my applications?

Example: 

I set the taskbar option "hide automatically". When I move the mouse away,
the taskbar disappears OK.  Now, I drag the window of Developer Studio
"underneath" the hidden taskbar. Then, I reset the option "hide automatically"
in the taskbar properties. The taskbar re-appears OK.

IN THE SAME MOMENT, Developer Studio moves itself up a little so that it 
does not interfere with the re-appeared taskbar any more.

That's great, I'd like to have it for my apps, too. Can anybody tell me how 
that works?

Matthias



o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o

The ZEN master: "If you have a stick, I'll give you a
stick. If you have not, I'll take that stick away from
you".

The banker: "If you have money, I'll give you money.
If you have not, I'll take that money away from you".

----------------------------+--------------------------
Matthias Bohlen             |  Logotec Software GmbH
Phone: +49 228 64 80 520    |  Chateauneufstr. 10 
FAX:   +49 228 64 80 525    |  D-53347 Alfter, Germany
                            |  http://www.logotec.com/
E-mail: mattes@logotec.com  |  CAD systems development
----------------------------+--------------------------



Chris Scott -- cscott@aceltd.com
Friday, October 18, 1996

[Mini-digest: 6 responses]

: I set the taskbar option "hide automatically". When I move the mouse 
away,
: the taskbar disappears OK.  Now, I drag the window of Developer Studio
: "underneath" the hidden taskbar. Then, I reset the option "hide 
automatically"
: in the taskbar properties. The taskbar re-appears OK.
:
: IN THE SAME MOMENT, Developer Studio moves itself up a little so that it
: does not interfere with the re-appeared taskbar any more.
:
: That's great, I'd like to have it for my apps, too. Can anybody tell me 
how
: that works?

The Taskbar is moving the Developer Studio window around (or more 
precisely, the Windows Shell handles this).  If you want your app to be 
moved (like Dev Studio) then you don't have to do anything.

If you want your App to move around other apps like the Shell does, you 
need to define your app as an Appbar and the Shell will do for it what it 
does for the Taskbar.  Search the MSDN for "AppBar" - there was an article 
in MSJ on this some time ago.

- Chris

-----From: Mario Contestabile

You'll probably want to take a look at an MSJ article on this subject, which 
appeared
sometime this year (can't check right now).

mcontest@universal.com

-----From: "Shrikanth Swaminathan" 

Hi !!,
I dont have NT4.0, but on Win95, this happens automatically.
Only it is not a little bit, but the entire app win becomes visible.
I am surprised that the same does not happen automatically, on NT-4.0 too.
My environment, 
Win95 + Microsoft Plus !
PS: some of the changes in the behaviour of windows, (like full drag of
windows)
are only changes in the Registry settings (why I mentioned MS plus was,
that 
some of the supposedly cool stuff it dows, are mear changes in the system
registry).

s.shrikanth

-----From: ktm@ormec.com

You need to handle the WM_SETTINGCHANGE message in your MainFrame class. 
The message is actually listed as WM_WININICHANGE in the ClassWizard.

When you recieve the message, retrieve the size of the work area (e.g. the 
part of the screen not obscured with the task bar) by calling 
::SystemParametersInfo with the SPI_GETWORKAREA size parameter. Then call 
MoveWindow to move or resize your MainFrame as appropriate.

  Katy
-- 
Katy Mulvey                            ktm@ormec.com
Software Development Engineer
ORMEC Systems                          http://www.ormec.com
19 Linden Park; Rochester, NY 14625

-----From: WnDBSoft@aol.com

Every application gets that kind of behavior by default with Windows 95.
Try it and see!

Brian
-----From: Norman 

I can't answer directly because I have only browsed through the chapter, but
Visual C++ 4 MasterClass published by WROX has a chapter on Shell
programming and there are API calls to the Shell. One that I've used
successfully is SHBrowseForFolder().

The book has about nine different authors on various advanced MFC
programming issues. I highly recommend the book (for whatever that's worth).

Norman




Alexander Grigoriev -- alegr@aha.ru
Saturday, October 19, 1996

The system broadcasts WM_SETTINGCHANGE message. Maximized windows retrieve
new workarea size by SystemParametersInfo call with SPI_GETWORKAREA flag.

----------
> From: Matthias Bohlen 
> To: mfc-l@netcom.com
> Subject: Interaction with 4.0 Taskbar
> Date: 17 ПЛФСВТС 1996 З. 13:59
> 
> Environment: VC++ 4.0, Windows NT 4.0
> 
> Hello,
> 
> today, I noticed that Developer Studio seems to know about changes of the
> position of the taskbar of NT 4.0. How can I put such a knowledge into
one
> of my applications?
> 
> Example: 
> 
> I set the taskbar option "hide automatically". When I move the mouse
away,
> the taskbar disappears OK.  Now, I drag the window of Developer Studio
> "underneath" the hidden taskbar. Then, I reset the option "hide
automatically"
> in the taskbar properties. The taskbar re-appears OK.
> 
> IN THE SAME MOMENT, Developer Studio moves itself up a little so that it 
> does not interfere with the re-appeared taskbar any more.
> 
> That's great, I'd like to have it for my apps, too. Can anybody tell me
how 
> that works?
> 
> Matthias
> 
> 
> 
> o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o
> 
> The ZEN master: "If you have a stick, I'll give you a
> stick. If you have not, I'll take that stick away from
> you".
> 
> The banker: "If you have money, I'll give you money.
> If you have not, I'll take that money away from you".
> 
> ----------------------------+--------------------------
> Matthias Bohlen             |  Logotec Software GmbH
> Phone: +49 228 64 80 520    |  Chateauneufstr. 10 
> FAX:   +49 228 64 80 525    |  D-53347 Alfter, Germany
>                             |  http://www.logotec.com/
> E-mail: mattes@logotec.com  |  CAD systems development
> ----------------------------+--------------------------



Niels Ull Jacobsen -- nuj@kruger.dk
Tuesday, October 22, 1996



>>> "Matthias Bohlen"  17-10-96 10.59 >>>
>Environment: VC++ 4.0, Windows NT 4.0

>Hello,

>today, I noticed that Developer Studio seems to know about changes of
>the
>position of the taskbar of NT 4.0. How can I put such a knowledge into
>one
>of my applications?

[ ..wants to resize his window when "Auto hide" is selected...]

Handle the  WM_SETTINGCHANGE notification in your main window.

You can get the current availiable screen estate by calling
SystemsParameterInfo with SPI_GETWORKAREA.





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