Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 17 AUG 2001 06:46:39AM Oystein Reigem wrote:

From where does the Msg function get its icons? Windows resources? I need a message box a bit different from the standard one. So I'll make one myself. But I want it to be able to display the same icons as the standard one. How can my dialog get hold of these icons?

- Oystein -


At 17 AUG 2001 11:04AM Simon Wilmot wrote:

I don't know, but judging from the WinExe for MSG, I would guess that the system gets window defaults for the appropriate icons and displays them.

Simon

RebusHR


At 20 AUG 2001 05:30AM Oystein Reigem wrote:

Simon,

Not sure how you can see that from the Msg window exe. The Msg SP source, on the other hand, turns out to be useful. Stupid me didn't remember I had it. I can just copy the part I need. Or I can make my own version of the Msg SP.

So thanks for spurring me on.

What the Msg SP does is to take the BITMAP control of the Msg dialog, change its structure so it will show the proper icon, then destroy and recreate the control. Plain sailing for me as long as I can just copy the source.

One of the changes the Msg SP does to the BITMAP control is to say the image should no longer be BMPS\DEFAULT.BMP, but e.g, EXCLAMATION. I assume when OI discovers the image isn't in some explisitely named file, like BMPS\DEFAULT.BMP, it's in some resource instead. But how it goes about from there I still don't know.

For the current purpose I don't need to know, of course.

But it could be useful for later if somebody could tell me how to use an image that's in some known resource file (DLL or whatever it has to be).

- Oystein -


At 20 AUG 2001 05:49AM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:

Oystein,

To use resources from a DLL set the repository sub-key to something like this:

mylib.dll#resourceid

eg…

zzres.dll#tabhdr100

for an image called tabhdr100 in ZZRES.DLL

Basically for an image or icon just replace the path and file name with a dll resource id as above. We use this technique all the time (like in the S/List Workspace for example.

The Sprezzatura Group

World leaders in all things RevSoft

www.sprezzatura.com_zz.jpg


At 20 AUG 2001 06:24AM Oystein Reigem wrote:

Thanks!

I knew I have seen this somewhere, but didn't know where/how to search.

Well, I could have mailed you directly, of course… :-)

- Oystein -

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/71e44df842b8ced885256aab003b3435.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1