well after some ... time here is

owner drawn Sliders example download it here:
Posted on 2003-04-18 21:56:20 by Nguga
Sorry, but it crashes on win98SE. I tried to quicky debug it with OleDbg and it complained about it as being some odd-ball exe with code outside the declaired PE section. I didnt try any harder than this.... me shrugs.

Posted on 2003-04-18 23:17:14 by NaN
I like them Nguga, they don't crash on Win2KSP3. Have you noticed that if you hold down the mouse button and continue to move down well past the bottom of the window the tumb will disappear and the numbers will start to increment again. Other than that very nice look.
Posted on 2003-04-19 17:18:20 by donkey


i have used ebx in some rotins and did not preserve ebx it was becouse of that it crash on win98 and did work on XP ... strange mmm ,

NOW it runs on XP and win98 :) !!

-> donkey , this one works ok :)

-> NaN i use OllyDbg v 1.04 it works ok :)

download it here:
Posted on 2003-04-19 18:17:44 by Nguga
this is the final version know i think is everything ok

we drag the slider grabing the bitmap slider at midle ;-)

download it here:
Posted on 2003-04-19 19:38:25 by Nguga
Works alot better! Good work. Only critisism i can offer is it seem to have a hard time reaching 0 and 100. It tends to let go at 96...

Other than this it works and looks great! Good work!

PS: You should edit your past replies and delete the attachments that are out-dated. It will make it easy for new readers to find the right zip, as well as save board space. ;)

Posted on 2003-04-19 22:03:13 by NaN
here is the same example but for Dialog based program

Thanks NaN !!! :)

download it here :
Posted on 2003-04-21 20:46:20 by Nguga
Another comment,

You should package your bitmaps into the resource file. Then you can load them strainght from the process instance with LoadBitmap. (It helps keep it a stand alone package).


1601 BITMAP DISCARDABLE "D:\\masm32\\_active\\image.bmp"

and the basic code:

invoke LoadBitmap, hInstance, 1601

Thats all ther really is to it. Just dont forget to Destroy them when your done.
Posted on 2003-04-22 00:00:35 by NaN
hi !

NaN i know that , but i did load from file becouse i was always thinking about the
possibility to build new drawn background skin and slider button , so the users
could built their own skin ...

ha i normaly do like this:


skin BITMAP "main.bmp"


call LoadBitmapA, , "skin"

and it works in NASM ( using NAGOA.INC ) ;)


what means DISCARDABLE ? what is the diference from what i made above?

you also said to destroy them at the end , does that mean :

call SelectObject, ,

then at the end

call DeleteObject,


thanks NaN !!! :)
Posted on 2003-04-22 08:23:53 by Nguga
Nguga, loading resources like that loads by string, it's more efficient to load by numeric ID. You should define these in the .rc file or a header, hardcoding them like NaN did in his example == bad.
Posted on 2003-04-22 08:47:37 by f0dder
I'm full of bad habbits :grin:
Posted on 2003-04-22 17:24:59 by NaN
just to thank you BOTH :)

know i will open if i can the ROUND KNOB SLIDER

i think i will use a bakground image 3D of a static ROUND KNOB

then i will move a litle round bitmap point "o" to simulate that knob moves

the code must be very equal to the slider control i did , but then i have to aply
some maths .. so that the point "o" moves circular .

Posted on 2003-04-23 20:53:05 by Nguga