Changeset 1455 for trunk/dll/notify.c
- Timestamp:
- Sep 15, 2009, 4:43:55 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/notify.c
r1444 r1455 26 26 #include <string.h> 27 27 #include <ctype.h> 28 #include <stddef.h> 28 #include <stddef.h> // _threadid 29 29 30 30 #define INCL_DOS 31 31 #define INCL_WIN 32 32 #define INCL_GPI 33 #define INCL_LONGLONG 33 #define INCL_LONGLONG // dircnrs.h 34 34 35 35 #include "fm3dll.h" … … 41 41 #include "fm3dlg.h" 42 42 #include "fm3str.h" 43 #include "errutil.h" 44 #include "strutil.h" 43 #include "errutil.h" // Dos_Error... 44 #include "strutil.h" // GetPString 45 45 #include "notify.h" 46 46 #include "presparm.h" // SetPresParams … … 55 55 // Data definitions 56 56 static PSZ pszSrcFile = __FILE__; 57 static volatile HWND hwndNotify; 57 static volatile HWND hwndNotify; // 16 Apr 08 SHL 58 58 static volatile PCSZ pszCachedNote; // 16 Jul 09 SHL 59 59 … … 170 170 { 171 171 char *p; 172 HWND hwnd = (HWND) 172 HWND hwnd = (HWND)0, hwndP; 173 173 LONG x, y, cx, cy; 174 174 SWP swp, swpS, swpS2; … … 217 217 if (!hwnd) 218 218 Win_Error(hwndP, hwndP, pszSrcFile, __LINE__, 219 219 PCSZ_WINCREATEWINDOW); 220 220 221 221 if (p != str) … … 306 306 // Remember showing for restart 307 307 fThreadNotes = TRUE; 308 PrfWriteProfileData(fmprof, 309 FM3Str, "ThreadNotes", &fThreadNotes, sizeof(BOOL)); 310 fThreadNotes = FALSE; // Optimize 308 PrfWriteProfileData(fmprof, 309 FM3Str, 310 "ThreadNotes", 311 &fThreadNotes, 312 sizeof(BOOL)); 313 fThreadNotes = FALSE; // Optimize shutdown 311 314 312 315 // 16 Jul 09 SHL Added … … 445 448 ndx--; 446 449 len = (SHORT)WinSendDlgItemMsg(hwnd, NOTE_LISTBOX, 447 LM_QUERYITEMTEXTLENGTH, 450 LM_QUERYITEMTEXTLENGTH, 448 451 MPFROMSHORT(ndx), MPVOID); 449 452 if (len != LIT_ERROR) { … … 471 474 case WM_DESTROY: 472 475 if (hwndNotify == hwnd) { 473 // Remember not open 474 fThreadNotes = FALSE; 476 fThreadNotes = FALSE; // Remember not open 475 477 PrfWriteProfileData(fmprof, 476 478 FM3Str, "ThreadNotes", &fThreadNotes, sizeof(BOOL)); 477 hwndNotify = (HWND) 479 hwndNotify = (HWND)0; 478 480 } 479 481 if (hptrIcon) { … … 481 483 hptrIcon = (HPOINTER)0; // 16 Jul 09 SHL 482 484 } 483 if (!PostMsg((HWND) 484 WinSendMsg((HWND) 485 if (!PostMsg((HWND)0, WM_QUIT, MPVOID, MPVOID)) 486 WinSendMsg((HWND)0, WM_QUIT, MPVOID, MPVOID); 485 487 break; 486 488 } … … 492 494 */ 493 495 494 static VOID NoteThread(VOID * 496 static VOID NoteThread(VOID *args) 495 497 { 496 498 HAB hab = WinInitialize(0);
Note:
See TracChangeset
for help on using the changeset viewer.