Click here to Skip to main content
15,919,434 members
Home / Discussions / Article Writing
   

Article Writing

 
GeneralRE: Sending Formatted text through MAPI Pin
willi wacker7-Mar-00 20:48
willi wacker7-Mar-00 20:48 
QuestionThread pool? Pin
Member 252283214-Jan-00 5:11
Member 252283214-Jan-00 5:11 
AnswerRE: Thread pool? Pin
Andreas16-Feb-00 3:38
Andreas16-Feb-00 3:38 
QuestionProtected Storage API? Pin
Andrei Stcherbatchenko29-Dec-99 14:44
Andrei Stcherbatchenko29-Dec-99 14:44 
Generaldatabase & database cursor Pin
Valentin Rozescu13-Dec-99 4:04
Valentin Rozescu13-Dec-99 4:04 
Generalplaying multiple notes from memory Pin
Laura Michaels20-Dec-99 4:03
sussLaura Michaels20-Dec-99 4:03 
GeneralSuperclassing Pin
Ivan A. Fotan19-Dec-99 3:19
Ivan A. Fotan19-Dec-99 3:19 
GeneralRE: Superclassing Pin
Andrei Zenkovitch20-Dec-99 5:32
Andrei Zenkovitch20-Dec-99 5:32 
Derive your class from CButton. Then you have to guarantee that your button is always created using BS_OWNERDRAW style (if button is created explicitely using Create() function you might override PreCreateWindow() in order to do that, otherwise when button is being subclassed, e.g. in DDX/DDV engine, you have to override PreSubclassWindow() and put there an assert that checks for BS_OWNERDRAW style).

As long as BS_OWNERDRAW style is set Windows will send your button WM_DRAWITEM message in which you have to draw the button. MFC provides virtual DrawItem() function that you need to override in order to handle WM_DRAWITEM message.

From this point you are on your own in terms of providing drawinf implementation and handling the mouse and keyboard input in any specific way (of course, if you need to).

Above mentioned details of implementation are valid only if you use MFC in your development. Using straight SDK you would need to take basically the same steps. But of course you need to handle all corresponding messages (WM_CREATE, WM_DRAWITEM) explicitly in your window procedure.

Regards
Andrei Zenkovitch
Dundas Software
==================
The original message was:

How can I derive (superclass) my own class of windows from standard BUTTON class, for example, and change its look (for example: buttons and other controls in Microsoft Money).
QuestionDoes anyone have: mpeg decoding source code (C++)? Pin
kai16-Dec-99 5:48
kai16-Dec-99 5:48 
GeneralNew cool Windows 2000 Open File Dialogs with MFC Pin
Member 466015-Dec-99 5:05
Member 466015-Dec-99 5:05 
GeneralRE: New cool Windows 2000 Open File Dialogs with MFC Pin
Erik Thompson15-Dec-99 9:34
sitebuilderErik Thompson15-Dec-99 9:34 
GeneralRE: New cool Windows 2000 Open File Dialogs with MFC Pin
Jesse Ezell15-Dec-99 11:53
Jesse Ezell15-Dec-99 11:53 
GeneralRE: New cool Windows 2000 Open File Dialogs with MFC Pin
Andrei Zenkovitch20-Dec-99 5:49
Andrei Zenkovitch20-Dec-99 5:49 
GeneralRE: New cool Windows 2000 Open File Dialogs with MFC Pin
Jeremy Davis16-Feb-00 22:42
Jeremy Davis16-Feb-00 22:42 
GeneralRe: New cool Windows 2000 Open File Dialogs with MFC Pin
Thomas Freudenberg14-Apr-00 5:25
Thomas Freudenberg14-Apr-00 5:25 
Generalclass CBitmapDC : public CDC Pin
Jason Hattingh11-Jan-00 0:19
sussJason Hattingh11-Jan-00 0:19 
GeneralRE: class CBitmapDC : public CDC Pin
RAJIV16-Jan-00 10:26
RAJIV16-Jan-00 10:26 
GeneralRE: class CBitmapDC : public CDC Pin
Chris Maunder9-Feb-00 13:03
cofounderChris Maunder9-Feb-00 13:03 
QuestionRichEditCtrl - pasted text not visible initially!? Pin
Steve Roach5-Jan-00 2:24
Steve Roach5-Jan-00 2:24 
AnswerRE: RichEditCtrl - pasted text not visible initially!? Pin
Wes Rogers17-Jan-00 12:47
Wes Rogers17-Jan-00 12:47 
GeneralList files in project Pin
Vern Sauder4-Jan-00 12:12
sussVern Sauder4-Jan-00 12:12 
GeneralDatabase code Pin
shahzad11-Dec-99 5:05
shahzad11-Dec-99 5:05 
GeneralRE: Database code Pin
michaels3-Feb-00 5:00
michaels3-Feb-00 5:00 
GeneralRe: Working on it Pin
PeterK21-Apr-00 7:55
PeterK21-Apr-00 7:55 
Generalxml code generator Pin
David Hubbard10-Dec-99 5:00
David Hubbard10-Dec-99 5:00 

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.