Help with RC file from beginner- don't know where to start

  • Thread starter Thread starter VM
  • Start date Start date
V

VM

I'm trying to find the code that's executed when a button in a dialog is
pushed.

In my AppMaster.rc file, I have a Dialog folder with IDD_DIALOGBAR1 and
IDD_DIALOGBAR2 .

When I click on IDD_DIALOGBAR1, I can see that it has a button with text
"Accept". If I view the rc file through a text editor, the button says:

PUSHBUTTON "Accept ",ID__BUTTON4,67,86,50,14,0,WS_EX_STATICEDGE

Where can I find the code that's executed when I click on this button? The
code's not in the RC file. It has to be somewhere else.

Any help would be appreciated.

Thanks.
 
When I click on IDD_DIALOGBAR1, I can see that it has a button with text
"Accept". If I view the rc file through a text editor, the button says:

PUSHBUTTON "Accept ",ID__BUTTON4,67,86,50,14,0,WS_EX_STATICEDGE

Where can I find the code that's executed when I click on this button? The
code's not in the RC file. It has to be somewhere else.

I'd expect to find it in the .cpp source file that contains the code
for the dialog (IDD_DIALOGBAR1). If this is a VC++ MFC application
you'll probably have a class for that dialog, and there will be a
message map (a lookup table) that associates ID__BUTTON4 to a class
method that's called when the button is clicked.

If the project is a more traditional SDK based application, there will
be a dialog handler that catches WM_COMMAND messages, one of which
will be for ID__BUTTON4.

Either way, if you search for ID__BUTTON4 in your source code files,
you should find the code that's invoked.

Dave
 
Back
Top