Click here to Skip to main content
15,885,216 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalplease help Pin
Anonymous3-Aug-05 2:26
Anonymous3-Aug-05 2:26 
GeneralRe: please help Pin
Scozturk3-Aug-05 2:51
professionalScozturk3-Aug-05 2:51 
GeneralRe: please help Pin
Marc Soleda3-Aug-05 3:42
Marc Soleda3-Aug-05 3:42 
GeneralRe: please help Pin
rajeshvv3-Aug-05 4:14
rajeshvv3-Aug-05 4:14 
GeneralRe: please help Pin
Marc Soleda3-Aug-05 4:29
Marc Soleda3-Aug-05 4:29 
QuestionPossible? Injection of a CWndEx-Class in MFC-structure? Pin
ClockDivider3-Aug-05 1:49
ClockDivider3-Aug-05 1:49 
AnswerRe: Possible? Injection of a CWndEx-Class in MFC-structure? Pin
viveking3-Aug-05 2:38
sussviveking3-Aug-05 2:38 
AnswerRe: Possible? Injection of a CWndEx-Class in MFC-structure? Pin
GKarRacer3-Aug-05 6:07
GKarRacer3-Aug-05 6:07 
No, this is not directly possible in the C++ language. I've wanted to do this myself on occasion along with making some necessary functions virtual that for some inexplicable reason are not.

But there are ways around it to get the job done. Depending on what you'd like to achieve the simplest thing you can do is just to use a global function that takes a CWnd as a parameter. You won't be able to access protected members, but for most cases this generic function should be able to achieve what you want. It's not as pretty certainly, but the most important thing is to get the program to work.

Another approach (at least for objects you directly create) would be to multiply inherit. This wouldn't apply to objects that are dynamically created, however.

GeneralRe: Possible? Injection of a CWndEx-Class in MFC-structure? Pin
ClockDivider3-Aug-05 7:34
ClockDivider3-Aug-05 7:34 
GeneralRe: Possible? Injection of a CWndEx-Class in MFC-structure? Pin
GKarRacer3-Aug-05 8:31
GKarRacer3-Aug-05 8:31 
GeneralClient rect mapping confusion Pin
Cpt Rick3-Aug-05 1:24
Cpt Rick3-Aug-05 1:24 
GeneralRe: Client rect mapping confusion Pin
Jose Lamas Rios3-Aug-05 3:12
Jose Lamas Rios3-Aug-05 3:12 
GeneralRe: Client rect mapping confusion Pin
Cpt Rick3-Aug-05 5:38
Cpt Rick3-Aug-05 5:38 
GeneralRe: Client rect mapping confusion Pin
Jose Lamas Rios3-Aug-05 6:13
Jose Lamas Rios3-Aug-05 6:13 
GeneralRe: Client rect mapping confusion Pin
Cpt Rick3-Aug-05 7:52
Cpt Rick3-Aug-05 7:52 
GeneralTreeView Control Pin
Nishad S3-Aug-05 1:16
Nishad S3-Aug-05 1:16 
GeneralRe: TreeView Control Pin
John Ulvr3-Aug-05 4:34
John Ulvr3-Aug-05 4:34 
GeneralRe: TreeView Control Pin
GKarRacer3-Aug-05 8:42
GKarRacer3-Aug-05 8:42 
GeneralSending data / message from a hook dll to a thread in a different application Pin
Vaibhav Sanghavi3-Aug-05 1:11
Vaibhav Sanghavi3-Aug-05 1:11 
GeneralRe: Sending data / message from a hook dll to a thread in a different application Pin
Blake Miller3-Aug-05 10:41
Blake Miller3-Aug-05 10:41 
GeneralUser Interfce Thread from a console application Pin
Vaibhav Sanghavi3-Aug-05 0:59
Vaibhav Sanghavi3-Aug-05 0:59 
GeneralConsole application on sending message Pin
Member 21610043-Aug-05 0:43
Member 21610043-Aug-05 0:43 
GeneralRe: Console application on sending message Pin
Nish Nishant3-Aug-05 0:54
sitebuilderNish Nishant3-Aug-05 0:54 
GeneralRe: Console application on sending message Pin
Member 21610044-Aug-05 17:29
Member 21610044-Aug-05 17:29 
GeneralGetting install directory of my executable Pin
retro_coder3-Aug-05 0:37
retro_coder3-Aug-05 0:37 

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.