![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#11 |
|
Hobbyist Programmer
Join Date: Mar 2005
Location: United States
Posts: 124
Rep Power: 4
![]() |
You mean in this location?
![]() Thanks, -BB98
__________________
Learning to use C++ and loving every minute of it. |
|
|
|
|
|
#12 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Nope, this 'un
:![]() Since it ainnapparent'ly there, look here: ![]() If all else fails, see if the boogers let you do this in the makefile: LIBS = -L"C:/Dev-Cpp/lib" -mwindows CXXFLAGS = $(CXXINCS) -mwindows CFLAGS = $(INCS) -mwindows
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#13 |
|
Hobbyist Programmer
Join Date: Mar 2005
Location: United States
Posts: 124
Rep Power: 4
![]() |
Well, it does have it in the compiler options. However, it does not prevent the console from opening. I have a GUI that installs an update.exe when that button is clicked. I used a system(file path); call. Is there a better way that does not create a console window?
Thanks for the help DaWei
__________________
Learning to use C++ and loving every minute of it. |
|
|
|
|
|
#14 | |
|
Professional Programmer
|
If you don't need the console, and you don't want the app to show anything on the screen just use winapi and hide the window.
__________________
▄▄▄▄ Quote:
Due to incorrect calculations during the middle ages, our calendar actually begins a few years after Jesus' birth. Thus the real 6/6/6 happened a few years back. The world already ended and you missed it. Download Code::Blocks now! ▄▄▄▄ |
|
|
|
|
|
|
#15 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
It's pretty much what Jayme suggests or write a service. Using the API to get the handle of your window and hide it would be the easiest at this point, I suspect.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#16 | |
|
Professional Programmer
|
Don't know why this didn't occur to me before but you could just do:
int main()
{
HWND hwnd = GetConsoleWindow(); // Get console window handle
ShowWindow(hwnd, SW_HIDE);
return 0;
}
__________________
▄▄▄▄ Quote:
Due to incorrect calculations during the middle ages, our calendar actually begins a few years after Jesus' birth. Thus the real 6/6/6 happened a few years back. The world already ended and you missed it. Download Code::Blocks now! ▄▄▄▄ |
|
|
|
|
|
|
#17 |
|
Hobbyist Programmer
Join Date: Mar 2005
Location: United States
Posts: 124
Rep Power: 4
![]() |
hmmm, looks interesting. I'll give that a shot.
Thanks, -BB98
__________________
Learning to use C++ and loving every minute of it. |
|
|
|
|
|
#18 |
|
Programming Guru
![]() Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5
![]() |
Yeah it has been said a lot of times since then, this thread is a few months old and in the meantime I've learned a lot more of Windows programming. Sorry Jayme for misinforming you back then.
__________________
"Employ your time in improving yourself by other men's writings, so that you shall gain easily what others have labored hard for." -- Socrates |
|
|
|
|
|
#19 | |
|
Hobbyist Programmer
Join Date: Mar 2005
Location: United States
Posts: 124
Rep Power: 4
![]() |
Quote:
[Linker error] undefined reference to `_Z16GetConsoleWindow@0' #include <windows.h>
#include <process.h>
HWND hwndcs;
HWND hwndnetsp;
HWND hwndsp;
HWND hwndexit;
HDC hdc;
PAINTSTRUCT ps;
RECT rc;
// some other code here...
case WM_COMMAND:
if(LOWORD(wParam) == 1 && HIWORD(wParam) == BN_CLICKED && (HWND) lParam == hwndnetsp)
{
ShowWindow(hwnd, SW_HIDE);
system("D:\\dotnetfx.exe");
hwndcs = GetConsoleWindow(); // Get console window handle
ShowWindow(hwndcs, SW_HIDE);
system("D:\\NDP1.1sp1-KB867460-X86.exe");
hwndcs = GetConsoleWindow(); // Get console window handle
ShowWindow(hwndcs, SW_HIDE);
ShowWindow(hwnd, SW_SHOW);
}
// some other code here...Or am I missunderstanding... This is not a console application. It is a win32 app. Everything else can show, I just want to get rid of the console that pops up when I use system(); I tried messing with the execl(); but could not make that compile. Thanks, -BB98
__________________
Learning to use C++ and loving every minute of it. |
|
|
|
|
|
|
#20 | ||
|
Hobbyist
Join Date: Sep 2005
Posts: 261
Rep Power: 4
![]() |
Quote:
Quote:
Try using ShellExecute, with the 'nShowCmd' param set to 'SW_HIDE'. http://msdn.microsoft.com/library/de...ellexecute.asp |
||
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|