Changeset 27 for trunk/mainwin.cpp
- Timestamp:
- Mar 13, 2018, 6:34:46 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mainwin.cpp
r10 r27 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) … … 270 276 271 277 case WID_PB_SETTINGS: 278 _DebugHereIAm(); 272 279 pset->Dialog (); 280 break; 281 282 case WID_PB_SETCAPTURETYPE: 283 //int capType; 284 285 switch (pset->QuerySSWCaptureType ()) 286 { 287 case CAP_WINDOWINT: 288 WinSendMsg (hwndFrame, WM_COMMAND, 289 MPFROM2SHORT (WID_PB_WINDOWINTERIOR,0), 0); 290 case CAP_SCREENREGION: 291 WinSendMsg (hwndFrame, WM_COMMAND, 292 MPFROM2SHORT (WID_PB_SCREENREGION,0), 0); 293 case CAP_WINDOW: 294 WinSendMsg (hwndFrame, WM_COMMAND, 295 MPFROM2SHORT (WID_PB_WINDOW,0), 0); 296 default: 297 WinSendMsg (hwndFrame, WM_COMMAND, 298 MPFROM2SHORT (WID_PB_SCREEN,0), 0); 299 } 273 300 break; 274 301 275 302 case WID_PB_SCREEN: 276 303 usCap = CAP_SCREEN; 304 //#ifdef _Quiet_ 305 #if 1 306 WinShowWindow (g_hwndSettingsDialog, FALSE); 307 // WinSendMsg (g_hwndSettingsDialog, WM_CLOSE, 0,0); //Needs to go to the setting dialog 308 // Replace current global with pset->GetSettingDialogHwnd () or such 309 // Need for all 4 cases; 310 #endif 277 311 WinSendMsg (hwnd, UM_PREPARECAPTURE, 0,0); 278 312 break; … … 280 314 case WID_PB_SCREENREGION: 281 315 usCap = CAP_SCREENREGION; 316 //#ifdef _Quiet_ 317 #if 1 318 WinShowWindow (g_hwndSettingsDialog, FALSE); 319 #endif 282 320 WinSendMsg (hwnd, UM_PREPARECAPTURE, 0,0); 283 321 break; … … 285 323 case WID_PB_WINDOWINTERIOR: 286 324 usCap = CAP_WINDOWINT; 325 //#ifdef _Quiet_ 326 #if 1 327 WinShowWindow (g_hwndSettingsDialog, FALSE); 328 #endif 287 329 WinSendMsg (hwnd, UM_PREPARECAPTURE, 0,0); 288 330 break; … … 290 332 case WID_PB_WINDOW: 291 333 usCap = CAP_WINDOW; 334 //#ifdef _Quiet_ 335 #if 1 336 WinShowWindow (g_hwndSettingsDialog, FALSE); 337 #endif 292 338 WinSendMsg (hwnd, UM_PREPARECAPTURE, 0,0); 293 339 break; … … 314 360 315 361 usState = STATE_WAITFORHIDE; 362 363 if (usCap == CAP_SCREENREGION || usCap == CAP_SCREEN) 364 hwndParent = WinQueryFocus(HWND_DESKTOP); 365 //#ifndef _QUIET_ 366 #if 0 316 367 if (WinQueryButtonCheckstate (hwnd, WID_CB_HIDEWINDOW)) 317 368 WinShowWindow (WinQueryWindow (hwnd, QW_PARENT), FALSE); 318 369 else 370 #endif 319 371 WinSendMsg (hwnd, UM_WINDOWHIDDEN, 0,0); 320 372 return MRESULT (FALSE); … … 346 398 { 347 399 usState = STATE_WINDOWSELECTED; 348 WinPostMsg (hwnd, UM_WINDOWSELECTED, 349 MPFROMHWND (HWND_DESKTOP), 350 MPFROMHWND (HWND_DESKTOP)); 400 int rc = saymsg2(1, hwnd, "Capture", "Do you wish to continue?"); 401 _DebugHereIAm(); 402 if (rc == 1) 403 WinPostMsg (hwnd, UM_WINDOWSELECTED, 404 MPFROMHWND (HWND_DESKTOP), 405 MPFROMHWND (HWND_DESKTOP)); 406 if (rc == 2) 407 WinSendMsg (hwnd, UM_ABORT, 0,0); 408 if (rc == 3) { 409 pset->Dialog (); 410 WinPostMsg (hwnd, UM_WINDOWSELECTED, 411 MPFROMHWND (HWND_DESKTOP), 412 MPFROMHWND (HWND_DESKTOP)); 413 } 351 414 } 352 415 else … … 417 480 FALSE)); 418 481 hwndCap = HWND (mp1); 419 hwndParent = HWND (mp2); 482 if (usCap != CAP_SCREENREGION && usCap != CAP_SCREEN) 483 hwndParent = HWND (mp2); 420 484 if (pset->SerialCapture ()) 421 485 { … … 478 542 // capture the window to a bitmap and save this 479 543 if (usCap == CAP_SCREENREGION) 480 hbm = CaptureWindow (hwndCap, hwndParent, &rcl, TRUE); 544 hbm = CaptureWindow (hwndCap, hwndParent, &rcl, FALSE); 545 else if (usCap == CAP_SCREEN) 546 hbm = CaptureWindow (hwndCap, hwndParent, NULL, FALSE); 481 547 else 482 548 hbm = CaptureWindow (hwndCap, hwndParent, NULL, TRUE); … … 512 578 WinSetCapture (HWND_DESKTOP, NULLHANDLE); 513 579 580 pset->Load (); 581 514 582 WinSendMsg (hwndSnapshot, UM_STOPCAPTURE, 0,0); 515 583 WinStopTimer (hab, hwnd, ulTimer); 516 584 //#ifdef _QUIET_ 585 #if 1 586 // ? FIXME to give option to reshow window. 587 if (WinQueryButtonCheckstate (hwnd, WID_CB_HIDEWINDOW)) 588 WinSendMsg (g_hwndSettingsDialog, WM_CLOSE, 0,0); 589 else if (WinIsWindow ( hab, g_hwndSettingsDialog) && 590 ! WinIsWindowVisible (g_hwndSettingsDialog)) 591 WinShowWindow (g_hwndSettingsDialog, TRUE); 592 pset->HideWindow (TRUE); 593 #else 517 594 // re-show the windows if they are hidden 518 595 // FIXME using global hwndFrame is pretty yukki … … 521 598 if (! WinIsWindowVisible (hwndSnapshot) && pset->SnapshotWindow ()) 522 599 WinShowWindow (hwndSnapshot, TRUE); 523 600 #endif 524 601 WinEnableWindow (hwnd, TRUE); 525 602 WinSetActiveWindow (HWND_DESKTOP, hwnd);
Note:
See TracChangeset
for help on using the changeset viewer.