93 |
tray_proc_id = GetCurrentProcessId (); |
tray_proc_id = GetCurrentProcessId (); |
94 |
cbt_hook = SetWindowsHookEx (WH_CBT, PTD_CBT_proc, glob_hinst, 0); |
cbt_hook = SetWindowsHookEx (WH_CBT, PTD_CBT_proc, glob_hinst, 0); |
95 |
if (cbt_hook == NULL) |
if (cbt_hook == NULL) |
96 |
|
{ |
97 |
|
char buf[500]; |
98 |
|
|
99 |
|
FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError (), |
100 |
|
MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT), |
101 |
|
buf, sizeof buf -1, NULL); |
102 |
|
MessageBox (NULL, buf, "Error", MB_OK|MB_ICONSTOP); |
103 |
return FALSE; |
return FALSE; |
104 |
|
} |
105 |
|
|
106 |
|
|
107 |
/* Okay, what are we doing here: |
/* Okay, what are we doing here: |
108 |
* In the past I used the Spy++ application to find out why the old current |
* In the past I used the Spy++ application to find out why the old current |
109 |
* window doesn't work on so much systems. Now we try to use the computer |
* window doesn't work on so much systems. Now we try to use the computer |
237 |
} |
} |
238 |
|
|
239 |
|
|
|
/* Return version of the PTD library. */ |
|
|
extern "C" const char * |
|
|
PTD_get_version (void) |
|
|
{ |
|
|
return PACKAGE_VERSION; |
|
|
} |
|
|
|
|
|
|
|
240 |
/* Display a JPG picture in the given window at the given point. */ |
/* Display a JPG picture in the given window at the given point. */ |
241 |
extern "C" int |
extern "C" int |
242 |
PTD_jpg_show (HWND hwnd, POINT *p, LPCSTR name) |
PTD_jpg_show (HWND hwnd, POINT *p, LPCSTR name) |
272 |
{ |
{ |
273 |
switch (reason) { |
switch (reason) { |
274 |
case DLL_PROCESS_ATTACH: |
case DLL_PROCESS_ATTACH: |
275 |
glob_hinst = hinst; |
glob_hinst = hinst; |
276 |
break; |
break; |
277 |
case DLL_THREAD_ATTACH: |
case DLL_THREAD_ATTACH: |
278 |
break; |
break; |