
MFC Dialog based Application w/no buttons?
Read my essay on creating dialog-based apps on my MVP Tips site.
I would simply do a GetCommandLine() [I think that's the API; I haven't used a command
line in years] in the OnInitDialog handler. OnInitInstance is far too soon, since the
dialog has not yet been created until the DoModal(), and after the DoModal() returns it is
too late.
joe
Quote:
>Hello,
>I need to write an MFC Dialog-based application that has no buttons, but
>determines what it needs to do from command line parameters, and then
>displays some things in a textbox. After it's done, it should just
>exit.
>Some questions:
>1) Using AppWizard, how do I create such an application? Can I just
>create the Dialog application using the wizard, then simply delete the
>OK and Cancel buttons?
>2) As far as the code that I need to implement to evaluate the command
>line parameters and then perform the work (some calculations and then
>display), where's the "right" place to put this code, especially since I
>won't have any "Onbutton..." functions, etc.?
>Should I put it in OnInitInstance?
>My apologies if these are somewhat unusual questions...
>Jim
Joseph M. Newcomer [MVP]
Web: http://www3.pgh.net/~newcomer
MVP Tips: http://www3.pgh.net/~newcomer/mvp_tips.htm