Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Programpath / Programstart

Status
Not open for further replies.

agadir

Programmer
Oct 29, 2001
18
DE
Hi,
I've got two questions about MFC-Application:
- How can I get the path of a running MFC-Application (something like argv[0] in c)?
- How can I start a dialog at the start of a SDI-Application
(when I start the Dialog with OnInitialUpdate the dialog is shown without any textinformation)?
Any help would be appreciated!
Thanks
Agadir
 
with the API functions,you can do it like this:

char Path[200];
HINSTANCE hInstance = GetModuleHandle(NULL);
GetModuleFileName( hInstance, Path, 200 );
 
Hi Leibnitz,
thanks a lot for your answer!
Now I can catch the programpath of my MFC-Application.
But I still don't know how to start a dialog once at the programstart of a SDI-Application (I want to implement something like a logindialog that is shown once at the programstart).
Does anyone know how to do this?
And a further question (sorry guys):
How can I enable / disable menuentries?
Thanks a lot for your help!
Agadir
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top