hi all,
How do I go about creating a windows application in winAPI and MFC without a window.
thanks in advance.
Srikanth.
Printable View
hi all,
How do I go about creating a windows application in winAPI and MFC without a window.
thanks in advance.
Srikanth.
One way of doing that could be like, put all your stuff in InitInstance() and return FALSE in the end.
Another way could be, start your application in hidden mode, have a look at Dialogs: How to start your Dialog Application in hidden mode?
hi Ejaz,
thanks for the reply.
I don't want the window to be created at all. no processing messages..
just a blank application and run some code.
is it possible ? pls help.
thanks in advance,
Of course:Quote:
Originally Posted by cbodapati
- Create a console application and do your stuff there
- Just don't create a window ;) No one forces you to create one...
Code:#include <windows.h>
#include <stdlib.h>
int WINAPI WinMain ( HINSTANCE hInst, HINSTANCE hPrev, LPSTR CmdLine, int ShowCmd )
{
// Do your stuff right here
return 0;
}
hi,
thanks, if some dialog is to be displayed then ?
Quote:
Originally Posted by cbodapati
.. then display it. Just note first that a dialog is also a window.Quote:
Originally Posted by cbodapati
You could use MessageBox(...). You can open one from WinMain(...).