Re: Windows Question Related to IDL [message #33338] |
Wed, 18 December 2002 12:33  |
Rick Towler
Messages: 821 Registered: August 1998
|
Senior Member |
|
|
"David Fanning" <david@dfanning.com> wrote
> Folks,
>
> Do you know when you start a windows application up,
> the icon and window title for those windows change,
> reflecting the new application? IDL's windows, for example,
> have the little green/red squares logo in front of what
> looks like a notebook (I don't know, don't ask me).
>
> Where do these windows find their icons? If I wanted
> to replace the IDL icon with an icon of my choosing,
> how would I do that? I presume this might be a register
> thing, but I don't really know where to look.
>
> Ideally, I would like to be able to create customized
> windows for my customer applications.
You would think the answer was in the registry. So much magic in there....
But it isn't. The icons you speak of are built into idlde.exe and
idlrt.exe. Most decent icon editors can make the change. I have used a
shareware program microangelo. For this specific program you open up your
.exe in the "librarian" and then select an icon to edit. You can edit both
the big (32x32) and little (16x16) icons. Note that sometimes only a single
32x32 icon is stored which in that case windows will scale that icon for the
16x16 title bar and application bar icons.
-Rick
|
|
|
Re: Windows Question Related to IDL [message #33340 is a reply to message #33338] |
Wed, 18 December 2002 12:46  |
Mark Hadfield
Messages: 783 Registered: May 1995
|
Senior Member |
|
|
"David Fanning" <david@dfanning.com> wrote in message
news:MPG.186a7fb72172929b989a7b@news.frii.com...
> Folks,
>
> Do you know when you start a windows application up, the icon and
> window title for those windows change, reflecting the new
> application? IDL's windows, for example, have the little green/red
> squares logo in front of what looks like a notebook (I don't know,
> don't ask me).
>
> Where do these windows find their icons? If I wanted to replace the
> IDL icon with an icon of my choosing, how would I do that? I presume
> this might be a register thing, but I don't really know where to
> look.
Does this help? (You're going to need to unwrap that URL before using
it.)
http://msdn.microsoft.com/library/default.asp?url=/library/e n-us/winui
/winui/windowsuserinterface/windowing/windows/windowreferenc e
/windowmessages/wm_seticon.asp
It refers to the WM_SETICON message, thusly:
An application sends the WM_SETICON message to associate a new large
or small icon with a window. The system displays the large icon in
the ALT+TAB dialog box, and the small icon in the window caption.
Syntax
To send this message, call the SendMessage function as follows.
[snip]
It's a long time since I tried to access the Windows API from IDL (and
I wasn't hugely successful when I did) but these days I might try
spawning a call to the Windows Scripting Host, which should be
available on later versions of Windows.
--
Mark Hadfield "Ka puwaha te tai nei, Hoea tatou"
m.hadfield@niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)
|
|
|