> It sounds like you've done it already? It's just a dll with the code it
> seems you have already written. (Needs to be 32 bit. may be some issues with
> unicode for getclassname -- may need single byte strings).
>
Specifically, this should work for a single bar at a time(I'd need to do more
to make it work on my 10 year old version of vc); call
yourdll.setbottom(win.handle("yourbar"))
- copy sample.c code in plugin source up to end of dllmain function.
- add following:
static HWND myHandle;
static HWINEVENTHOOK g_hook;
oid CALLBACK HandleWinEvent(HWINEVENTHOOK hook, DWORD event, HWND hwnd, LONG
idObject, LONG idChild, DWORD dwEventThread, DWORD dwmsEventTime) {
if (event == EVENT_SYSTEM_FOREGROUND) {
TCHAR tmp[255];
int r = GetClassName(hwnd, tmp, 250);
if (wcscmp(tmp, L"WorkerW")==0) { // maybe not L"" for PowerPro
for (int i = 0; i < 10; ++i) { // usually works on first try, but sometimes
needs 2 or 3
//SetForegroundWindow(myHandle); //doesn't work on Vista/Win7
SetWindowPos(myHandle, (HWND) -1, 0,0,0,0,3);
SetWindowPos(myHandle, (HWND) -2, 0,0,0,0,67);
if (myHandle == GetForegroundWindow()) break;
}
}
}
_declspec(dllexport) void setbottom(LPVOID unused1, LPVOID unused2,
int (*GetVar)(LPSTR szVar, LPSTR szVal), void (*SetVar)(LPSTR szVar, LPSTR
szVal),
DWORD* pFlags, UINT nargs, LPSTR* szArgs, PPROSERVICES* ppsv)
UINT h;
LPSTR p;
if (h = strtoul(*(szargs+1), &p, 10)
{
if (g_hook)
UnhookWinEvent(g_hook);
g_hook = SetWinEventHook(EVENT_SYSTEM_FOREGROUND, EVENT_SYSTEM_FOREGROUND, NULL,
HandleWinEvent,0,0,0);
myHandle = (HWND)h;
else
{
UnhookWinEvent(g_hook);
g_hook =NULL;
}