Re: Class to Class data transfer

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



donguy76@xxxxxxxxx wrote:
>
>The above code works when the OK button of class A dialog is clicked.
>What if the class A dialog is still active and the class B dialog has
>been opened from inside class A dialog.

Somehow, you have to give your B instance a pointer to your A instance.
There are lots of ways to do that.

void ClassA::StartDialog()
{
ClassB dlg;
dlg.set_A_Instance( this );

if(dlg.DoModal() == IDOK) {
...
}
}
--
- Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc.
.



Relevant Pages

  • Re: nasm-question: get linear address
    ... - Tim Roberts, timr@xxxxxxxxx ... Providenza & Boekelheide, Inc. ... Prev by Date: ...
    (comp.lang.asm.x86)
  • Re: USB Camera Filter Driver
    ... how the IRP_KS_READ_STREAM ioctl works. ... Tim Roberts, timr@xxxxxxxxx ... Providenza & Boekelheide, Inc. ...
    (microsoft.public.development.device.drivers)
  • Re: Question about sizeof
    ... - Tim Roberts, timr@xxxxxxxxx ... Providenza & Boekelheide, Inc. ... Prev by Date: ...
    (microsoft.public.win32.programmer.kernel)
  • Re: a question about "return"
    ... Some people include one for completeness -- a coding standard ... Tim Roberts, timr@xxxxxxxxx ... Providenza & Boekelheide, Inc. ...
    (comp.lang.python)
  • Re: Returning a tuple-struct
    ... - Tim Roberts, timr@xxxxxxxxx ... Providenza & Boekelheide, Inc. ... Prev by Date: ...
    (comp.lang.python)