Changes in trunk/mainwin.cpp [10:30]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mainwin.cpp
r10 r30 18 18 ***/ 19 19 20 // ** CreateMainWindow **************************************************** /* fold00*/20 // ** CreateMainWindow **************************************************** /*FOLD00*/ 21 21 22 22 HWND CreateMainWindow (VOID) 23 23 { 24 #ifdef _QUIET_ 25 //#if 1 26 hwndFrame = WinLoadDlg (HWND_OBJECT, NULLHANDLE, NULL, GETMODULE, 27 ID_DLG_MAIN, NULL); 28 #else 24 29 hwndFrame = WinLoadDlg (HWND_DESKTOP, NULLHANDLE, NULL, GETMODULE, 25 30 ID_DLG_MAIN, NULL); 31 #endif 26 32 OldFrameWP = WinSubclassWindow (hwndFrame, FrameProcedure); 27 33 … … 70 76 } 71 77 72 // ** Drag **************************************************************** /* fold00*/78 // ** Drag **************************************************************** /*FOLD00*/ 73 79 74 80 VOID Drag (HWND hwnd) … … 110 116 } 111 117 112 // ** FrameProcedure ****************************************************** /* fold00*/118 // ** FrameProcedure ****************************************************** /*FOLD00*/ 113 119 114 120 MRESULT EXPENTRY FrameProcedure (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) … … 273 279 break; 274 280 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 275 301 case WID_PB_SCREEN: 276 302 usCap = CAP_SCREEN; 303 #ifdef _QUIET_ 304 //#if 1 305 WinShowWindow (g_hwndSettingsDialog, FALSE); 306 // WinSendMsg (g_hwndSettingsDialog, WM_CLOSE, 0,0); //Needs to go to the setting dialog 307 // Replace current global with pset->GetSettingDialogHwnd () or such 308 // Need for all 4 cases; 309 #endif 277 310 WinSendMsg (hwnd, UM_PREPARECAPTURE, 0,0); 278 311 break; … … 280 313 case WID_PB_SCREENREGION: 281 314 usCap = CAP_SCREENREGION; 315 #ifdef _QUIET_ 316 //#if 1 317 WinShowWindow (g_hwndSettingsDialog, FALSE); 318 #endif 282 319 WinSendMsg (hwnd, UM_PREPARECAPTURE, 0,0); 283 320 break; … … 285 322 case WID_PB_WINDOWINTERIOR: 286 323 usCap = CAP_WINDOWINT; 324 #ifdef _QUIET_ 325 //#if 1 326 WinShowWindow (g_hwndSettingsDialog, FALSE); 327 #endif 287 328 WinSendMsg (hwnd, UM_PREPARECAPTURE, 0,0); 288 329 break; … … 290 331 case WID_PB_WINDOW: 291 332 usCap = CAP_WINDOW; 333 #ifdef _QUIET_ 334 //#if 1 335 WinShowWindow (g_hwndSettingsDialog, FALSE); 336 #endif 292 337 WinSendMsg (hwnd, UM_PREPARECAPTURE, 0,0); 293 338 break; … … 314 359 315 360 usState = STATE_WAITFORHIDE; 361 362 if (usCap == CAP_SCREENREGION || usCap == CAP_SCREEN) { 363 #ifdef _QUIET_ 364 hwndParent = WinQueryFocus(HWND_DESKTOP); 365 #else 366 hwndParent = WinQueryWindow(hwndFrame, QW_NEXTTOP ); 367 #endif 368 } 369 #ifndef _QUIET_ 370 //#if 0 316 371 if (WinQueryButtonCheckstate (hwnd, WID_CB_HIDEWINDOW)) 317 372 WinShowWindow (WinQueryWindow (hwnd, QW_PARENT), FALSE); 318 373 else 374 #endif 319 375 WinSendMsg (hwnd, UM_WINDOWHIDDEN, 0,0); 320 376 return MRESULT (FALSE); … … 346 402 { 347 403 usState = STATE_WINDOWSELECTED; 348 WinPostMsg (hwnd, UM_WINDOWSELECTED, 349 MPFROMHWND (HWND_DESKTOP), 350 MPFROMHWND (HWND_DESKTOP)); 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 } 351 418 } 352 419 else … … 417 484 FALSE)); 418 485 hwndCap = HWND (mp1); 419 hwndParent = HWND (mp2); 486 if (usCap != CAP_SCREENREGION && usCap != CAP_SCREEN) 487 hwndParent = HWND (mp2); 420 488 if (pset->SerialCapture ()) 421 489 { … … 478 546 // capture the window to a bitmap and save this 479 547 if (usCap == CAP_SCREENREGION) 480 hbm = CaptureWindow (hwndCap, hwndParent, &rcl, TRUE); 548 hbm = CaptureWindow (hwndCap, hwndParent, &rcl, FALSE); 549 else if (usCap == CAP_SCREEN) 550 hbm = CaptureWindow (hwndCap, hwndParent, NULL, FALSE); 481 551 else 482 552 hbm = CaptureWindow (hwndCap, hwndParent, NULL, TRUE); … … 512 582 WinSetCapture (HWND_DESKTOP, NULLHANDLE); 513 583 584 pset->Load (); 585 514 586 WinSendMsg (hwndSnapshot, UM_STOPCAPTURE, 0,0); 515 587 WinStopTimer (hab, hwnd, ulTimer); 516 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 517 598 // re-show the windows if they are hidden 518 599 // FIXME using global hwndFrame is pretty yukki … … 521 602 if (! WinIsWindowVisible (hwndSnapshot) && pset->SnapshotWindow ()) 522 603 WinShowWindow (hwndSnapshot, TRUE); 523 604 #endif 524 605 WinEnableWindow (hwnd, TRUE); 525 606 WinSetActiveWindow (HWND_DESKTOP, hwnd);
Note:
See TracChangeset
for help on using the changeset viewer.