65 |
} |
} |
66 |
|
|
67 |
|
|
68 |
|
/* Quick and dirty check if the dialog is a common dialog |
69 |
|
and the 'File Save' style. */ |
70 |
|
static int |
71 |
|
is_filesave_dlg (HWND h) |
72 |
|
{ |
73 |
|
HWND button = GetDlgItem (h, 1040); |
74 |
|
char wclass[200]; |
75 |
|
|
76 |
|
if (button == NULL) |
77 |
|
return 0; |
78 |
|
if (GetClassName (button, wclass, 200) > 0 |
79 |
|
&& !stricmp (wclass, "Button")) |
80 |
|
return -1; |
81 |
|
return 0; |
82 |
|
} |
83 |
|
|
84 |
|
|
85 |
/* CTB hook procedure. |
/* CTB hook procedure. |
86 |
Monitors the creation of all windows and subclass the window |
Monitors the creation of all windows and subclass the window |
87 |
if it belongs to the Outlook Express message class. */ |
if it belongs to the Outlook Express message class. */ |
112 |
oe_hwnd = hwnd; |
oe_hwnd = hwnd; |
113 |
} |
} |
114 |
break; |
break; |
115 |
|
|
116 |
|
#if 0 |
117 |
|
case HCBT_ACTIVATE: |
118 |
|
if (plugin_active != NULL && |
119 |
|
WaitForSingleObject (plugin_active, 0) == WAIT_OBJECT_0) { |
120 |
|
char wclass[200]; |
121 |
|
|
122 |
|
if (GetClassName (hwnd, wclass, sizeof (wclass)-1) <= 0 || |
123 |
|
!strstr (wclass, "#32770") || !is_filesave_dlg (hwnd)) |
124 |
|
break; |
125 |
|
of_proc_old = (WNDPROC)GetWindowLong (hwnd, GWL_WNDPROC); |
126 |
|
SetWindowLong (hwnd, GWL_WNDPROC, (LONG)(WNDPROC)of_proc); |
127 |
|
} |
128 |
|
break; |
129 |
|
#endif |
130 |
} |
} |
131 |
return CallNextHookEx (ctb_hook, code, wparam, lparam); |
return CallNextHookEx (ctb_hook, code, wparam, lparam); |
132 |
} |
} |