IDCANCEL control problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I have a dialog that has a couple of buttons, of which one is a button with id IDOK and there is no button with id IDCANCEL. When I try to add a button called IDCANCEL I get the message that it already exists. When I created this dialog I probably deleted the IDCANCEL button. When using ClassWizard there is no IDCANCEL control. How can I add an IDCANCEL button

Thanks
Joachim
 
I have a dialog that has a couple of buttons, of which one is a button with id IDOK and there is no button with id IDCANCEL. When I try to add a button called IDCANCEL I get the message that it already exists. When I created this dialog I probably deleted the IDCANCEL button. When using ClassWizard there is no IDCANCEL control. How can I add an IDCANCEL button?
Joachim,

This might be a quirk of VC6 (it doesn't happen as far as I can see
with VS2003).

One solution may be to place a button on the dialog (leave its ID
alone), close the workspace and open the .rc file with Notepad and
alter the ID to IDCANCEL that way.

Dave
 
Joachim said:
IDCANCEL button. When using ClassWizard there is no IDCANCEL
control. How can I add an IDCANCEL button?

Open resource file (rc) as text file. Find your window. Add IDCANCEL
button by copying some existing button properties and replacing its ID
with IDCANCEL. You can even change button coordinates so you can
distinguish them. Save changes.
 
Back
Top