Another simple utility.
To choose System resources to load looking at them and their constants.

Source included (one can be surprised how short it is)

Simple advises:
Choose list box with needed resource type by tab
Browse choosen type resorses using up down keyboard keys
Create Api call string by dblclick on selected constant.
I hope you can find some use of it. (I did)
Posted on 2002-05-14 00:09:46 by The Svin
Thanks Svin, this apps gonna come in handy!:alright:

Posted on 2002-05-14 00:18:54 by JamesE
Thanx Svin, another hit! ;)

I was just wondering if this was in the system or not (for my edit control)

invoke LoadBitmap,0,32761

Thanx again! Great work!
Posted on 2002-05-14 00:56:40 by NaN
You are wellcome.
Here is the same app but shorter and faster.
I don't include source, 'cause it is the same, the difference is that it use direct call without jmp table.
Posted on 2002-05-14 01:07:36 by The Svin
I add ability to create Api call by pressing space key.
This make possible to work with the app using keyboard only.
(tab, arrowkeys and space, to close - escape)
Posted on 2002-05-14 02:41:17 by The Svin
What about adding ability to look up the symbolic equates for the resources?
Posted on 2002-05-14 05:41:03 by f0dder
The program doesn't use the symbols itself.
The are no symbols in source.
To add equates not a problem if answer for two qestions found
1. What if system has resources for what is no symbolic equates?
(there are some - if you change search range you can see)
2. Why do you need symbolic description if you can see the picture itself by your own eyes?
Posted on 2002-05-14 06:19:03 by The Svin
Hm, I wouldn't use a resource for which there is no equate, as that
smells "undocumented", and might change in future windows versions.
(Or, if I wanted to use it, I would rip it and include it in my own program).

Why do I prefer symbolic description? Imo makes it easier to read
the source "some weeks" later and see which resource you're using :).
Posted on 2002-05-14 06:35:20 by f0dder
Hm, I wouldn't use a resource for which there is no equate

Here we go again.
1. Symbolic equate is something from doc and include file,
it maybe in one file and not in another.
For example you can not find symbols for setting check box in listview not in not in Comctl.h though anybody who works with in no that it is SELECTED shl 12.
And I have 1000s other examples.
The same with dlg esc and enter etc.
To say more 1000s undoc. functions now doced and it was all the way this way with M$ products - they make the best functions undocumented, and usually keeps then unlike for documented ones.
2. Since my short programming life started I saw a lot of "documented" values that not supported anymore, and only one
"undocumented" known to very limited circle of people that was in NT4 and not in Windows 2000 sp 2.
3. Main thing - the question was not about what you going to use or not - the question was how do you want the app to behave if it found system shared resource and not have symbol for it?
Posted on 2002-05-14 06:57:33 by The Svin
Missing_Corner_Do_Hicky equ 32761


invoke LoadBitmap,NULL,Missing_Corner_Do_Hicky

PS: If M$ changes its # anyways, it will take me 4 minuits to change and recomiple on the fateful day i realizing it.
Posted on 2002-05-14 09:12:27 by NaN
Sure NaN, and it wont be a trouble for internal-use tools... but imagine
a medium or large program that is distributed in public, or (even
worse) a commercial app... things migt end up looking weird on some
windows versions and correct on some other.

Microsoft might or might not change the numbers and add/remove
resources, but I feel more comfortable ripping "undocumented"
resources. My choice.
Posted on 2002-05-14 09:33:00 by f0dder
I ask you for the third time:
How do you want the program to behave if it meat unknown values?
Filter them out or what?
If this way - give me full list of known and trusted by you constants for the resources - 'cause in different docs there are different packs of them.
Posted on 2002-05-14 09:58:31 by The Svin
The app should only show equates when they are available, and
show them as a comment after the sample invoke line. Symbolic
values would be achieved from header / include files (parsing C
headers wouldn't be all that fun manually, and some work to do
programatically... and of course for some values there would be
multiple possible symbols).

Is there really so big discrepancies between various docs? My programs
tend to either use very little graphics, or fully custom (or ripped)
graphics, so I've not run into trouble with (non?)standard system
resources before.
Posted on 2002-05-14 10:09:22 by f0dder
So, as i understand it then, the midpoint here is:

-Use the tool to get the resource NOW.
-Rip the resource into a bitmap/icon
-Pack it into your exe so M$ wont get you ;)

Posted on 2002-05-14 10:20:38 by NaN
Saving to bmp/ico/cur would be a nice thing to add... ;)
Posted on 2002-05-14 10:23:01 by JCP
NaN, that's how I would do it - at least it would be safe, and there
would be no need to add a bunch of extra code to svin's nice utility.
Posted on 2002-05-14 10:23:21 by f0dder
One of the purposes of Svin's utility is to use existing resources. There are several tools on the web to rip resources from executables, but this would just duplicate existing resources.

On WinXP I can not find documented values for:

32732, 32731, 32661, 32660, 32559

32631 (OCR_PEN?)
32651 thru 32663
Posted on 2002-05-14 11:12:48 by bitRAKE
I have 2 questions really:
1) If MS did decide to change the equates for their resources, wouldn't that mess up all of *their* programs as well as for bigger companies like Adobe, Corel, etc?? I see it much more likely that they would change the look of each bitmap/icon/cursor to freshen up the OS (doesn't XP do this???)

2) Has anyone been able to change the bitmaps used by their application for standard things like the minimize/maximize boxes, close box, etc?? And I don't mean a skinnable window or owner drawn scroll bars. I mean if I don't like the close button, can I change *just* that by changing a dword pointer somewhere??

Posted on 2002-05-14 12:34:22 by chorus
Here you go f0dder - I've added the EQU names. :)
Hope you don't mind Svin.

Edit: previous one had a buggie - I squash.
Please, try another byte, it tastes better now.

Edit: In post further down - many changes.
Posted on 2002-05-14 17:13:28 by bitRAKE
weeh :)
Posted on 2002-05-14 17:57:40 by f0dder