Re: VC++6 About Box Cancel Button
- From: "may" <may2@xxxxxxxxxxxxxxx>
- Date: 2 Jun 2005 09:33:39 -0700
When I create a project with dialog box and for example do not delete
or rename the defaults, then I go into the
[project1.rc-IDD_ABOUTBOX(Dialog)]which will display my custom designed
icon,name of project and software version, copyright etc.; I want to
add some info, eg. my name to the About box; then I do a file save,
save all and return to the main file folders; how do I execute the
project to display the About box as a finished product, it will only
display if I click the project1.rc file from the file folder list, it
displays with re-size handles all around it; not as a finished product
which the user can exit from; do I need to add the About box as a menu
item on the main dialog box? help is much appreciated.
Joseph M. Newcomer wrote:
> I never heard of something this absurd. Are you sure you have not mistaken advice for
> building a dialog-based app (where the dialog is the app itself) and used it for something
> as simple as an About box?
>
> You should have one button, labelled either IDOK or IDCANCEL. If you label it anything
> else, you must create an OnClicked handler for it, and this handler must call
> CDialog::OnOK or CDialog::OnCancel.
>
> In over a dozen years of MFC programming, I have never once deleted the OK button on an
> About dialog. There is no reason to.
>
> When you say "go into the .rc file" what do you mean? Do you mean you have clicked the
> Resources tab and expanded the resources, or are you editing the .rc file directly. What
> is a "drawing board" version of a dialog? What context are you applying the phrase "close
> it out"? Do you mean close it at runtime? Close it while editing the resource?
>
> Typically a main dialog will not have a cancel or OK button, although the first thing you
> do is create handlers for them, and remove the bodies (see my essay on dialog-based apps
> on my MVP Tips site).
>
> When you say something is "not saved anymore", did you do a save of the resources? I've
> only seen this fail if the file is either write-protected or open by some editor that held
> the file locked.
> joe
>
> On 2 Jun 2005 07:46:38 -0700, "may" <may2@xxxxxxxxxxxxxxx> wrote:
>
> >original dialog box created with AppWizard; all books, etc. tell you to
> >delete all the default boxes which appear and drag the control boxes
> >on; name them, give m_variables, BNclicked, and edit the code; this
> >works fine for the main dialog box, however when I go into the .rc file
> >I only get the "drawing board" version of the About box; and nothng
> >works to close it out; how do I get the About box to "run" as a
> >finished product; I tried doing the same thing with it as the main
> >dialog box, naming the cancel button, BNclicked, m_variable name, etc.
> >etc, however it is not saved anywhere because I do not see it anymore;
> >please help.
> >
> >Joseph M. Newcomer wrote:
> >> Was this an app created by the AppWizard, or did you make the colossal blunder of writing
> >> the code by hand?
> >> joe
> >>
> >> On 31 May 2005 15:20:20 -0700, "may" <may2@xxxxxxxxxxxxxxx> wrote:
> >>
> >> >Please Help, Newbie Question: I cannot activate the cancel button or
> >> >the x on the top right hand corner of the About Box; the dialog box is
> >> >okay when clicked the buttons will exit the program.
> >>
> >> Joseph M. Newcomer [MVP]
> >> email: newcomer@xxxxxxxxxxxx
> >> Web: http://www.flounder.com
> >> MVP Tips: http://www.flounder.com/mvp_tips.htm
>
> Joseph M. Newcomer [MVP]
> email: newcomer@xxxxxxxxxxxx
> Web: http://www.flounder.com
> MVP Tips: http://www.flounder.com/mvp_tips.htm
.
- Follow-Ups:
- Re: VC++6 About Box Cancel Button
- From: Joseph M . Newcomer
- Re: VC++6 About Box Cancel Button
- From: Ian Semmel
- Re: VC++6 About Box Cancel Button
- References:
- VC++6 About Box Cancel Button
- From: may
- Re: VC++6 About Box Cancel Button
- From: Joseph M . Newcomer
- Re: VC++6 About Box Cancel Button
- From: may
- Re: VC++6 About Box Cancel Button
- From: Joseph M . Newcomer
- VC++6 About Box Cancel Button
- Prev by Date: Splitter Windows
- Next by Date: How to enable RTTI option
- Previous by thread: Re: VC++6 About Box Cancel Button
- Next by thread: Re: VC++6 About Box Cancel Button
- Index(es):