Changes in trunk/mainwin.cpp [30:10]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mainwin.cpp
r30 r10 18 18 ***/ 19 19 20 // ** CreateMainWindow **************************************************** /* FOLD00*/20 // ** CreateMainWindow **************************************************** /*fold00*/ 21 21 22 22 HWND CreateMainWindow (VOID) 23 23 { 24 #ifdef _QUIET_25 //#if 126 hwndFrame = WinLoadDlg (HWND_OBJECT, NULLHANDLE, NULL, GETMODULE,27 ID_DLG_MAIN, NULL);28 #else29 24 hwndFrame = WinLoadDlg (HWND_DESKTOP, NULLHANDLE, NULL, GETMODULE, 30 25 ID_DLG_MAIN, NULL); 31 #endif32 26 OldFrameWP = WinSubclassWindow (hwndFrame, FrameProcedure); 33 27 … … 76 70 } 77 71 78 // ** Drag **************************************************************** /* FOLD00*/72 // ** Drag **************************************************************** /*fold00*/ 79 73 80 74 VOID Drag (HWND hwnd) … … 116 110 } 117 111 118 // ** FrameProcedure ****************************************************** /* FOLD00*/112 // ** FrameProcedure ****************************************************** /*fold00*/ 119 113 120 114 MRESULT EXPENTRY FrameProcedure (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) … … 279 273 break; 280 274 281 case WID_PB_SETCAPTURETYPE:282 //int capType;283 284 switch (pset->QuerySSWCaptureType ())285 {286 case CAP_WINDOWINT:287 WinSendMsg (hwndFrame, WM_COMMAND,288 MPFROM2SHORT (WID_PB_WINDOWINTERIOR,0), 0);289 case CAP_SCREENREGION:290 WinSendMsg (hwndFrame, WM_COMMAND,291 MPFROM2SHORT (WID_PB_SCREENREGION,0), 0);292 case CAP_WINDOW:293 WinSendMsg (hwndFrame, WM_COMMAND,294 MPFROM2SHORT (WID_PB_WINDOW,0), 0);295 default:296 WinSendMsg (hwndFrame, WM_COMMAND,297 MPFROM2SHORT (WID_PB_SCREEN,0), 0);298 }299 break;300 301 275 case WID_PB_SCREEN: 302 276 usCap = CAP_SCREEN; 303 #ifdef _QUIET_304 //#if 1305 WinShowWindow (g_hwndSettingsDialog, FALSE);306 // WinSendMsg (g_hwndSettingsDialog, WM_CLOSE, 0,0); //Needs to go to the setting dialog307 // Replace current global with pset->GetSettingDialogHwnd () or such308 // Need for all 4 cases;309 #endif310 277 WinSendMsg (hwnd, UM_PREPARECAPTURE, 0,0); 311 278 break; … … 313 280 case WID_PB_SCREENREGION: 314 281 usCap = CAP_SCREENREGION; 315 #ifdef _QUIET_316 //#if 1317 WinShowWindow (g_hwndSettingsDialog, FALSE);318 #endif319 282 WinSendMsg (hwnd, UM_PREPARECAPTURE, 0,0); 320 283 break; … … 322 285 case WID_PB_WINDOWINTERIOR: 323 286 usCap = CAP_WINDOWINT; 324 #ifdef _QUIET_325 //#if 1326 WinShowWindow (g_hwndSettingsDialog, FALSE);327 #endif328 287 WinSendMsg (hwnd, UM_PREPARECAPTURE, 0,0); 329 288 break; … … 331 290 case WID_PB_WINDOW: 332 291 usCap = CAP_WINDOW; 333 #ifdef _QUIET_334 //#if 1335 WinShowWindow (g_hwndSettingsDialog, FALSE);336 #endif337 292 WinSendMsg (hwnd, UM_PREPARECAPTURE, 0,0); 338 293 break; … … 359 314 360 315 usState = STATE_WAITFORHIDE; 361 362 if (usCap == CAP_SCREENREGION || usCap == CAP_SCREEN) {363 #ifdef _QUIET_364 hwndParent = WinQueryFocus(HWND_DESKTOP);365 #else366 hwndParent = WinQueryWindow(hwndFrame, QW_NEXTTOP );367 #endif368 }369 #ifndef _QUIET_370 //#if 0371 316 if (WinQueryButtonCheckstate (hwnd, WID_CB_HIDEWINDOW)) 372 317 WinShowWindow (WinQueryWindow (hwnd, QW_PARENT), FALSE); 373 318 else 374 #endif375 319 WinSendMsg (hwnd, UM_WINDOWHIDDEN, 0,0); 376 320 return MRESULT (FALSE); … … 402 346 { 403 347 usState = STATE_WINDOWSELECTED; 404 int rc = saymsg2(1, hwnd, "Capture", "Do you wish to continue?"); 405 406 if (rc == 1) 407 WinPostMsg (hwnd, UM_WINDOWSELECTED, 408 MPFROMHWND (HWND_DESKTOP), 409 MPFROMHWND (HWND_DESKTOP)); 410 if (rc == 2) 411 WinSendMsg (hwnd, UM_ABORT, 0,0); 412 if (rc == 3) { 413 pset->Dialog (); 414 WinPostMsg (hwnd, UM_WINDOWSELECTED, 415 MPFROMHWND (HWND_DESKTOP), 416 MPFROMHWND (HWND_DESKTOP)); 417 } 348 WinPostMsg (hwnd, UM_WINDOWSELECTED, 349 MPFROMHWND (HWND_DESKTOP), 350 MPFROMHWND (HWND_DESKTOP)); 418 351 } 419 352 else … … 484 417 FALSE)); 485 418 hwndCap = HWND (mp1); 486 if (usCap != CAP_SCREENREGION && usCap != CAP_SCREEN) 487 hwndParent = HWND (mp2); 419 hwndParent = HWND (mp2); 488 420 if (pset->SerialCapture ()) 489 421 { … … 546 478 // capture the window to a bitmap and save this 547 479 if (usCap == CAP_SCREENREGION) 548 hbm = CaptureWindow (hwndCap, hwndParent, &rcl, FALSE); 549 else if (usCap == CAP_SCREEN) 550 hbm = CaptureWindow (hwndCap, hwndParent, NULL, FALSE); 480 hbm = CaptureWindow (hwndCap, hwndParent, &rcl, TRUE); 551 481 else 552 482 hbm = CaptureWindow (hwndCap, hwndParent, NULL, TRUE); … … 582 512 WinSetCapture (HWND_DESKTOP, NULLHANDLE); 583 513 584 pset->Load ();585 586 514 WinSendMsg (hwndSnapshot, UM_STOPCAPTURE, 0,0); 587 515 WinStopTimer (hab, hwnd, ulTimer); 588 #ifdef _QUIET_ 589 //#if 1 590 // ? FIXME to give option to reshow window. 591 if (WinQueryButtonCheckstate (hwnd, WID_CB_HIDEWINDOW)) 592 WinSendMsg (g_hwndSettingsDialog, WM_CLOSE, 0,0); 593 else if (WinIsWindow ( hab, g_hwndSettingsDialog) && 594 ! WinIsWindowVisible (g_hwndSettingsDialog)) 595 WinShowWindow (g_hwndSettingsDialog, TRUE); 596 pset->HideWindow (TRUE); 597 #else 516 598 517 // re-show the windows if they are hidden 599 518 // FIXME using global hwndFrame is pretty yukki … … 602 521 if (! WinIsWindowVisible (hwndSnapshot) && pset->SnapshotWindow ()) 603 522 WinShowWindow (hwndSnapshot, TRUE); 604 #endif 523 605 524 WinEnableWindow (hwnd, TRUE); 606 525 WinSetActiveWindow (HWND_DESKTOP, hwnd);
Note:
See TracChangeset
for help on using the changeset viewer.