Click here to Skip to main content
16,008,075 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: WM_USER+1 vs RegisterWindowsMessage Pin
Tomasz Sowinski1-Mar-02 11:15
Tomasz Sowinski1-Mar-02 11:15 
GeneralRe: WM_USER+1 vs RegisterWindowsMessage Pin
alex.barylski1-Mar-02 11:29
alex.barylski1-Mar-02 11:29 
GeneralRe: WM_USER+1 vs RegisterWindowsMessage Pin
Tomasz Sowinski1-Mar-02 11:34
Tomasz Sowinski1-Mar-02 11:34 
GeneralRe: WM_USER+1 vs RegisterWindowsMessage Pin
alex.barylski1-Mar-02 12:16
alex.barylski1-Mar-02 12:16 
GeneralRe: WM_USER+1 vs RegisterWindowsMessage Pin
Tomasz Sowinski1-Mar-02 12:23
Tomasz Sowinski1-Mar-02 12:23 
GeneralRe: WM_USER+1 vs RegisterWindowsMessage Pin
alex.barylski1-Mar-02 14:25
alex.barylski1-Mar-02 14:25 
GeneralRe: WM_USER+1 vs RegisterWindowsMessage Pin
Tomasz Sowinski2-Mar-02 1:31
Tomasz Sowinski2-Mar-02 1:31 
GeneralRe: WM_USER+1 vs RegisterWindowsMessage Pin
alex.barylski2-Mar-02 8:57
alex.barylski2-Mar-02 8:57 
Tomasz Sowinski wrote:
static_cast(GetParent())->DrawView(dc);

Your absolutely right...only I think I did it like:

((CMyView*)m_pParent)->OnDrawView();

which are the exact same thing I guess, only static_cast is more explicit I would assume.

However, the reason I must use messages was not just for performance. Trying to keep the 2 classes as versatile and re-useable as possible...calling the member functions directly would kinda break this general rule of thumb wouldn't it...?

But mostly...I absolutely have too...cuz...well OnDrawView is a protected member function.





"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
GeneralRe: WM_USER+1 vs RegisterWindowsMessage Pin
Michael Dunn1-Mar-02 11:36
sitebuilderMichael Dunn1-Mar-02 11:36 
GeneralRe: WM_USER+1 vs RegisterWindowsMessage Pin
alex.barylski1-Mar-02 12:02
alex.barylski1-Mar-02 12:02 
GeneralRe: WM_USER+1 vs RegisterWindowsMessage Pin
Tomasz Sowinski1-Mar-02 12:16
Tomasz Sowinski1-Mar-02 12:16 
GeneralRe: WM_USER+1 vs RegisterWindowsMessage Pin
alex.barylski1-Mar-02 12:21
alex.barylski1-Mar-02 12:21 
GeneralRe: WM_USER+1 vs RegisterWindowsMessage Pin
Tim Smith1-Mar-02 12:51
Tim Smith1-Mar-02 12:51 
GeneralRe: WM_USER+1 vs RegisterWindowsMessage Pin
Michael Dunn1-Mar-02 12:21
sitebuilderMichael Dunn1-Mar-02 12:21 
GeneralRe: WM_USER+1 vs RegisterWindowsMessage Pin
alex.barylski1-Mar-02 14:17
alex.barylski1-Mar-02 14:17 
QuestionBrief & Epsilon emulation in VisStudio.Net? Pin
1-Mar-02 11:10
suss1-Mar-02 11:10 
GeneralPreTranslateMessage Pin
alex.barylski1-Mar-02 9:34
alex.barylski1-Mar-02 9:34 
GeneralRe: PreTranslateMessage Pin
Paul M Watt1-Mar-02 10:12
mentorPaul M Watt1-Mar-02 10:12 
GeneralRe: PreTranslateMessage Pin
alex.barylski1-Mar-02 10:36
alex.barylski1-Mar-02 10:36 
GeneralRe: PreTranslateMessage Pin
alex.barylski1-Mar-02 10:45
alex.barylski1-Mar-02 10:45 
GeneralWinsock API Pin
jangel1-Mar-02 8:19
jangel1-Mar-02 8:19 
GeneralRe: Winsock API Pin
Nish Nishant1-Mar-02 13:00
sitebuilderNish Nishant1-Mar-02 13:00 
QuestionAre the STL classes thread-safe? Pin
Le centriste1-Mar-02 8:05
Le centriste1-Mar-02 8:05 
AnswerRe: Are the STL classes thread-safe? Pin
Nemanja Trifunovic1-Mar-02 8:04
Nemanja Trifunovic1-Mar-02 8:04 
GeneralCListCtrl question Pin
jafrazee1-Mar-02 7:56
jafrazee1-Mar-02 7:56 

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.