Board index » delphi » Group window won't close in Win 98

Group window won't close in Win 98

I'm using DDE to set up a group (and items within the group).
I'd like for the group window that I've created to close at the
end of setup, so I tried the following

var
        h  THandle;
begin
? h = FindWindow(PChar('CabinetWClass'),nil);
? if h <> 0 then SendMessage(h,WM_CLOSE, 0, 0);
end;

This works OK in Windows 95 and NT but doesn't close
the group window in Windows 98.? I've checked the class
name on all three systems and it looks to me like the
CabinetWClass classname I'm using is correct, even in 98.

Does anyone have any idea why it's not working in 98?

 

Re:Group window won't close in Win 98


In article <01bf4768$864fa280$c3266ad8@oemcomputer>,
  "Harry Schwartz" <schwart...@SPAMsocketis.net> wrote:

Quote
> I'm using DDE to set up a group (and items within the group).
> I'd like for the group window that I've created to close at the
> end of setup, so I tried the following

> var
>    h  THandle;
> begin
> ? h = FindWindow(PChar('CabinetWClass'),nil);
> ? if h <> 0 then SendMessage(h,WM_CLOSE, 0, 0);
> end;

> This works OK in Windows 95 and NT but doesn't close
> the group window in Windows 98.? I've checked the class
> name on all three systems and it looks to me like the
> CabinetWClass classname I'm using is correct, even in 98.

> Does anyone have any idea why it's not working in 98?

This is not a documented way of closing the window, so Microsoft are
quite at liberty to do their own thing on WM_CLOSE processing. Why not
try the DDE Execute command ShowGroup("Group name",0). That's not
documented either but it seems to work on Win 95.
--
Roger Abbott, RHA (Minisystems) Ltd
http://www.rhaminisys.com
DDE FAQ and tools, DDE Client component for Visual Basic
Program launcher/setup menu, freeware, shareware

Sent via Deja.com http://www.deja.com/
Before you buy.

Re:Group window won't close in Win 98


Thanks for the suggestion Roger.

I tried what you suggested and you're correct that it does
close the group window in Win 95 (and Win NT) but it still
won't close it in Win 98.  I did notice that in Win 98 the
group window title doesn't contain just the window name
but also the full path, i.e.,

C:\WINDOWS\Start Menu\Programs\MyGroupName

I suppose I'll try to determine what operating system the
program is running on and if it's Win 98, extract the full path
to use in the ShowGroup call.  It seems like there ought to
be an easier way to do something so simple.

Harry

Roger Abbott <roge...@aol.com> wrote in article
<83adan$km...@nnrp1.deja.com>...

Quote
> In article <01bf4768$864fa280$c3266ad8@oemcomputer>,
>   "Harry Schwartz" <schwart...@SPAMsocketis.net> wrote:
> > I'm using DDE to set up a group (and items within the group).
> > I'd like for the group window that I've created to close at the
> > end of setup, so I tried the following

> > var
> >       h  THandle;
> > begin
> > ? h = FindWindow(PChar('CabinetWClass'),nil);
> > ? if h <> 0 then SendMessage(h,WM_CLOSE, 0, 0);
> > end;

> > This works OK in Windows 95 and NT but doesn't close
> > the group window in Windows 98.? I've checked the class
> > name on all three systems and it looks to me like the
> > CabinetWClass classname I'm using is correct, even in 98.

> > Does anyone have any idea why it's not working in 98?

> This is not a documented way of closing the window, so Microsoft are
> quite at liberty to do their own thing on WM_CLOSE processing. Why not
> try the DDE Execute command ShowGroup("Group name",0). That's not
> documented either but it seems to work on Win 95.
> --
> Roger Abbott, RHA (Minisystems) Ltd
> http://www.rhaminisys.com
> DDE FAQ and tools, DDE Client component for Visual Basic
> Program launcher/setup menu, freeware, shareware

> Sent via Deja.com http://www.deja.com/
> Before you buy.

Re:Group window won't close in Win 98


In article <01bf4821$145e2ca0$9c276ad8@oemcomputer>,
  "Harry Schwartz" <schwart...@SPAMsocketis.net> wrote:

Quote
> Thanks for the suggestion Roger.

> I tried what you suggested and you're correct that it does
> close the group window in Win 95 (and Win NT) but it still
> won't close it in Win 98.  I did notice that in Win 98 the
> group window title doesn't contain just the window name
> but also the full path, i.e.,

> C:\WINDOWS\Start Menu\Programs\MyGroupName

You need to be careful here. Whether or not the window title contains
the full path name is a user controlled option on Win 95, I guess it is
on 98 also. In View...Options.. you can check whether full path names
should be shown in the Explorer panes, and this applies to opened
program groups as well.

Quote
> I suppose I'll try to determine what operating system the
> program is running on and if it's Win 98, extract the full path
> to use in the ShowGroup call.  It seems like there ought to
> be an easier way to do something so simple.

> Harry

> Roger Abbott <roge...@aol.com> wrote in article
> <83adan$km...@nnrp1.deja.com>...
> > In article <01bf4768$864fa280$c3266ad8@oemcomputer>,
> >   "Harry Schwartz" <schwart...@SPAMsocketis.net> wrote:
> > > I'm using DDE to set up a group (and items within the group).
> > > I'd like for the group window that I've created to close at the
> > > end of setup, so I tried the following

> > > var
> > >  h  THandle;
> > > begin
> > > ? h = FindWindow(PChar('CabinetWClass'),nil);
> > > ? if h <> 0 then SendMessage(h,WM_CLOSE, 0, 0);
> > > end;

> > > This works OK in Windows 95 and NT but doesn't close
> > > the group window in Windows 98.? I've checked the class
> > > name on all three systems and it looks to me like the
> > > CabinetWClass classname I'm using is correct, even in 98.

> > > Does anyone have any idea why it's not working in 98?

> > This is not a documented way of closing the window, so Microsoft are
> > quite at liberty to do their own thing on WM_CLOSE processing. Why
not
> > try the DDE Execute command ShowGroup("Group name",0). That's not
> > documented either but it seems to work on Win 95.
> > --
> > Roger Abbott, RHA (Minisystems) Ltd
> > http://www.rhaminisys.com
> > DDE FAQ and tools, DDE Client component for Visual Basic
> > Program launcher/setup menu, freeware, shareware

> > Sent via Deja.com http://www.deja.com/
> > Before you buy.

--
Roger Abbott, RHA (Minisystems) Ltd
http://www.rhaminisys.com
DDE FAQ and tools, DDE Client component for Visual Basic
Program launcher/setup menu, freeware, shareware

Sent via Deja.com http://www.deja.com/
Before you buy.

Re:Group window won't close in Win 98


Roger,
You're correct again.  It doesn't make any difference in Win 95
whether the option is set to show full path or not - the group
window will still close with the call you suggested.

I visited your web site and it's obvious that you know your way
around DDE.  Do you know if it's possible to set up the group
and items in the group without ever opening the group window to
get it done?

Harry

Roger Abbott <roge...@aol.com> wrote in article
<83cvar$db...@nnrp1.deja.com>...

Quote
> In article <01bf4821$145e2ca0$9c276ad8@oemcomputer>,
>   "Harry Schwartz" <schwart...@SPAMsocketis.net> wrote:
> > Thanks for the suggestion Roger.

> > I tried what you suggested and you're correct that it does
> > close the group window in Win 95 (and Win NT) but it still
> > won't close it in Win 98.  I did notice that in Win 98 the
> > group window title doesn't contain just the window name
> > but also the full path, i.e.,

> > C:\WINDOWS\Start Menu\Programs\MyGroupName

> You need to be careful here. Whether or not the window title contains
> the full path name is a user controlled option on Win 95, I guess it is
> on 98 also. In View...Options.. you can check whether full path names
> should be shown in the Explorer panes, and this applies to opened
> program groups as well.

Re:Group window won't close in Win 98


The parameters for the DDE command ShowGroup are exactly those for
ShowWindow, and 0 is SW_HIDE. Why this does not work under Win98 I
don't know, I have tried it with a simple client program and have
confirmed your finding that it works only under Win 95 and NT. Maybe
you could use the API call ShowWindow(hWnd, SW_HIDE) instead of trying
to close it.

I can't see any way of creating a group without it becoming visible by
DDE.
--
Roger Abbott, RHA (Minisystems) Ltd
http://www.rhaminisys.com
DDE FAQ and tools, DDE Client component for Visual Basic
Program launcher/setup menu, freeware, shareware

In article <01bf48ac$ff9087a0$b9276ad8@oemcomputer>,
  "Harry Schwartz" <schwart...@SPAMsocketis.net> wrote:

Quote
> Roger,
> You're correct again.  It doesn't make any difference in Win 95
> whether the option is set to show full path or not - the group
> window will still close with the call you suggested.

> I visited your web site and it's obvious that you know your way
> around DDE.  Do you know if it's possible to set up the group
> and items in the group without ever opening the group window to
> get it done?

> Harry

> Roger Abbott <roge...@aol.com> wrote in article
> <83cvar$db...@nnrp1.deja.com>...
> > In article <01bf4821$145e2ca0$9c276ad8@oemcomputer>,
> >   "Harry Schwartz" <schwart...@SPAMsocketis.net> wrote:
> > > Thanks for the suggestion Roger.

> > > I tried what you suggested and you're correct that it does
> > > close the group window in Win 95 (and Win NT) but it still
> > > won't close it in Win 98.  I did notice that in Win 98 the
> > > group window title doesn't contain just the window name
> > > but also the full path, i.e.,

> > > C:\WINDOWS\Start Menu\Programs\MyGroupName

> > You need to be careful here. Whether or not the window title
contains
> > the full path name is a user controlled option on Win 95, I guess
it is
> > on 98 also. In View...Options.. you can check whether full path
names
> > should be shown in the Explorer panes, and this applies to opened
> > program groups as well.

Sent via Deja.com http://www.deja.com/
Before you buy.

Other Threads