Click here to Skip to main content
15,891,567 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralCustom Word toolbars Pin
AlanW2-Apr-02 4:47
AlanW2-Apr-02 4:47 
GeneralRe: Custom Word toolbars Pin
dlhson2-Apr-02 5:16
dlhson2-Apr-02 5:16 
GeneralCComboBox Font Pin
Stew2-Apr-02 4:25
Stew2-Apr-02 4:25 
GeneralRe: CComboBox Font Pin
Mazdak2-Apr-02 4:36
Mazdak2-Apr-02 4:36 
GeneralRe: CComboBox Font Pin
Stew2-Apr-02 4:40
Stew2-Apr-02 4:40 
GeneralRe: CComboBox Font Pin
dlhson2-Apr-02 5:08
dlhson2-Apr-02 5:08 
QuestionHow would you approach this situation? Pin
User 98852-Apr-02 4:17
User 98852-Apr-02 4:17 
AnswerRe: How would you approach this situation? Pin
Mukkie2-Apr-02 5:12
Mukkie2-Apr-02 5:12 
Hi!

Maybe: define base class for translating commands into strings:
class ICmdProtocol;

redefine method in the command class:

CString toString( IProtocol * );

And now, move the conversion implementation from command itself to protocol, or to command based on actual protocol.
You can always define current protocol for all commands too (as static pointer in base class for example).

Hope this helps

Mukkie
AnswerRe: How would you approach this situation? Pin
Joaquín M López Muñoz2-Apr-02 5:52
Joaquín M López Muñoz2-Apr-02 5:52 
GeneralRe: How would you approach this situation? Pin
User 98852-Apr-02 5:56
User 98852-Apr-02 5:56 
GeneralRe: How would you approach this situation? Pin
Joaquín M López Muñoz2-Apr-02 6:05
Joaquín M López Muñoz2-Apr-02 6:05 
GeneralRe: How would you approach this situation? Pin
Tim Smith2-Apr-02 6:15
Tim Smith2-Apr-02 6:15 
GeneralExcel to PDF Pin
Giles2-Apr-02 4:07
Giles2-Apr-02 4:07 
GeneralRe: Excel to PDF Pin
dlhson2-Apr-02 6:36
dlhson2-Apr-02 6:36 
GeneralRe: Excel to PDF Pin
Giles2-Apr-02 8:26
Giles2-Apr-02 8:26 
GeneralMessageBox Question Pin
sriram_mr2-Apr-02 4:13
sriram_mr2-Apr-02 4:13 
GeneralRe: MessageBox Question Pin
Navin2-Apr-02 4:24
Navin2-Apr-02 4:24 
GeneralRe: MessageBox Question Pin
Navin2-Apr-02 4:29
Navin2-Apr-02 4:29 
GeneralRe: MessageBox Question Pin
sriram_mr2-Apr-02 4:34
sriram_mr2-Apr-02 4:34 
GeneralRe: MessageBox Question Pin
Jeremy Falcon2-Apr-02 5:11
professionalJeremy Falcon2-Apr-02 5:11 
GeneralThere is a very simple solution.. Pin
SeNs2-Apr-02 8:56
SeNs2-Apr-02 8:56 
GeneralOFNHookProc Pin
Anthony98872-Apr-02 4:07
Anthony98872-Apr-02 4:07 
GeneralDialogs in MDI app have gray titlebar Pin
Jack Handy2-Apr-02 3:55
Jack Handy2-Apr-02 3:55 
GeneralRe: Dialogs in MDI app have gray titlebar Pin
dlhson2-Apr-02 5:50
dlhson2-Apr-02 5:50 
GeneralRe: Dialogs in MDI app have gray titlebar Pin
Jack Handy2-Apr-02 11:21
Jack Handy2-Apr-02 11:21 

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.