tags:

views:

67

answers:

2

Hello guys,

Can anybody help, I'd like to write my own beautiful control, f.e. nonrectangle button (more beautiful). and it will be in another file (dll), for future use.

The biggest problem is, that it will change design (color) when mouse cursor on it))

plz, help

Galym

+1  A: 

It's relatively easy. If you want the same behaviour as a button (click, hover etc etc), then the best bet is to subclass the button control.

Have a read of the following MSDN articles:

http://msdn.microsoft.com/en-us/library/bb773183.aspx
http://msdn.microsoft.com/en-us/library/ms997565.aspx
http://msdn.microsoft.com/en-us/library/ms633569.aspx

Mark Ingram
A: 

Thank You, Mark

as i understand, its already compliled external class, am i right?

I'd like my own, not defined like HWND hWNd = CreateWindowEx(.....)

f.e. like in C# class myButton { void onClick(){do something} void onMouseMove(){do something} void onPaintBackground or onPaint() {do something} }

and so one:))))

Galymzhan