Hi Guys,
today i am in some very diiferent scenario
My client needed a GUI and Console Application within single application.
I am able to achieve using just wriiten Main and then called WinMain based on commnadline parameters
But if commnadline parameters say should be window based, then i hide console window usingCode:HINSTANCE inst; inst=(HINSTANCE)GetModuleHandle(NULL); WinMain(inst,NULL,buf,SW_SHOWNORMAL);
but as i tried to hide, it created an issue for me when i run this application on console window, it hide console window.Code:HWND console = GetConsoleWindow(); ConsoleWindow = 0; if(IsWindow(console)) ShowWindow(console,SW_HIDE); // hides the window
so is there any way so i will be able to get whether it is run through Windows double click or througth console window. or any good solution for this issue





Reply With Quote