sc0rpi0 Posted August 4, 2008 Posted August 4, 2008 does anyone know a way to hide an already existent window (preferably without using a gui)? i know i can use nircmd to run a program and hide its window, but this isn't the problem. i want to hide a window of a program that has already been run. thanks very much. Quote
RogueHart Posted August 5, 2008 Posted August 5, 2008 does anyone know a way to hide an already existent window (preferably without using a gui)? i know i can use nircmd to run a program and hide its window, but this isn't the problem. i want to hide a window of a program that has already been run. thanks very much. do you mean a running window? or do you want to hide a window like if you used an old batch syslog and the dos window doesn't close and what you want to do is close the dos window. is that right? Quote
sc0rpi0 Posted August 5, 2008 Author Posted August 5, 2008 do you mean a running window? or do you want to hide a window like if you used an old batch syslog and the dos window doesn't close and what you want to do is close the dos window. is that right? yes, i want to hide a running window---not a dos window. Quote
Steve8x Posted August 5, 2008 Posted August 5, 2008 yes, i want to hide a running window---not a dos window. ShowWindow API does this very easily! it is how Ghost works... 2 Simple Steps! 1. Get the window's handle! (HWND) 2. Call ShowWindow with the window handle and specify SW_HIDE for the second parameter in C++ HWND WindowHandle; WindowHandle = FindWindow(0, "WindowTitle"); ShowWindow(WindowHandle, SW_HIDE); in ASM HideWindow proc WindowTitle:DWORD LOCAL WindowHandle:DWORD invoke FindWindow, 0, [WindowTitle] mov [WindowHandle], eax invoke ShowWindow, [WindowHandle], SW_HIDE HideWindow endp call it like this if using macros.asm invoke HideWindow, SADD("WindowText") or just give it a pointer to a string MSDN for reference it will tell you everything you need to know about these two APIs FindWindow http://msdn.microsoft.com/en-us/library/ms633499.aspx ShowWindow: http://msdn.microsoft.com/en-us/library/ms633548.aspx P.S. who said anything about a GUI? you can make a windowless application call these APIs! If your using C++ that means make a GUI application instead of a console but just never make a window! that way nothing ever pops up... hiding command prompt windows is the same as hiding GUI based windows, there's no difference. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.