You text - offset macro looks very usefull.
hListBoxes dd 3 dup (?); (my fault I forgot dups)
number db 6 dup (?) ;(number can be placed here now)
I add ability to create API string not only by dblclk but also by pressing keyspace
(I found it more comfortable for me since I didn't make scroll and scrolling by keyboard;
and absilutly all thing can be done by keyboard now ;Esc - close; tab browse through
list boxes and edit; when focus on edit it's selected if part need shift key + arrow of ctrlarrow
may be used)
I send code in case you want to add it to your version.
- add to end of Dlg proc code from source starting with @@VKEYTOITEM
- add lable @vk before

mov esi,SendMessage
mov edi,lParam

- after dblclk code you must return - 2
In code you can see it all I just want to stress some points.


Strange thing - without obvious reason your prog is loading ~3 times slower.
I failed to figure out what is the cause, we yet need to find it.
Posted on 2002-05-14 22:09:50 by The Svin
bitRake explaned the purpose of the small utility very well,
it's for case you want to use resources that already exist, so you don't need waste space for what is already supplied by system.
While there is reason that you may use your own code instead of some API in case you can write it better, there is no reason to put in resource section of your app bitmaps,icons and cursors that is already in system - that wouldn't make them better.
The only features it supplies -
1. Group them together in one place so that you find it faster
than searching for their constants in inc or hlp files (those files
loaded also much slower)
For example when you start to create window and need fill some
values in WNDCLASSEX struct - you can load it and do it with couple keystrokes.
2. To see how they look, 'cause it is not obvious looking only at their names.
3. To see shared resources that your hlp or inc file might miss for some reason.
4. Fast create api call string ensure no errors.

That is all humble purpose of it.
Posted on 2002-05-14 22:21:48 by The Svin
I forgot 1 thing: you need add LBS_WANTKEYBOARDINPUT
to listxes styles.
Posted on 2002-05-14 23:20:18 by The Svin
I made a little addition so it be easier to spot what list has currently focus when novigating using tab.
Posted on 2002-05-15 06:02:58 by The Svin
Svin, it is slower because I am checking a larger range of resources. Added the changes you suggested and made some small changes to @@VKEYTOITEM and selection exclusion to see better which list has focus.

Added Features:
    [*]Space to select[*]Only one selected item
Posted on 2002-05-15 20:48:05 by bitRAKE
BitRake GREAT macro :alright: . helps me alot . do you have somemore beautiful things like that


Posted on 2002-05-16 07:49:15 by eko
eko, it's not mine - I found it here.
Original author is huh, iirc.
I just use it every chance I get! :tongue:

I thought someone would have said something about the ordered list search routine, but maybe nobody understands it? (I know I don't.) :grin:
; divide and conquer approach to finding:

_0: dec edi
_1: inc esi
cmp esi,edi
lea ecx,[esi + edi]
jge @notfound
shr ecx,1 ; (a+b)/2
cmp [edx + ecx*8],eax
xchg ecx,esi ; top half
jc _1
lea ecx,[ecx-1]
mov edi,esi ; bottom half
mov esi,ecx
jne _0
I have a better version around here somewhere - just threw this one together off the top of my head. If you know the list has a power of two items then it's a shorter algo. :)
Posted on 2002-05-16 07:55:52 by bitRAKE
thanks for the very useful utility svin. anyways ive put it to good use today and was wondering where the heck is the close button bitmap? there is a minimize, restore, maximize but i havent been able to find the close(just the little X). does this one exist as a system OBM_ ?
Posted on 2002-05-22 01:12:57 by smurf