Code Viewer

./WindowHandlers/WindowSelect_handler.js File Size: 1.66 KB

  1. /*
  2. *
  3. *      WindowSelect.xml
  4. *
  5. */
  6.  
  7. var bMinimized = false;
  8. var pre_hWnd = 0;
  9. var new_hWnd = 0;
  10.  
  11. function OnWindowSelectEvent_LstViewDblClicked(pPlusWnd, sControlId, nItemIdx) {
  12.         if (nItemIdx === -1) return false;
  13.        
  14.         new_hWnd = pPlusWnd.LstView_GetItemData('LvWindows', nItemIdx);
  15.        
  16.        
  17.         var _WINDOWPLACEMENT = Interop.Allocate(48);
  18.         _win32.GetWindowPlacement(new_hWnd, _WINDOWPLACEMENT);
  19.        
  20.         if (_WINDOWPLACEMENT.ReadDWORD(8) === 3) {
  21.                 _win32.SetForegroundWindow(new_hWnd);
  22.         } else if (_WINDOWPLACEMENT.ReadDWORD(8) === 2) {
  23.                 bMinimized = true;
  24.                 pre_hWnd = _win32.GetForegroundWindow();                _win32.ShowWindow(new_hWnd, _win32._const._SW_RESTORE);
  25.                 _win32.SetForegroundWindow(new_hWnd);
  26.         } else if (_WINDOWPLACEMENT.ReadDWORD(8) === 1) {
  27.                 _win32.SetForegroundWindow(new_hWnd);
  28.         }
  29.        
  30.         MsgPlus.AddTimer('window', 500);
  31. }
  32.  
  33.  

Version

  • 5.0.0070_20100325_publicbeta1

Developers

Project Details

  • Folders8
  • Files122
  • Total Lines11,867
  • Repository Version70

User Count

  • 162