Posted on 2002-05-17 01:14:35 by NaN
Awesome, NaN! :alright:

Posted on 2002-05-17 01:29:30 by bazik
Excellent tutorial NaN! Well written and easy to read.:alright:

Posted on 2002-05-17 01:40:25 by Thomas
Love You
Posted on 2002-05-17 02:54:08 by purefiring
... NICE !!! :alright:
Thank you !
Posted on 2002-05-17 03:32:32 by PhoBos
its co0l :)

but i don't understand 1 thing.
When u create the class of the control u change cbWndExtra to 4 soo the system allocs 4 bytes blablabla... but where u gonna get a pointer to that 4 bytes?..

i know that the control allocs (HeapAlloc()) some space but only use this space... this means that the allocated bytes are the bytes from cbWndExtra ?

Posted on 2002-05-17 04:49:49 by coder
Nice control NaN!

One question however. I noticed you were using the API DrawFrameControl so I was curious as to why you are custom drawing the down arrow?

invoke _DrawTriangle, ebx

Just as an FYI on the off chance you did not know, DrawFrameControl will do this for you if you set the uType to DFC_SCROLL and uState to DFCS_SCROLLDOWN (exact same graphic and dimentions of the scroll down button in a scroll bar). My guess you do know about it and just wanted more control :grin:
Posted on 2002-05-17 09:47:35 by Graebel
well, great great work. :alright: :alright: :alright:

I've nothing else to say that have not been already said...
nice explaination, not hard to understand, well, that's great !!

ASM is still alive, and nobody can say the opposite !!

Thanks a lot for your work !!
Posted on 2002-05-17 09:56:29 by Vom-bonjour:-()
Thanx NaN
an interesting read
Posted on 2002-05-17 10:29:59 by Kudos
First, thank you for the warm welcome everybody ;)

It was a lot of work to but together, im glad its so well received.

Second, the questions ;)

coder7345: By telling in the class difinition that we want 4 'extra' bytes in every instnace of the class, the OS itself will make sure its there. I dont need to have the POINTER to these four bytes, what i need is the 4 byte of data AT this location ;) . I never actually have my hands on the pointer! This is because the OS does all the dirty work for you, using GetWindowLong and SetWindowLong. Usinging the GWL_USERDATA flag, the OS will look up and return the contents at found at this location. Since im using it to store the private memory, it returns the pointer to the private memory (as it contrents).
: Also check out the "extra" section in the included API references.

Graebel: Yes i noticed it has scrollbar modes, and played with them a bit, but i didnt like the look. The 3D appearance didnt fit symetrically with the 3D appearance of the Button box when using the same rectange to define the region. It looked sloppy, so i decided to go the route of two buttons, and since i only needed 9 pixels, i thought it would be simpler to draw it myself, and keep the control looking sharp ;) (( But good eye for noticing this ))

Everyone else, thanx again! If not custom controls themselves, i hope you can learn other tricks from it, there are a few ;)

PS: Please keep the questions comming if you have some related to how well i present an idea. Im my own editor, so it may be clear to me, but not the reader. I will make a revision if i get alot of questions, base any unclear descriptions *why* somthing happens.
Posted on 2002-05-17 13:53:07 by NaN
Well i see i got 123 downloads so far, so im glad its in demand. I also guess its written fairly clearly (you all can thank god for spell check ;) ~ if you know how i usually write).

Anywho, im just posting this to give it one more pass thu the main page, and then it will eventually reside on my web page.

I hope those who are reading/read it, enjoy it!
Posted on 2002-05-19 15:10:26 by NaN
Posted on 2003-11-11 02:23:42 by jefeng
thanks NaN for sharing :alright: , by the way the link to your hompage is broken.
Posted on 2003-11-11 20:23:28 by jack
Thanks.. I hope you all get something valuable for it. I realize my web page is down, some year I might get the patience to run another (Im personally tired of fighting free web space hosting and their ever changing rules. Its too much of a pain in the ar$e to continuously monitor and fix deletions that is against some *new* rule).

Some day i will buy some space and run it again.. till then there is this board... ;)
Posted on 2003-11-16 00:05:49 by NaN
1 word nan: thanx :alright:
Posted on 2004-01-08 01:48:00 by ti_mo_n
Haven?t read it yet, but it seems to be exactly what I was looking for. Thanks!
Posted on 2004-01-23 07:37:34 by Lykurg

Where can I get your tutorial? Can you give me a link? And thanks for such great work. I really want to learn to make custom controls.

Posted on 2005-04-22 14:09:18 by highenergy

I found the custom control tutorial tutorial for download here:

Posted on 2005-05-31 03:21:09 by programinator
Website is down, can anyone host this tutorial somewhere or send it in a mail so i can upload it somewhere?


Posted on 2005-11-16 15:45:50 by Scorpie
Hi Scorpie
I found it in one of my download directories. I hope it is complete...

Posted on 2005-11-16 16:03:15 by Biterider