Click here to Skip to main content
15,915,603 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralSite Administration Pin
Abbas_Riazi28-Jan-03 4:35
professionalAbbas_Riazi28-Jan-03 4:35 
GeneralRe: Site Administration Pin
#realJSOP28-Jan-03 4:55
professional#realJSOP28-Jan-03 4:55 
GeneralRe: Site Administration Pin
Abbas_Riazi28-Jan-03 5:02
professionalAbbas_Riazi28-Jan-03 5:02 
Questionhow to disable button on CDlgBar? Pin
gjun lee28-Jan-03 4:03
gjun lee28-Jan-03 4:03 
AnswerRe: how to disable button on CDlgBar? Pin
Rage28-Jan-03 4:16
professionalRage28-Jan-03 4:16 
GeneralRe: how to disable button on CDlgBar? Pin
gjun lee28-Jan-03 5:01
gjun lee28-Jan-03 5:01 
GeneralLocation of call to base class Pin
ns28-Jan-03 4:02
ns28-Jan-03 4:02 
GeneralRe: Location of call to base class Pin
Rage28-Jan-03 4:24
professionalRage28-Jan-03 4:24 
It mainly depends on the function. In the example you showed, it could matter if you are doing changes on what is done in the base class function, which is almost unprobable. So changing the order is rather harmless. But look at the following example :
CMyDialog::OnOK()

{
...
pWApp->WriteProfileInt("Settings","Window width",m_width);
CDialog::OnOK();
}
compared to
CMyDialog::OnOK()

{
...
CDialog::OnOK();
pWApp->WriteProfileInt("Settings","Window width",m_width);
}
In the first case, you write settings in the registry before calling the base class function. In the second case, you do it after, and your settings are never saved, since CDialog::OnOK() close the window. Unsure | :~

In some overrided, you have to comment out the call to base class, for example to change the cursor in OnSetCursor, otherwise your changes won't apply.

I would recommand you to insert your code where the comments invite you to do it, unless you're absolutely sure of what you're doing. Roll eyes | :rolleyes:


~RaGE();
GeneralThanks!Really helpful info Pin
ns28-Jan-03 4:50
ns28-Jan-03 4:50 
GeneralCentering the Cview in MDI Pin
ns28-Jan-03 3:56
ns28-Jan-03 3:56 
GeneralHelp with CString!!! Pin
Lucky200228-Jan-03 2:17
Lucky200228-Jan-03 2:17 
GeneralRe: Help with CString!!! Pin
HENDRIK R28-Jan-03 2:23
HENDRIK R28-Jan-03 2:23 
GeneralRe: Help with CString!!! Pin
#realJSOP28-Jan-03 2:28
professional#realJSOP28-Jan-03 2:28 
GeneralRe: Help with CString!!! Pin
HENDRIK R28-Jan-03 2:36
HENDRIK R28-Jan-03 2:36 
GeneralRe: Help with CString!!! Pin
Lucky200228-Jan-03 3:02
Lucky200228-Jan-03 3:02 
GeneralRe: Help with CString!!! Pin
#realJSOP15-May-07 2:01
professional#realJSOP15-May-07 2:01 
GeneralRe: Help with CString!!! Pin
Lucky200228-Jan-03 3:01
Lucky200228-Jan-03 3:01 
Generalredirect user I/O to a temporary ‘buffer’ Pin
rohit.dhamija28-Jan-03 2:09
rohit.dhamija28-Jan-03 2:09 
GeneralRe: redirect user I/O to a temporary ‘buffer’ Pin
Mike Nordell28-Jan-03 2:19
Mike Nordell28-Jan-03 2:19 
GeneralRe: redirect user I/O to a temporary ‘buffer’ Pin
jhwurmbach28-Jan-03 5:03
jhwurmbach28-Jan-03 5:03 
Generalhelp!!! Pin
xxhimanshu28-Jan-03 1:54
xxhimanshu28-Jan-03 1:54 
GeneralRe: help!!! Pin
Rage28-Jan-03 1:58
professionalRage28-Jan-03 1:58 
GeneralRe: help!!! Pin
xxhimanshu28-Jan-03 2:04
xxhimanshu28-Jan-03 2:04 
GeneralRe: help!!! Pin
Rage28-Jan-03 2:31
professionalRage28-Jan-03 2:31 
GeneralEncrypt password Pin
Wim Jans28-Jan-03 1:34
Wim Jans28-Jan-03 1:34 

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.