- Timestamp:
- Apr 7, 2018, 10:04:50 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
mainwin.cpp (modified) (16 diffs)
-
settings.cpp (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/mainwin.cpp
r41 r51 159 159 switch (msg) 160 160 { 161 #ifndef _QUIET_ 161 162 case WM_CREATE: 163 #else 164 case WM_INITDLG: 165 #endif 162 166 { 163 167 #ifdef _DOLOGDEBUG_ 164 168 LogDebug( "MainWin:WindowProcedure: WM_CREATE" ); 165 169 #endif 170 #ifndef _QUIET_ 166 171 USHORT usResID = WinQueryWindowUShort (hwnd, QWS_ID); 167 172 … … 177 182 rcl.yTop - rcl.yBottom, 178 183 SWP_SHOW | SWP_MOVE | SWP_SIZE | SWP_ZORDER); 179 } 184 #endif 185 } 186 #ifdef _QUIET_ 187 WinSendDlgItemMsg (hwnd, WID_CB_HIDEWINDOW, BM_SETCHECK, 188 MPFROMLONG (TRUE), MPFROMLONG (0)); 189 WinSendDlgItemMsg (hwnd, WID_CB_DELAYEDCAPTURE, BM_SETCHECK, 190 MPFROMLONG (pset->DelayedCapture ()), 191 MPFROMLONG (0)); 192 WinSetFocus( WinWindowFromID (g_hwndPage0, WID_RB_FILE), FALSE ); 193 return MRESULT (FALSE); 194 #else 180 195 break; 196 #endif 181 197 182 198 case WM_QUIT: … … 210 226 BM_QUERYCHECK, 0, 0)); 211 227 pset->HideWindow (f); 212 228 #ifndef _QUIET_ 213 229 f = BOOL (WinSendDlgItemMsg (hwnd, WID_CB_DELAYEDCAPTURE, 214 230 BM_QUERYCHECK, 0, 0)); 215 231 pset->DelayedCapture (f); 232 #endif 216 233 } 217 234 return MRESULT (FALSE); … … 221 238 return MRESULT (FALSE); 222 239 240 #ifndef _QUIET_ 223 241 case WM_PAINT: 224 242 { … … 237 255 } 238 256 break; 257 #endif 239 258 240 259 case WM_COMMAND: … … 244 263 if (usState != STATE_IDLE) 245 264 { 265 //Attempt to open settings probably a hang 266 if (SHORT1FROMMP (mp1) == WID_PB_SETTINGS) { 267 WinSendMsg (hwnd, UM_ABORT, 0,0); 268 pset->Dialog (); 269 } 246 270 // this means ESC was pressed 247 if (SHORT1FROMMP (mp1) == DID_CANCEL)248 WinSendMsg (hwnd, UM_ABORT, 0,0);271 else if (SHORT1FROMMP (mp1) == DID_CANCEL) 272 WinSendMsg (hwnd, UM_ABORT, MPFROMLONG(1),0); 249 273 return MRESULT (FALSE); 250 274 } … … 344 368 345 369 case WID_PB_EXIT: 346 WinSendMsg (hwnd, WM_CLOSE, 0,0); 370 WinSendMsg (WinWindowFromID (hwndFrame, FID_CLIENT), 371 WM_CLOSE, 0,0); 347 372 break; 348 373 … … 371 396 #endif 372 397 } 373 else {398 /*else { 374 399 SWP swp; 375 400 CHAR ach[32] = {0}; … … 386 411 return MRESULT (FALSE); 387 412 } 388 } 413 } */ 389 414 #ifndef _QUIET_ 390 415 if (WinQueryButtonCheckstate (hwnd, WID_CB_HIDEWINDOW)) { … … 419 444 420 445 case CAP_SCREENREGION: 446 #ifdef _QUIET_ 447 WinSetFocus(HWND_DESKTOP, hwnd); 448 #endif 421 449 if (DoTracking (&rcl)) 422 450 { … … 429 457 MPFROMHWND (HWND_DESKTOP)); 430 458 if (rc == 2) 431 WinSendMsg (hwnd, UM_ABORT, 0,0);459 WinSendMsg (hwnd, UM_ABORT, MPFROMLONG(1),0); 432 460 if (rc == 3) { 433 461 pset->Dialog (); … … 443 471 case CAP_WINDOWINT: 444 472 fInterior = TRUE; 473 #ifdef _QUIET_ 474 WinSetFocus(HWND_DESKTOP, hwnd); 475 #endif 445 476 StartSelection (hwnd); 446 477 break; … … 448 479 case CAP_WINDOW: 449 480 fInterior = FALSE; 481 #ifdef _QUIET_ 482 WinSetFocus(HWND_DESKTOP, hwnd); 483 #endif 450 484 StartSelection (hwnd); 451 485 break; … … 525 559 case WM_TIMER: 526 560 ulCountdown --; 527 528 if( ulCountdown % 20 == 0 ) { 529 WinSendMsg (hwndSnapshot, UM_COUNTDOWN, MPFROMLONG (ulCountdown), 0); 530 531 if (pset->DelayCountdown () && !pset->SerialCapture ()) 532 DoCountdown (ulCountdown); 533 } 561 562 if( ulCountdown % 20 == 0 ) 563 WinSendMsg (hwndSnapshot, UM_COUNTDOWN, 564 MPFROMLONG (ulCountdown), 0); 565 if (pset->DelayCountdown () && !pset->SerialCapture ()) 566 DoCountdown (ulCountdown); 534 567 535 568 if (ulCountdown == 0) … … 593 626 594 627 case UM_ABORT: 595 DosBeep (75, 200); 628 if (LONGFROMMP(mp1) != 1) 629 DosBeep (75, 200); 596 630 WinSendMsg (hwnd, UM_CLEANUP, 0,0); 597 631 return MRESULT (FALSE); … … 631 665 LogDebug( "MainWin:WindowProcedure:WinDefWindowProc->0x%04x", msg ); 632 666 #endif 633 return WinDefWindowProc (hwnd, msg, mp1, mp2); 667 if (hwnd == g_hwndPage0) 668 return WinDefDlgProc (hwnd, msg, mp1, mp2); 669 else 670 return WinDefWindowProc (hwnd, msg, mp1, mp2); 634 671 } 635 672 -
trunk/settings.cpp
r41 r51 219 219 } 220 220 #ifndef _QUIET_ 221 //#if 0222 221 // open and assign dialogs to pages 223 222 hwndPage[0] = WinLoadDlg (hwndNB, hwndNB, (PFNWP) Page1Procedure, … … 263 262 WinSendDlgItemMsg (g_hwndPage0, WID_RB_FILE, BM_CLICK, 264 263 MPFROMSHORT (TRUE), 0); 265 WinSendDlgItemMsg (g_hwndPage0, WID_CB_HIDEWINDOW, BM_SETCHECK,266 MPFROMLONG (TRUE), MPFROMLONG (0));264 //WinSendDlgItemMsg (g_hwndPage0, WID_CB_HIDEWINDOW, BM_SETCHECK, 265 // MPFROMLONG (TRUE), MPFROMLONG (0)); 267 266 //WinSetFocus (WinWindowFromID (hwndDlg, WID_PB_OK), TRUE); 268 //WinSetFocus( hwndPage[0], TRUE );267 //WinSetFocus( hwndPage[0], FALSE ); 269 268 #ifdef _QUIET_ 270 269 if (HACCEL haccel = WinLoadAccelTable (hab, GETMODULE, 1)) { 271 270 int rc = WinSetAccelTable (hab, haccel, hwndDlg); 272 _PmpfF(( " Acceltable %i", rc)); 273 } 274 #endif 275 WinSetActiveWindow( HWND_DESKTOP, hwndPage[0] ); 271 } 272 #endif 273 WinSetActiveWindow( HWND_DESKTOP, hwndDlg ); 276 274 #ifdef _DOLOGDEBUG_ 277 275 LogDebug( "Dialog: checkpoint 7" ); … … 355 353 break; 356 354 355 case WID_PB_ABOUT: 356 AboutBox (hwnd); 357 break; 358 357 359 case DID_CANCEL: 358 360 { … … 636 638 637 639 case WM_COMMAND: 640 641 if( SHORT1FROMMP( mp1 ) == WID_PB_OK) { 642 saveum = TRUE; 643 WinSendMsg ( g_hwndSettingsDialog, WM_CLOSE, 0,0); 644 } 638 645 if( SHORT1FROMMP( mp1 ) == DID_CANCEL ) 639 646 WinPostMsg( g_hwndSettingsDialog, msg, mp1, mp2 ); … … 657 664 pset->AdjustButton (hwnd, WID_CB_DELAYCOUNTDOWN, 658 665 pset->DelayCountdown ()); 666 pset->AdjustButton (hwnd, WID_CB_DELAYEDCAPTURE, 667 pset->DelayedCapture ()); 659 668 660 669 // init delay time sb … … 728 737 pset->DelayCountdown(WinQueryButtonCheckstate 729 738 (hwnd, WID_CB_DELAYCOUNTDOWN)); 739 pset->DelayedCapture (WinQueryButtonCheckstate 740 (hwnd,WID_CB_DELAYEDCAPTURE)); 730 741 #endif 731 742 // get ssw capture type … … 781 792 WinShowWindow (hwndSnapshot, TRUE); 782 793 break; 794 case WID_CB_DELAYEDCAPTURE: 795 796 WinSendDlgItemMsg (g_hwndPage0, WID_CB_DELAYEDCAPTURE, BM_SETCHECK, 797 MPFROMLONG (WinQueryButtonCheckstate 798 (hwnd,WID_CB_DELAYEDCAPTURE)), 799 MPFROMLONG (0)); 800 WinSendDlgItemMsg (WinWindowFromID(hwndFrame, FID_CLIENT), 801 WID_CB_DELAYEDCAPTURE, BM_SETCHECK, 802 MPFROMLONG (WinQueryButtonCheckstate 803 (hwnd,WID_CB_DELAYEDCAPTURE)), 804 MPFROMLONG (0)); 805 break; 783 806 } 784 807 return MRESULT (FALSE);
Note:
See TracChangeset
for help on using the changeset viewer.
