activating a button on a dialog box from a dialog box 
Author Message
 activating a button on a dialog box from a dialog box

hi all,
i have a dialog based project,my parent dialog box spawns a child dialog
box.When i click the cancel button of the child dialog box i want a button
on the parent to be activated automatically.
Is this possible?
thanks
morgan


Sat, 29 Nov 2003 21:57:48 GMT  
 activating a button on a dialog box from a dialog box
How about this (copy out of msdn)

nRet = aboutDlg.DoModal();

   // Handle the return value from DoModal
   switch ( nRet )
   {
   case -1:
      AfxMessageBox("Dialog box could not be created!");
      break;
   case IDABORT:
      // Do something
      break;
   case IDOK:
      // Do something
      break;
   case IDCANCEL:
      *********Activate desired Button
      break;
   default:
      // Do something
      break;
   };

Abbas Cakmak



Sat, 29 Nov 2003 22:52:16 GMT  
 activating a button on a dialog box from a dialog box
GetParent()->PostMessage(WM_COMMAND,IDC_YOUR_BUTTON_ID,0);


Quote:
> hi all,
> i have a dialog based project,my parent dialog box spawns a child dialog
> box.When i click the cancel button of the child dialog box i want a button
> on the parent to be activated automatically.
> Is this possible?
> thanks
> morgan



Sun, 30 Nov 2003 13:31:46 GMT  
 activating a button on a dialog box from a dialog box
Thanks Ruben it works a treat.

GetParent()->PostMessage(WM_COMMAND,IDC_YOUR_BUTTON_ID,0);



Quote:
> hi all,
> i have a dialog based project,my parent dialog box spawns a child dialog
> box.When i click the cancel button of the child dialog box i want a button
> on the parent to be activated automatically.
> Is this possible?
> thanks
> morgan



Sun, 30 Nov 2003 16:50:14 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Modeless dialog box together with modal dialog box

2. Dialog box in a dialog box

3. transfer data from one dialog box to another dialog box

4. PBM: Message box not displayed after main dialog box is closed in MFC dialog-based app

5. set an arbitrary printer driver in print dialog box without showing the print dialog box

6. how to set an arbitrary printer driver in print dialog box without showing the dialog box

7. activate mdichild from dialog box

8. Dialog Box two OK buttons, two Cancel buttons and TODO still on it

9. Transfer of data from an edit box in one dialog box to a list box in another dialog box II

10. ? Dialog box input and output edit boxes

11. i cannot add an item to my list box that is located within my dialog box

12. List boxes in Modal Dialog Box

 

 
Powered by phpBB® Forum Software