/[winpt]/trunk/Src/wptMainProc.cpp
ViewVC logotype

Contents of /trunk/Src/wptMainProc.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 328 - (show annotations)
Fri Sep 25 16:07:38 2009 UTC (15 years, 5 months ago) by twoaday
File size: 18819 byte(s)


1 /* wptMainProc.cpp - Main window procedure
2 * Copyright (C) 2000-2009 Timo Schulz
3 *
4 * This file is part of WinPT.
5 *
6 * WinPT is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * WinPT is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 */
16
17 #ifdef HAVE_CONFIG_H
18 #include <config.h>
19 #endif
20
21 /* Only define the constant if needed. */
22 #ifndef _WIN32_IE
23 #define _WIN32_IE 0x0600
24 #endif
25
26 #include <windows.h>
27 #include <commctrl.h>
28 #include <io.h>
29
30 #include "resource.h"
31 #include "wptTypes.h"
32 #include "wptGPG.h"
33 #include "wptW32API.h"
34 #include "wptVersion.h"
35 #include "wptCommonCtl.h"
36 #include "wptContext.h" /* for passphrase_s */
37 #include "wptDlgs.h"
38 #include "wptErrors.h"
39 #include "wptNLS.h"
40 #include "wptHotkey.h"
41 #include "wptRegistry.h"
42 #include "wptKeyserver.h"
43 #include "wptAgent.h"
44 #include "wptUTF8.h"
45 #include "wptKeylist.h"
46 #include "wptKeyManager.h"
47 #include "wptCard.h"
48 #include "wptCardEdit.h"
49
50
51 int update_keycache (HWND hwnd);
52
53 /* Command for the Key Manager dialog. (0=no command) */
54 static int cmd = 0;
55
56 /* 1 indicates that the clipboard will be emptied o exit. */
57 static int wipe_contents = 0;
58
59
60 /* Dialog box procedure to display all insecure all ElGamal keys. */
61 BOOL CALLBACK
62 elgamal_warn_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam)
63 {
64 gpg_keycache_t pc;
65 gpgme_key_t key;
66 char *uid;
67 char tmp[128+64+1];
68
69 switch (msg) {
70 case WM_INITDIALOG:
71 pc = keycache_get_ctx (1);
72 while (!gpg_keycache_next_key (pc, 0, &key)) {
73 if (key->subkeys->pubkey_algo == GPGME_PK_ELG) {
74 uid = utf8_to_native (key->uids->uid);
75 _snprintf (tmp, DIM (tmp)-1, "(0x%s) %s",
76 key->subkeys->keyid+8, uid);
77 SendDlgItemMessage (dlg, IDC_ELGWARN_LIST, LB_ADDSTRING,
78 0, (LPARAM)(const char *)tmp);
79 free_if_alloc (uid);
80 }
81 }
82 gpg_keycache_rewind (pc);
83 center_window (dlg, NULL);
84 SetForegroundWindow (dlg);
85 break;
86
87 case WM_COMMAND:
88 switch (LOWORD (wparam)) {
89 case IDOK:
90 EndDialog (dlg, TRUE);
91 break;
92 }
93 break;
94 }
95 return FALSE;
96 }
97
98
99 /* Dialog box procedure to confirm to delete the clipboard contents. */
100 static BOOL CALLBACK
101 confirm_delclipboard_dlg (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam)
102 {
103 switch (msg) {
104 case WM_INITDIALOG:
105 SetWindowText (dlg, _("Delete Clipboard Contents"));
106 SetDlgItemText (dlg, IDC_CONFDELCLIP_BRAIN,
107 _("&Remember the answer"));
108 SetDlgItemText (dlg, IDC_CONFDELCLIP_INFO,
109 _("Do you want to delete the contents from the clipboard?"));
110 SetDlgItemText (dlg, IDYES, _("&Yes"));
111 SetDlgItemText (dlg, IDNO, _("&No"));
112 center_window (dlg, NULL);
113 SetForegroundWindow (dlg);
114 break;
115
116 case WM_COMMAND:
117 switch (LOWORD (wparam)) {
118 case IDYES:
119 wipe_contents = 1;
120 if (IsDlgButtonChecked (dlg, IDC_CONFDELCLIP_BRAIN))
121 set_reg_winpt_flag ("WipeClipboard", 1);
122 EndDialog (dlg, 1);
123 break;
124
125 case IDNO:
126 wipe_contents = 0;
127 if (IsDlgButtonChecked (dlg, IDC_CONFDELCLIP_BRAIN))
128 set_reg_winpt_flag ("WipeClipboard", 0);
129 EndDialog (dlg, 0);
130 break;
131 }
132 break;
133 }
134 return FALSE;
135 }
136
137
138 /* Handle the various command requests for the clipboard
139 and the current window. */
140 static void
141 clip_gpg_dlg (HWND hwnd, UINT id, int *r_upd_window)
142 {
143 gpgme_error_t err = gpg_error (GPG_ERR_NO_ERROR);
144 int type;
145 int disable_viewer = 0;
146
147 if (r_upd_window) {
148 *r_upd_window = 1;
149 /* for the current window mode it makes no sense to
150 use the clipboard viewer for decryption because the
151 text will be pasted directly into the window. */
152 disable_viewer = 1;
153 }
154 if ((id == ID_WINPT_SIGN || id == ID_WINPT_SIGNENCRYPT)
155 && gnupg_access_keyring (0)) {
156 msg_box (hwnd, _("Could not access secret keyring."), _("Sign"), MB_ERR);
157 return;
158 }
159
160 switch (id) {
161 case ID_WINPT_SYMENC:
162 case ID_WINPT_CURRWND_SYMENC:
163 err = gpg_clip_sym_encrypt ();
164 if (err && r_upd_window)
165 *r_upd_window = 0;
166 break;
167
168 case ID_WINPT_ENCRYPT:
169 case ID_WINPT_CURRWND_ENCRYPT:
170 dialog_box_param (glob_hinst, (LPCSTR)IDD_WINPT_ENCRYPT, hwnd,
171 clip_encrypt_dlg_proc, 0,
172 _("Encryption"), IDS_WINPT_ENCRYPT);
173 break;
174
175 case ID_WINPT_SIGN:
176 case ID_WINPT_CURRWND_SIGN:
177 dialog_box_param (glob_hinst, (LPCSTR)IDD_WINPT_SIGN, hwnd,
178 clip_sign_dlg_proc, 0,
179 _("Signing"), IDS_WINPT_SIGN);
180 break;
181
182 case ID_WINPT_SIGNENCRYPT:
183 case ID_WINPT_CURRWND_SIGNENCRYPT:
184 dialog_box_param (glob_hinst, (LPCSTR)IDD_WINPT_SIGNENC, hwnd,
185 clip_signenc_dlg_proc, 0,
186 _("Sign & Encrypt"), IDS_WINPT_SIGNENC);
187 break;
188
189 case ID_WINPT_DECRYPT_VERIFY:
190 case ID_WINPT_CURRWND_DECRYPT_VERIFY:
191 err = gpg_clip_get_pgptype (&type);
192 if (err) {
193 msg_box (hwnd, gpgme_strerror (err), _("Clipboard"), MB_ERR);
194 if (r_upd_window)
195 *r_upd_window = 0;
196 break;
197 }
198 if ((type & PGP_MESSAGE) && !(type & PGP_CLEARSIG))
199 err = clip_decrypt_dlg (hwnd, disable_viewer?
200 0 : reg_prefs.use_viewer);
201 else if ((type & PGP_SIG) && !(type & PGP_CLEARSIG)) {
202 text_input_s input;
203 gpgme_data_t sig;
204
205 memset (&input, 0, sizeof (input));
206 err = gpg_data_new_from_clipboard (&sig, 0);
207 if (err) {
208 msg_box (hwnd, gpgme_strerror (err),_("Verify"), MB_ERR);
209 if (r_upd_window)
210 *r_upd_window = 0;
211 return;
212 }
213 input.type = 0;
214 dialog_box_param (glob_hinst, (LPCSTR)IDD_WINPT_TEXT, hwnd,
215 text_input_dlg_proc, (LPARAM)&input,
216 _("Text Input"), IDS_WINPT_TEXT);
217
218 /* the dialog might have changed the clipboard, so we restore
219 the original state (again). */
220 gpg_data_release_to_clipboard (sig, 0);
221 if (input.length > 0) {
222 dialog_box_param (glob_hinst, (LPCSTR)IDD_WINPT_VERIFY, hwnd,
223 clip_verify_dlg_proc, (LPARAM)&input,
224 _("Verify"), IDS_WINPT_VERIFY);
225 input.length = 0;
226 free_if_alloc (input.data);
227 }
228 if (r_upd_window)
229 *r_upd_window = 0;
230 }
231 else if (type & PGP_CLEARSIG) {
232 dialog_box_param (glob_hinst, (LPCSTR)IDD_WINPT_VERIFY, hwnd,
233 clip_verify_dlg_proc, 0,
234 _("Verify"), IDS_WINPT_VERIFY);
235 if (r_upd_window)
236 *r_upd_window = 0;
237 }
238 else if ((type & PGP_PUBKEY) || (type & PGP_SECKEY)) {
239 km_clip_import (GetDesktopWindow (), NULL, NULL);
240 if (r_upd_window)
241 *r_upd_window = 0;
242 }
243 else {
244 msg_box (hwnd, _("Unknown OpenPGP type."), _("Clipboard"), MB_ERR);
245 if (r_upd_window)
246 *r_upd_window = 0;
247 }
248 }
249 }
250
251
252 /* Load the Card Manager with the current card. */
253 static void
254 load_card_manager (void)
255 {
256 gpg_card_t card;
257
258 card = gpg_card_load ();
259 if (!card)
260 return;
261
262 dialog_box_param (glob_hinst, (LPCSTR)IDD_WINPT_CARD_EDIT,
263 GetDesktopWindow (), card_edit_dlg_proc,
264 (LPARAM)card,
265 _("Card Edit"), IDS_WINPT_CARD_EDIT);
266 gpg_card_release (card);
267 }
268
269
270 /* Add the winpt symbol to the task bar. */
271 static void
272 add_taskbar_icon (HWND hwnd, NOTIFYICONDATA *nid)
273 {
274 nid->cbSize = sizeof (NOTIFYICONDATA);
275 nid->uFlags = NIF_MESSAGE | NIF_ICON | NIF_TIP;
276 nid->uCallbackMessage = WM_USER;
277 nid->hWnd = hwnd;
278 nid->hIcon = LoadIcon (glob_hinst, MAKEINTRESOURCE (IDI_WINPT));
279 strcpy (nid->szTip, "Windows Privacy Tray v"PGM_VERSION);
280 Shell_NotifyIcon (NIM_ADD, nid);
281 DestroyIcon (nid->hIcon);
282 }
283
284
285 /* Initialize all needed common controls. */
286 static void
287 init_common_controls (void)
288 {
289 INITCOMMONCONTROLSEX cce;
290
291 /* date control, toolbar, trackbar, ... */
292 cce.dwSize = sizeof (INITCOMMONCONTROLSEX);
293 cce.dwICC = ICC_DATE_CLASSES|ICC_BAR_CLASSES;
294 InitCommonControlsEx (&cce);
295 }
296
297
298 /* Wipe the clipboard if the user requested it. */
299 static void
300 wipe_clipboard (int manual_shutdown)
301 {
302 int has_data = 0;
303
304 if (!gpg_clip_istext_avail (&has_data) && has_data) {
305 int chk = get_reg_winpt_flag ("WipeClipboard");
306 if (chk == -1 && manual_shutdown)
307 DialogBoxParam (glob_hinst, (LPCTSTR)IDD_WINPT_CONFDELCLIP,
308 GetDesktopWindow (), confirm_delclipboard_dlg, 0);
309 if (wipe_contents || chk)
310 set_clip_text (NULL, " ", 1);
311 wipe_contents = 0;
312 }
313 }
314
315
316
317 /* Main message loop for the tray window. */
318 LRESULT CALLBACK
319 winpt_main_proc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
320 {
321 static NOTIFYICONDATA NID;
322 static DWORD cookie;
323 static int use_hotkey = 0;
324 static int manual_shutdown = 0;
325 HWND wnd, cw_main, cw_focus;
326 gpgme_error_t err;
327 const char *s;
328 int rc, set_wc = 0;
329 int has_data = 0;
330
331 switch (msg) {
332 case WM_CREATE:
333 add_taskbar_icon (hwnd, &NID);
334 rc = wsock_init ();
335 if (rc)
336 msg_box (NULL, winpt_strerror (rc), "Winsock2 DLL", MB_ERR);
337 if (!reg_prefs.no_hotkeys) {
338 rc = hotkeys_register (hwnd);
339 if (rc)
340 msg_box (hwnd, hotkeys_strerror (), winpt_strerror (rc), MB_ERR);
341 }
342 rc = PTD_initialize ();
343 if (!rc)
344 msg_box (hwnd, _("Could not set current window mode hooks."),
345 _("WinPT Error"), MB_OK);
346 mapi_init ();
347 init_common_controls ();
348 //html_help_init (&cookie);
349 LoadLibrary ("RichEd32.Dll");
350 manual_shutdown = 0;
351 break;
352
353 case WM_ENDSESSION:
354 case WM_DESTROY:
355 case WM_CLOSE:
356 case WM_QUIT:
357 mapi_deinit ();
358 wsock_end ();
359 keycache_release (1);
360 /* FIXME: There seems to be a problem with the backup at the
361 * end on EFS file systems. I currently have no access to
362 * any EFS partition so I need to do some general investigations
363 * to find out what the problem is.
364 */
365 gnupg_backup_keyrings (reg_prefs.auto_backup,
366 reg_prefs.backup.mode,
367 reg_prefs.backup.include_secr);
368 free_reg_prefs ();
369 free_gnupg_table ();
370 wipe_clipboard (manual_shutdown);
371 gettext_free_current_domain ();
372 hotkeys_unregister (hwnd);
373 PTD_delete ();
374 agent_flush_cache ();
375 //html_help_deinit (cookie);
376 debug_end ();
377 Shell_NotifyIcon (NIM_DELETE, &NID);
378 PostQuitMessage (0);
379 ExitProcess (0);
380 break;
381
382 case WM_USER:
383 switch (lparam) {
384 case WM_RBUTTONUP:
385 case WM_LBUTTONUP:
386 HMENU hm, popup;
387 POINT p;
388
389 if (!wait_for_progress_cb (0))
390 break;
391 gpg_read_only = gpg_check_permissions (0) == 0? 0 : 1;
392 SetForegroundWindow (hwnd);
393 GetCursorPos (&p);
394 hm = LoadMenu (glob_hinst, MAKEINTRESOURCE (IDR_WINPT));
395 popup = GetSubMenu (hm, 0);
396
397 if (!scard_support)
398 set_menu_state (popup, ID_WINPT_CARD, MF_DISABLED|MF_GRAYED);
399 set_menu_text (popup, ID_WINPT_FILE, _("File Manager..."));
400 set_menu_text (popup, ID_WINPT_KEY, _("Key Manager..."));
401 set_menu_text (popup, ID_WINPT_CARD, _("Card Manager..."));
402 set_menu_text (popup, ID_WINPT_EDIT, _("Edit..."));
403 set_menu_text (popup, ID_WINPT_ABOUT, _("About..."));
404 set_menu_text (popup, ID_WINPT_QUIT, _("Exit"));
405 set_menu_text (popup, ID_WINPT_SYMENC, _("Symmetric"));
406 set_menu_text (popup, ID_WINPT_ENCRYPT, _("Encrypt"));
407 set_menu_text (popup, ID_WINPT_SIGN, _("Sign"));
408 set_menu_text (popup, ID_WINPT_SIGNENCRYPT, _("Sign && Encrypt"));
409 set_menu_text (popup, ID_WINPT_DECRYPT, _("Decrypt/Verify"));
410 set_menu_text (popup, ID_WINPT_VERIFY, _("Verify"));
411 set_menu_text (popup, ID_WINPT_CURRWND_ENCRYPT, _("Encrypt"));
412 set_menu_text (popup, ID_WINPT_CURRWND_SIGNENCRYPT, _("Sign && Encrypt"));
413 set_menu_text (popup, ID_WINPT_CURRWND_DECRYPT_VERIFY, _("Decrypt/Verify"));
414 set_menu_text (popup, ID_WINPT_CURRWND_SIGN, _("Sign"));
415 set_menu_text (popup, ID_WINPT_CURRWND_SYMENC, _("Symmetric"));
416 if (!secret_key_available ()) {
417 set_menu_state (popup, ID_WINPT_SIGN, MF_DISABLED|MF_GRAYED);
418 set_menu_state (popup, ID_WINPT_CURRWND_SIGN, MF_DISABLED|MF_GRAYED);
419 set_menu_state (popup, ID_WINPT_SIGNENCRYPT, MF_DISABLED|MF_GRAYED);
420 set_menu_state (popup, ID_WINPT_CURRWND_SIGNENCRYPT, MF_DISABLED|MF_GRAYED);
421 }
422 /* change popup texts */
423 set_menu_text_bypos (popup, 3, _("Clipboard"));
424 set_menu_text_bypos (popup, 4, _("Current Window"));
425 set_menu_text_bypos (popup, 6, _("Preferences"));
426
427 if (gettext_domain_needs_refresh())
428 gettext_set_user_domain();
429 TrackPopupMenu (popup, TPM_RIGHTALIGN, p.x, p.y, 0, hwnd, NULL);
430 PostMessage (hwnd, WM_USER, 0, 0);
431 DestroyMenu (popup);
432 DestroyMenu (hm);
433 break;
434 }
435 break;
436
437 case WM_HOTKEY:
438 cmd = 0;
439 switch (wparam) {
440 case WPT_CLIP_ENCRYPT_ID:
441 SendMessage( hwnd, WM_COMMAND, ID_WINPT_ENCRYPT, 0 );
442 break;
443
444 case WPT_CLIP_DECRYPT_VERIFY_ID:
445 SendMessage( hwnd, WM_COMMAND, ID_WINPT_DECRYPT_VERIFY, 0 );
446 break;
447
448 case WPT_CLIP_SIGN_ID:
449 SendMessage( hwnd, WM_COMMAND, ID_WINPT_SIGN, 0 );
450 break;
451
452 case WPT_CLIP_SIGN_ENCRYPT_ID:
453 SendMessage( hwnd, WM_COMMAND, ID_WINPT_SIGNENCRYPT, 0 );
454 break;
455
456 case WPT_CURRWND_ENCRYPT_ID:
457 use_hotkey = 1;
458 SendMessage( hwnd, WM_COMMAND, ID_WINPT_CURRWND_ENCRYPT, 0 );
459 break;
460
461 case WPT_CURRWND_SIGN_ID:
462 use_hotkey = 1;
463 SendMessage( hwnd, WM_COMMAND, ID_WINPT_CURRWND_SIGN, 0 );
464 break;
465
466 case WPT_CURRWND_SIGN_ENCRYPT_ID:
467 use_hotkey = 1;
468 SendMessage( hwnd, WM_COMMAND, ID_WINPT_CURRWND_SIGNENCRYPT, 0 );
469 break;
470
471 case WPT_CURRWND_DECRYPT_VERIFY_ID:
472 use_hotkey = 1;
473 SendMessage( hwnd, WM_COMMAND, ID_WINPT_CURRWND_DECRYPT_VERIFY, 0 );
474 break;
475
476 case WPT_AGENT_FORGET_ID:
477 rc = msg_box (hwnd, _("Remove all passphrases from cache?"),
478 _("WinPT"), MB_YESNO|MB_ICONQUESTION);
479 if (rc == IDYES)
480 agent_flush_cache ();
481 break;
482 }
483 break;
484
485 case WM_COMMAND:
486 if (gnupg_access_keyring (1)) {
487 if (log_box( "WinPT", MB_ERR|MB_YESNO,
488 _("Could not access public keyring, exit WinPT?") ) == IDYES)
489 SendMessage (hwnd, WM_DESTROY, 0, 0);
490 break;
491 }
492 switch (wparam) {
493 /** Clipboard operations **/
494 case ID_WINPT_SYMENC:
495 case ID_WINPT_ENCRYPT:
496 case ID_WINPT_SIGN:
497 case ID_WINPT_SIGNENCRYPT:
498 case ID_WINPT_DECRYPT_VERIFY:
499 err = gpg_clip_istext_avail (&has_data);
500 if (err) {
501 msg_box (hwnd, gpgme_strerror (err),_("Clipboard"), MB_ERR);
502 break;
503 }
504 if (!has_data) {
505 msg_box (hwnd, winpt_strerror (WPTERR_CLIP_EMPTY),
506 _("Clipboard"), MB_ERR);
507 break;
508 }
509 clip_gpg_dlg (hwnd, (int)wparam, NULL);
510 break;
511
512 /** Current window operations **/
513 case ID_WINPT_CURRWND_SYMENC:
514 case ID_WINPT_CURRWND_ENCRYPT:
515 case ID_WINPT_CURRWND_SIGNENCRYPT:
516 case ID_WINPT_CURRWND_DECRYPT_VERIFY:
517 case ID_WINPT_CURRWND_SIGN:
518 rc = copy_window_content (hwnd, &cw_main, &cw_focus, use_hotkey);
519 if (rc) {
520 log_box (_("WinPT Error"), MB_ERR,
521 _("Make sure that the window contains text.\n"
522 "%s."),
523 winpt_strerror (WPTERR_CURR_WND));
524 break;
525 }
526 clip_gpg_dlg (hwnd, (int)wparam, &set_wc);
527 if (set_wc == 1)
528 paste_window_content (hwnd, cw_main, cw_focus);
529 use_hotkey = 0;
530 break;
531
532 /** File handling **/
533 case ID_WINPT_FILE:
534 s = _("File Manager (use drag & drop to add files)");
535 wnd = FindWindow (NULL, s);
536 if (wnd && IsIconic (wnd))
537 ShowWindow (wnd, SW_RESTORE);
538 dialog_box_param (glob_hinst, (LPCSTR)IDD_WINPT_FILE,
539 GetDesktopWindow (), file_manager_dlg_proc, 0,
540 s, IDS_WINPT_FILE);
541 break;
542
543 /** Misc **/
544 case ID_WINPT_KEY:
545 wnd = FindWindow (NULL, _("Key Manager"));
546 if (wnd && IsIconic (wnd))
547 ShowWindow (wnd, SW_RESTORE);
548 if (wnd)
549 SetForegroundWindow (wnd);
550 dialog_box_param (glob_hinst, (LPCSTR)IDD_WINPT_KEYMISC,
551 GetDesktopWindow(), keymanager_dlg_proc,
552 cmd != 0? (LPARAM)cmd : 0,
553 _("Key Manager"), IDS_WINPT_KEYMISC);
554 cmd = 0;
555 break;
556
557 case ID_WINPT_CARD:
558 load_card_manager ();
559 break;
560
561 case ID_WINPT_EDIT:
562 dialog_box_param( glob_hinst, (LPCSTR)IDD_WINPT_CLIPEDIT,
563 GetDesktopWindow(), clip_edit_dlg_proc, 0,
564 _("Clipboard Editor"), IDS_WINPT_CLIPEDIT );
565 break;
566
567 case ID_WINPT_ABOUT:
568 dialog_box_param( glob_hinst, (LPCSTR)IDD_WINPT_ABOUT, GetDesktopWindow(),
569 about_winpt_dlg_proc, 0,
570 _("About WinPT"), IDS_WINPT_ABOUT );
571 break;
572
573 case ID_WINPT_PREFS:
574 dialog_box_param( glob_hinst, (LPCSTR)IDD_WINPT_PREFS, GetDesktopWindow(),
575 prefs_dlg_proc, 0,
576 _("WinPT Preferences"), IDS_WINPT_PREFS );
577 break;
578
579 case ID_WINPT_GPGPREFS:
580 rc = dialog_box_param (glob_hinst, (LPCSTR)IDD_WINPT_GPGPREFS,
581 GetDesktopWindow(), gpgprefs_dlg_proc, 0,
582 _("GnuPG Preferences"), IDS_WINPT_GPGPREFS);
583 if (rc == TRUE)
584 update_keycache (GetDesktopWindow ());
585 break;
586
587 case ID_WINPT_QUIT:
588 manual_shutdown = 1;
589 SendMessage (hwnd, WM_DESTROY, 0, 0);
590 break;
591 }
592 break;
593 }
594
595 return DefWindowProc (hwnd, msg, wparam, lparam);
596 }

Properties

Name Value
svn:eol-style native

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26