Click here to Skip to main content
15,913,587 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: _com_error not caught by 'Try-Catch' code Pin
Aescleal5-Nov-13 23:38
Aescleal5-Nov-13 23:38 
Questionmfc Pin
shizhanbiao5-Nov-13 19:59
shizhanbiao5-Nov-13 19:59 
AnswerRe: mfc Pin
CPallini5-Nov-13 21:32
mveCPallini5-Nov-13 21:32 
QuestionRe: mfc Pin
David Crow6-Nov-13 4:13
David Crow6-Nov-13 4:13 
QuestionGetting output parameters value[Solved] Pin
pkfox4-Nov-13 4:04
professionalpkfox4-Nov-13 4:04 
SuggestionRe: Gettin output parameters value Pin
Richard MacCutchan4-Nov-13 6:10
mveRichard MacCutchan4-Nov-13 6:10 
GeneralRe: Gettin output parameters value Pin
pkfox4-Nov-13 10:07
professionalpkfox4-Nov-13 10:07 
SuggestionRe: Gettin output parameters value Pin
David Crow4-Nov-13 10:44
David Crow4-Nov-13 10:44 
GeneralRe: Gettin output parameters value Pin
Richard MacCutchan4-Nov-13 22:29
mveRichard MacCutchan4-Nov-13 22:29 
GeneralRe: Gettin output parameters value Pin
Richard MacCutchan4-Nov-13 22:31
mveRichard MacCutchan4-Nov-13 22:31 
GeneralRe: Gettin output parameters value Pin
pkfox5-Nov-13 20:00
professionalpkfox5-Nov-13 20:00 
GeneralRe: Gettin output parameters value Pin
Richard MacCutchan5-Nov-13 21:37
mveRichard MacCutchan5-Nov-13 21:37 
GeneralRe: Gettin output parameters value Pin
pkfox6-Nov-13 3:05
professionalpkfox6-Nov-13 3:05 
QuestionCaptur Audio Using WASAPI Pin
AmbiguousName3-Nov-13 2:20
AmbiguousName3-Nov-13 2:20 
AnswerRe: Captur Audio Using WASAPI Pin
Jochen Arndt4-Nov-13 2:45
professionalJochen Arndt4-Nov-13 2:45 
Question[Sovled] Win32 C++ - Child Windows Pin
lrinish2-Nov-13 9:49
lrinish2-Nov-13 9:49 
SuggestionRe: Win32 C++ - Child Windows Pin
Richard MacCutchan2-Nov-13 21:27
mveRichard MacCutchan2-Nov-13 21:27 
AnswerRe: Win32 C++ - Child Windows Pin
pasztorpisti3-Nov-13 5:25
pasztorpisti3-Nov-13 5:25 
GeneralRe: Win32 C++ - Child Windows Pin
lrinish3-Nov-13 6:32
lrinish3-Nov-13 6:32 
GeneralRe: Win32 C++ - Child Windows Pin
pasztorpisti3-Nov-13 7:01
pasztorpisti3-Nov-13 7:01 
You are right. Classic window messages (like WM_PAINT, WM_SIZE, ...) are all processed by the window proc of the control itself (that is window class specific). Specialized child windows (controls like Button, Edit, ...) are designed that they send only a few messages to the parent window (like WM_COMMAND message when the user presses a button, and WM_NOTIFY with control specific struct pointer).

I guess this design was created because back in the old days people wrote their programs in procedural languages (C, Pascal) and in that case it is more comfortable to write just one windowproc for your window and to handle all child control messages there instead of writing a lot of window procs for all buttons, edit boxes, and so on... If you think about it, most of the core windows API is also a C interface.

The irony here is that today GUIs are mostly built with object oriented GUI frameworks where one control is one object (I'm not talking about MFC here, that is at most 1/3 object oriented, Qt is a much better example). Such a framework needs to have/handle all control specific messages/notifications in the object associated with the control. For this reason the window specific implementation of such a framework usually delegates the handling of child control speicific messages from the parent object to the child object. Later the programmer usually registers an event handler into the object of the child control. You also need all control specific messages in the object associated with the child control when you want to write reusable specializations of some windows-builtin child controls (like static or edit).
QuestionArithmetic operation in pointer using C Pin
shanmugarajaa31-Oct-13 20:20
shanmugarajaa31-Oct-13 20:20 
QuestionRe: Arithmetic operation in pointer using C Pin
Richard MacCutchan31-Oct-13 23:47
mveRichard MacCutchan31-Oct-13 23:47 
AnswerRe: Arithmetic operation in pointer using C Pin
Bill_Hallahan1-Nov-13 18:22
Bill_Hallahan1-Nov-13 18:22 
QuestionListView::LVN_EndLabelEdit problem Pin
jackheroes31-Oct-13 8:51
jackheroes31-Oct-13 8:51 
SuggestionRe: ListView::LVN_EndLabelEdit problem Pin
Richard MacCutchan31-Oct-13 15:09
mveRichard MacCutchan31-Oct-13 15:09 

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.