Click here to Skip to main content
15,913,091 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Don't EVER use the registry! Please Pin
thowra27-Oct-03 23:07
thowra27-Oct-03 23:07 
GeneralRe: Don't EVER use the registry! Please Pin
wogerdoger1-Nov-03 6:22
wogerdoger1-Nov-03 6:22 
GeneralCToolBar and different width buttons Pin
AJ12327-Oct-03 6:15
AJ12327-Oct-03 6:15 
GeneralRe: CToolBar and different width buttons Pin
Michael Dunn27-Oct-03 7:36
sitebuilderMichael Dunn27-Oct-03 7:36 
Generalsuclassing button at runtime Pin
CHAIGNEAU27-Oct-03 5:42
CHAIGNEAU27-Oct-03 5:42 
GeneralRe: suclassing button at runtime Pin
alex.barylski27-Oct-03 7:16
alex.barylski27-Oct-03 7:16 
GeneralRe: suclassing button at runtime Pin
CHAIGNEAU27-Oct-03 8:06
CHAIGNEAU27-Oct-03 8:06 
GeneralRe: suclassing button at runtime Pin
alex.barylski27-Oct-03 8:41
alex.barylski27-Oct-03 8:41 
Honestly the easiest way to accomplish OWNERDRAW buttons is to derive a class from CButton and override it's DrawItem() and then use class wizard to associate each button with a Control member variable, then change each variable type from CButton to CYourOwnButton and whola!!! all yer buttons should be drawn the way you want Smile | :)

If you insist on using a more dynamic approach you could just make all your command ID's fall within a certain range of values and call GetDlgItem() return it's handle and subclass the control this way. Why would you use this approach though? Are you using SDK only...? Or just for efficiency?

HTH

Cheers Smile | :)

I'm drinking triples, seeing double and acting single Cool | :cool:
GeneralRe: suclassing button at runtime Pin
CHAIGNEAU27-Oct-03 10:09
CHAIGNEAU27-Oct-03 10:09 
GeneralRe: suclassing button at runtime Pin
David Crow27-Oct-03 9:24
David Crow27-Oct-03 9:24 
GeneralRe: suclassing button at runtime Pin
CHAIGNEAU27-Oct-03 9:53
CHAIGNEAU27-Oct-03 9:53 
GeneralRe: suclassing button at runtime Pin
David Crow27-Oct-03 9:57
David Crow27-Oct-03 9:57 
GeneralRe: suclassing button at runtime Pin
CHAIGNEAU27-Oct-03 10:06
CHAIGNEAU27-Oct-03 10:06 
GeneralRe: suclassing button at runtime Pin
David Crow27-Oct-03 10:16
David Crow27-Oct-03 10:16 
GeneralRe: suclassing button at runtime Pin
CHAIGNEAU27-Oct-03 10:43
CHAIGNEAU27-Oct-03 10:43 
GeneralRe: suclassing button at runtime Pin
alex.barylski27-Oct-03 11:33
alex.barylski27-Oct-03 11:33 
GeneralRe: suclassing button at runtime Pin
David Crow27-Oct-03 13:00
David Crow27-Oct-03 13:00 
Generaldialog, dialogbar, or toolbar Pin
MJohn1029627-Oct-03 5:36
MJohn1029627-Oct-03 5:36 
Generalembedded mysql server Pin
niklo27-Oct-03 5:17
niklo27-Oct-03 5:17 
GeneralRe: embedded mysql server Pin
alex.barylski27-Oct-03 7:09
alex.barylski27-Oct-03 7:09 
GeneralRe: embedded mysql server Pin
niklo27-Oct-03 20:47
niklo27-Oct-03 20:47 
Generalproblem in file scanning Pin
karteek27-Oct-03 4:07
karteek27-Oct-03 4:07 
GeneralRe: problem in file scanning Pin
David Crow27-Oct-03 4:13
David Crow27-Oct-03 4:13 
GeneralRe: problem in file scanning Pin
karteek27-Oct-03 5:38
karteek27-Oct-03 5:38 
GeneralRe: problem in file scanning Pin
David Crow27-Oct-03 6:15
David Crow27-Oct-03 6:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.