Is it possible to use ActiveX API and not to show eSignal application running? Maybe there's an option to hide it manually?...
Announcement
Collapse
No announcement yet.
Hide eSignal server application
Collapse
X
-
The following code does what you want (written in C):
//Add these lines in your declaration section at the top of the file
#define MAXSTRLEN 128
LRESULT CALLBACK ListWindows(HWND, LPARAM);
...
//Add this line where you want to hide/minimize eSignal
EnumWindows((WNDENUMPROC) ListWindows, (LPARAM) NULL);
...
//Define this function somewhere in your file
LRESULT CALLBACK ListWindows(HWND hWnd, LPARAM lParam)
{
char szTitle[MAXSTRLEN];
GetWindowText(hWnd, szTitle, MAXSTRLEN);
if (strncmp(szTitle, "eSignal", (size_t) 7) == 0)
ShowWindow(hWnd, SW_HIDE);
return TRUE;
}
This works for me.
What this does is enumerate all windows on your current desktop and calls a function handler for each window, passing, as the first parameter, the handle of the window, which can then be used to find the caption of said window.
I only compare the first seven characters of the title name in case a layout is open and the full title is not just "eSignal".
Alternatively, you can do an SW_MINIMIZE instead of SW_HIDE. If you use SW_HIDE, the only way you can tell whether the eSignal app is really gone when you've closed your application is to go through the process list on your computer. The task list won't show it. Or you can do a second enum, just before you exit, where you would do an SW_SHOW on all the windows you previously hid. They shouldn't appear. That's how you know they're actually gone.
Hope this helps,
Michael
Comment
Comment