Click here to Skip to main content
16,007,779 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: I want to Hook Mouse but failed? Pin
Simon.W2-Apr-03 18:47
Simon.W2-Apr-03 18:47 
GeneralRe: I want to Hook Mouse but failed? Pin
white jungle2-Apr-03 19:25
white jungle2-Apr-03 19:25 
GeneralRe: I want to Hook Mouse but failed? Pin
Simon.W2-Apr-03 20:37
Simon.W2-Apr-03 20:37 
GeneralDirectory changing.. and command lines.. Pin
(Steven Hicks)n+12-Apr-03 12:45
(Steven Hicks)n+12-Apr-03 12:45 
Generalsendmessage and CDialog pointer Pin
nss2-Apr-03 12:19
nss2-Apr-03 12:19 
GeneralRe: sendmessage and CDialog pointer Pin
valikac2-Apr-03 12:43
valikac2-Apr-03 12:43 
GeneralRe: sendmessage and CDialog pointer Pin
nss2-Apr-03 12:50
nss2-Apr-03 12:50 
GeneralRe: sendmessage and CDialog pointer Pin
Dave Bryant2-Apr-03 13:01
Dave Bryant2-Apr-03 13:01 
nss wrote:
I am unable to include my view.h file into the cdialog.h file due to deeply entrenched circular includes...

But you should be able to include it in the cpp file, and just forward declare the class in the header file.

Anyway, SendMessage will work (although it is not really necessary here). You can do something like:

GetParent()->SendMessage( dlgPointerMessage, reinterpret_cast<wparam>( this ) );

And in the parent message map:

ON_MESSAGE( dlgPointerMessage, OnDlgPointerMessage )

LRESULT OnDlgPointerMessage(WPARAM wParam, LPARAM lParam)
{
  CDlg* pDlg = reinterpret_cast<CDlg*>( wParam );
  ASSERT_VALID( pDlg );

  // Do something

  return 0;
}

Dave
http://www.cloudsofheaven.org
GeneralRe: sendmessage and CDialog pointer Pin
nss2-Apr-03 13:56
nss2-Apr-03 13:56 
GeneralRe: sendmessage and CDialog pointer Pin
Dave Bryant2-Apr-03 13:58
Dave Bryant2-Apr-03 13:58 
GeneralRe: sendmessage and CDialog pointer Pin
Dave Bryant2-Apr-03 14:04
Dave Bryant2-Apr-03 14:04 
GeneralWow! Thanks!!! Pin
ns3-Apr-03 1:22
ns3-Apr-03 1:22 
GeneralRe: Wow! Thanks!!! Pin
Dave Bryant3-Apr-03 8:35
Dave Bryant3-Apr-03 8:35 
GeneralCustom Win32 Button Class Pin
England 2 Turkey 02-Apr-03 10:36
sussEngland 2 Turkey 02-Apr-03 10:36 
QuestionAccess ActiveX via Dialog the nonMFC way? Pin
Dan Thurman2-Apr-03 10:15
Dan Thurman2-Apr-03 10:15 
GeneralDirect3D MDI... nasty! Pin
Bartosz Bien2-Apr-03 9:58
Bartosz Bien2-Apr-03 9:58 
QuestionWhat can cause Warning: calling DestroyWindow in CDialog::~CDialog -- OnDestroy or PostNcDestroy in derived class will not be called. Pin
cdsmith2-Apr-03 9:35
cdsmith2-Apr-03 9:35 
AnswerRe: What can cause Warning: calling DestroyWindow in CDialog::~CDialog -- OnDestroy or PostNcDestroy in derived class will not be called. Pin
Ravi Bhavnani2-Apr-03 9:53
professionalRavi Bhavnani2-Apr-03 9:53 
GeneralRe: What can cause Warning: calling DestroyWindow in CDialog::~CDialog -- OnDestroy or PostNcDestroy in derived class will not be called. Pin
cdsmith2-Apr-03 10:19
cdsmith2-Apr-03 10:19 
GeneralRe: What can cause Warning: calling DestroyWindow in CDialog::~CDialog -- OnDestroy or PostNcDestroy in derived class will not be called. Pin
Ravi Bhavnani2-Apr-03 11:12
professionalRavi Bhavnani2-Apr-03 11:12 
GeneralRe: What can cause Warning: calling DestroyWindow in CDialog::~CDialog -- OnDestroy or PostNcDestroy in derived class will not be called. Pin
cdsmith3-Apr-03 2:56
cdsmith3-Apr-03 2:56 
GeneralRe: What can cause Warning: calling DestroyWindow in CDialog::~CDialog -- OnDestroy or PostNcDestroy in derived class will not be called. Pin
Ravi Bhavnani3-Apr-03 4:17
professionalRavi Bhavnani3-Apr-03 4:17 
GeneralPort Access Pin
kulsukh2-Apr-03 7:37
kulsukh2-Apr-03 7:37 
GeneralRe: Port Access Pin
56789012342-Apr-03 22:01
56789012342-Apr-03 22:01 
Generalshowing html in explorer bar-newbie question Pin
mweiss2-Apr-03 5:20
mweiss2-Apr-03 5:20 

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.