dougt%meer.net 06a6fa7558 Adding a busy cursor to indicate something is happening
git-svn-id: svn://10.0.0.236/trunk@184770 18797224-902f-48f8-a5cc-f745e15eee43
2005-11-16 18:16:11 +00:00

47 lines
828 B
C++
Executable File

#include <windows.h>
int main(int argc, char *argv[])
{
SetCursor(LoadCursor(NULL,IDC_WAIT));
HWND h = FindWindowW(NULL, L"Minimo");
if (h)
{
ShowWindow(h, SW_SHOWNORMAL);
SetForegroundWindow(h);
return 0;
}
char *cp;
char exe[MAX_PATH];
GetModuleFileName(GetModuleHandle(NULL), exe, sizeof(exe));
cp = strrchr(exe,'\\');
if (cp != NULL)
{
cp++; // pass the \ char.
*cp = 0;
}
strcat(exe, "minimo.exe");
PROCESS_INFORMATION pi;
BOOL b = CreateProcess(exe,
NULL,
NULL,
NULL,
NULL,
0,
NULL,
NULL,
NULL,
&pi);
SetCursor(NULL);
return 0;
}