void main
-
Hi, For a normal Visual C++ program, we have a void main. But in creating a MFC single document interface, does anyone know which function is something similar to void main? Thanks for ur help
Argh... the internet connection failed just when I posted the first answer... :mad: well... X| lets do it again... You can do it in three ways: -> if you don't need to do anything to the GUI you can use the InitInstance function in the main class. -> if you need to interact with the main frame (the SDI document view container) you can do it in the precreatewindow function in the mainframe class. -> if you need to interact with the view you can do it in the precreatewindow of the view class. hope this helps...
-
Hi, For a normal Visual C++ program, we have a void main. But in creating a MFC single document interface, does anyone know which function is something similar to void main? Thanks for ur help
Sounds like all you want to have is your app start once the linking processs has completed in the DevStudio. Correct? If so, then use the short cut Ctrl+F5 (unless it is mapped somewhere else). This compiles/links and then starts the app. Larry J. Siddens
-
Argh... the internet connection failed just when I posted the first answer... :mad: well... X| lets do it again... You can do it in three ways: -> if you don't need to do anything to the GUI you can use the InitInstance function in the main class. -> if you need to interact with the main frame (the SDI document view container) you can do it in the precreatewindow function in the mainframe class. -> if you need to interact with the view you can do it in the precreatewindow of the view class. hope this helps...
-
Sounds like all you want to have is your app start once the linking processs has completed in the DevStudio. Correct? If so, then use the short cut Ctrl+F5 (unless it is mapped somewhere else). This compiles/links and then starts the app. Larry J. Siddens
-
oh.. sorry for the unclear msg.. I want to run the program as soon as it finish compiling and linking.. whereby the program seems to be "automatically" running.. dreamerzz
Start it within the IDE using Ctrl+F5. That'll compile and link (if necessary), and then run.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
-
Hi, For a normal Visual C++ program, we have a void main. But in creating a MFC single document interface, does anyone know which function is something similar to void main? Thanks for ur help
dreamerzz wrote: For a normal Visual C++ program, we have a void main Strictly speaking, it is
int main()
-
dreamerzz wrote: For a normal Visual C++ program, we have a void main Strictly speaking, it is
int main()
-
Argh... the internet connection failed just when I posted the first answer... :mad: well... X| lets do it again... You can do it in three ways: -> if you don't need to do anything to the GUI you can use the InitInstance function in the main class. -> if you need to interact with the main frame (the SDI document view container) you can do it in the precreatewindow function in the mainframe class. -> if you need to interact with the view you can do it in the precreatewindow of the view class. hope this helps...