0

I have successfully created an owner drawn button.

But how do I now draw/color the darn thing, to make it look like a Button using the Windows API? Currently, it just looks like a colored label?

Any C examples?

2
  • Curious why you are doing this in the first place? The usual reason for creating an owner-draw control is because you don't want it to look like a standard control. But if you want this to look like a standard button, then why not just use a standard button? Commented Apr 19, 2011 at 0:50
  • "Curious why you are doing this in the first place?": (Windows7) The end language that i'll be using (HotBasic) doesnt facilitate this .color and .textColor for BUTTONs. So I need to get into API to make them pretty. I can read "C" code and then translate it into HotBasic. Thanks...Vernon Commented Apr 19, 2011 at 16:47

2 Answers 2

2

Sounds like you're looking for DrawFrameControl. For the cool, Vista/7-looking controls, look at uxtheme.dll.

Sign up to request clarification or add additional context in comments.

2 Comments

Ok, will check back after a while. Thanks...Vernon
Chnage look or color in my answer
1

For the modern-looking buttons, just copy/paste this into your source:

#pragma comment(linker,"\"/manifestdependency:type='win32' \ name='Microsoft.Windows.Common-Controls' version='6.0.0.0' \ processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") 

Well, unless you want to memorize it...

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.