Click here to Skip to main content
15,902,447 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: buffer returning empty, doesn't exist on registry function when running in release, c++ win32 Pin
jkirkerx27-Apr-12 6:57
professionaljkirkerx27-Apr-12 6:57 
GeneralRe: buffer returning empty, doesn't exist on registry function when running in release, c++ win32 Pin
Richard MacCutchan27-Apr-12 22:57
mveRichard MacCutchan27-Apr-12 22:57 
GeneralRe: buffer returning empty, doesn't exist on registry function when running in release, c++ win32 Pin
jkirkerx4-May-12 12:17
professionaljkirkerx4-May-12 12:17 
GeneralRe: buffer returning empty, doesn't exist on registry function when running in release, c++ win32 Pin
Richard MacCutchan4-May-12 23:07
mveRichard MacCutchan4-May-12 23:07 
GeneralRe: buffer returning empty, doesn't exist on registry function when running in release, c++ win32 Pin
jkirkerx5-May-12 7:55
professionaljkirkerx5-May-12 7:55 
QuestionCalls to Vitual "overridable" of methods Pin
ForNow26-Apr-12 7:51
ForNow26-Apr-12 7:51 
AnswerRe: Calls to Vitual "overridable" of methods Pin
Albert Holguin26-Apr-12 8:15
professionalAlbert Holguin26-Apr-12 8:15 
AnswerRe: Calls to Vitual "overridable" of methods Pin
Chuck O'Toole26-Apr-12 10:14
Chuck O'Toole26-Apr-12 10:14 
In addition to what Albert said, language-wise you are "overriding" a virtual function. In the language, that means you are replacing the functionality provided by the base class with your own implementation. In many examples in courses this is what they show, overriding.

In this instance, and in many such classes in the Microsoft Framework, you are, in reality, "extending" the functionality provided by the base class. So, the base class is giving you the opportunity to do *more stuff* than it would do but it still wants to do it's own stuff too. Hence you need to call the base class explicitly to let it do it's stuff. And, as Albert said, whether you call it first or last depends on the functionality you are extending so the documentation / example should help.

For example, every MFC dialog can have an function that handles the event of "InitDialog", the OnInitDialog() function. Since you want to allow the base CDialog class to do its initialization first, the very first thing you should do in your "OnInitDialog()" is to call CDialog::OnInitDialog().

That is the difference between the language defining "Virtual Functions" and an implementaion of a feature (Asynchronous Sockets) using virtual functions to obtain the desired effect.
GeneralRe: Calls to Vitual "overridable" of methods Pin
Albert Holguin26-Apr-12 10:19
professionalAlbert Holguin26-Apr-12 10:19 
QuestionEnumerate network printers in metro apps Pin
chameli.sujith25-Apr-12 19:38
chameli.sujith25-Apr-12 19:38 
AnswerRe: Enumerate network printers in metro apps Pin
Richard MacCutchan25-Apr-12 21:18
mveRichard MacCutchan25-Apr-12 21:18 
AnswerRe: Enumerate network printers in metro apps Pin
Wes Aday26-Apr-12 3:02
professionalWes Aday26-Apr-12 3:02 
AnswerRe: Enumerate network printers in metro apps Pin
Maximilien26-Apr-12 5:29
Maximilien26-Apr-12 5:29 
QuestionGet File Extension Pin
jkirkerx25-Apr-12 16:13
professionaljkirkerx25-Apr-12 16:13 
AnswerRe: Get File Extension Pin
_Flaviu25-Apr-12 19:58
_Flaviu25-Apr-12 19:58 
GeneralRe: Get File Extension Pin
jkirkerx26-Apr-12 7:05
professionaljkirkerx26-Apr-12 7:05 
AnswerRe: Get File Extension Pin
enhzflep25-Apr-12 21:13
enhzflep25-Apr-12 21:13 
GeneralRe: Get File Extension Pin
Aescleal26-Apr-12 0:02
Aescleal26-Apr-12 0:02 
GeneralRe: Get File Extension Pin
enhzflep26-Apr-12 0:16
enhzflep26-Apr-12 0:16 
GeneralRe: Get File Extension Pin
Aescleal26-Apr-12 4:35
Aescleal26-Apr-12 4:35 
SuggestionRe: Get File Extension Pin
Randor 26-Apr-12 1:01
professional Randor 26-Apr-12 1:01 
GeneralRe: Get File Extension Pin
enhzflep26-Apr-12 3:47
enhzflep26-Apr-12 3:47 
GeneralRe: Get File Extension Pin
Joe Woodbury29-Apr-12 7:06
professionalJoe Woodbury29-Apr-12 7:06 
AnswerRe: Get File Extension Pin
Randor 26-Apr-12 0:57
professional Randor 26-Apr-12 0:57 
GeneralRe: Get File Extension Pin
jkirkerx26-Apr-12 7:10
professionaljkirkerx26-Apr-12 7:10 

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.