Troudeloup
asked on
no console window while running a program on windows - making it a win32 program a must? how?
I have programs like this one
#include <iostream>
#include <windows.h>
#include <fstream>
#include <string>
using namespace std;
int main ()
{
string line;
ifstream file("lines.txt");
getline(file, line);
cout << line << endl;
return 0;
}
but it pops a console window while ran.
is making it a win32 program a solution?
how do I do it with generic c++ code , and compile it with mingw?
#include <iostream>
#include <windows.h>
#include <fstream>
#include <string>
using namespace std;
int main ()
{
string line;
ifstream file("lines.txt");
getline(file, line);
cout << line << endl;
return 0;
}
but it pops a console window while ran.
is making it a win32 program a solution?
how do I do it with generic c++ code , and compile it with mingw?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
#include <iostream>
#include <windows.h>
#include <fstream>
#include <string>
using namespace std;
int WINAPI WinMain(
HINSTANCE hInstance, // handle to current instance
HINSTANCE hPrevInstance, // handle to previous instance
LPSTR lpCmdLine, // pointer to command line
int nCmdShow // show state of window
)
{
string line;
ifstream file("lines.txt");
getline(file, line);
cout << line << endl;
return 0;
}
given this, is it possible to pop a msgbox?
also, does it create a tab on the start bar?
#include <windows.h>
#include <fstream>
#include <string>
using namespace std;
int WINAPI WinMain(
HINSTANCE hInstance, // handle to current instance
HINSTANCE hPrevInstance, // handle to previous instance
LPSTR lpCmdLine, // pointer to command line
int nCmdShow // show state of window
)
{
string line;
ifstream file("lines.txt");
getline(file, line);
cout << line << endl;
return 0;
}
given this, is it possible to pop a msgbox?
also, does it create a tab on the start bar?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
also, is it possible to display a small cute icon on the clock bar with my own alter alternating graphics?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
is it because once I click the messagebox, the process will end?
because i'd like to have the tab showing permanently when the code is running.
because i'd like to have the tab showing permanently when the code is running.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
uh, are you being sarcastic?
or maybe you never pop any box?
but then what did write ?
or maybe you never pop any box?
but then what did write ?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
uhhhh how about just a boot-to-go tab in the main bar?
(i'll, like, take that for now ;p)
(i'll, like, take that for now ;p)
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ok i have to ask a lot Qs about that snippet ;p
ASKER
https://www.experts-exchange.com/questions/22983831/how-do-I-save-a-screen-shot.html