Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(!GetConsoleTitle(NULL, 0) && GetLastError() = ERROR_SUCCESS {
- // Console
- } else {
- // GUI
- }
- if(AttachConsole(ATTACH_PARENT_PROCESS)=FALSE){
- // GUI
- } else {
- // Console, and you have a handle to the console that already exists.
- }
Add Comment
Please, Sign In to add comment