Input and load application files in a program-Collection of common programming errors


  • msdn can somebody teach me how to put application file (.exe) in a program..i want to create a program that can load another application..i use Visual C++ ver.6
  • 8 Answers


  • msdn1 Put exe in your program ???? Normally drives are used to embed within exe as custom resource and you can extract it and load using FindResource API and normally that file will be written to disk for loading purpose. Likewise you can do the same. Anyway I dint try it.You can see Naveen’s article in codeproject on the same.

    http://www.codeproject.com/useritems/OpenedFileFinder.asp

    Which does some runtime extraction of resources.


  • msdn2

    To show an image, you will need to create a window of some type. A dialog is a window and is most likely the easiest for this. You can show a dialog using a console application but it is no more difficult to create a Windows GUI application that is not a console application. In the dialog, you can use radio buttons to select the image to be shown. Could that satisfy requirements?

    One important question is whether you want to use MFC.


  • msdn3 thanks for anyone who reply to this problem. does this mean the application file cannot be load using C++? or i should use other programming language? i’m still new in programming.thanks for anyone who reply…

  • msdn4

    If none of the previous replies are useful for you, then you need to be more specific about what you need.


  • msdn5 ok. actually i want to create a program that can read keyboard input and load an image(either create manually usign openGL or load from a bmp file).The program is something like, a question will asked you for a number, you press number 1, then image 1 will be show. if you press number 2,then image 2 will be show, and so on until maybe 3 or 4 number. i thought i was a simple one, but its looks too complicated for me.so, program can output a question, keyboard input and image that related to the input.Can you or anyone else give me some ideas or guide for this program?thanks.

  • msdn6

    Do you need a console program or a GUI? Are you using MFC or the Windows SDK directly or something else?


  • msdn7 win32 console app.. or win32 app ..i dont know if there is any other name for it..but, usually i use that..i’m really new in this prgramming…

  • msdn8

    To show an image, you will need to create a window of some type. A dialog is a window and is most likely the easiest for this. You can show a dialog using a console application but it is no more difficult to create a Windows GUI application that is not a console application. In the dialog, you can use radio buttons to select the image to be shown. Could that satisfy requirements?

    One important question is whether you want to use MFC.