bool CControllerManager::OnActiveChange(HWND hwnd,bool fActive) { m_fActive=fActive; if (fActive) OnFocusChange(hwnd,true); return true; }
//-------------------------------------------------------------------------------- long CTab::OnNotify( NotificationMessageHeader* pHdr ) { _WINQ_FCONTEXT( "CTab::OnNotify" ); long lResult = 0; if( pHdr != 0 ) { switch ( pHdr->m_uiCode ) { case NM_CLICK: { OnClick( pHdr ); } break; case NM_DBLCLK: { lResult = static_cast< long >( OnDblClick( pHdr ) ? 0 : 1 ); } break; case NM_RCLICK: { lResult = static_cast< long >( OnRClick( pHdr ) ? 0 : 1 ); } break; case NM_RDBLCLK: { lResult = static_cast< long >( OnRDblClick( pHdr ) ? 0 : 1 ); } break; #if ( _WIN32_IE >= 0x0400 ) case NM_RELEASEDCAPTURE: { OnReleasedCapture( pHdr ); } break; case TCN_GETOBJECT: { OnGetObject( reinterpret_cast< NMOBJECTNOTIFY* >( pHdr ) ); } break; #endif//( _WIN32_IE >= 0x0400 ) #if ( _WIN32_IE >= 0x0500 ) case TCN_FOCUSCHANGE: { OnFocusChange( pHdr ); } break; #endif//( _WIN32_IE >= 0x0500 ) case TCN_KEYDOWN : { OnKeyDown( reinterpret_cast< NMTCKEYDOWN* >( pHdr ) ); } break; case TCN_SELCHANGE: { OnSelChange( pHdr ); } break; case TCN_SELCHANGING: { lResult = static_cast< long >( OnSelChanging( pHdr ) ? 0 : 1 ); } break; default: { lResult = OnUnknownNotification( pHdr ); } break; } } return lResult; }
LRESULT CALLBACK CCustomPlayer::_MainWindowWndProc(HWND hWnd,UINT message,WPARAM wParam,LPARAM lParam) { switch(message) { case WM_DROPFILES: // Load any dropped file { char FileName[_MAX_PATH]; HDROP hdrop=(HDROP)wParam; DragQueryFile(hdrop,0,FileName,_MAX_PATH); Reset(); _Load(FileName); _FinishLoad(); break; } case WM_MOUSEMOVE: { // we allow window dragging enabled in the player.ini file ! if (GetPAppStyle()->g_MouseDrag==1) { DoMMove(lParam,wParam); } } case WM_ACTIVATEAPP: { OnActivateApp(wParam); } break; // Minimum size of the player window case WM_GETMINMAXINFO: // this message is not very useful because // the main window of the player is not resizable ... // but perhaps it will change so we manage this message. { CCustomPlayer& player = CCustomPlayer::Instance(); if((LPMINMAXINFO)lParam) { ((LPMINMAXINFO)lParam)->ptMinTrackSize.x=MininumWindowedWidth(); ((LPMINMAXINFO)lParam)->ptMinTrackSize.y=MininumWindowedHeight(); } } break; // Sends a Message "OnClick" or "OnDblClick" if any object is under mouse cursor case WM_LBUTTONDBLCLK: case WM_LBUTTONDOWN: { OnMouseClick(message); // [2/18/2008 mc007] // we allow window dragging enabled in the player.ini file ! if (GetPAppStyle()->g_MouseDrag) { StartMove(lParam); } } break; // Size and focus management case WM_SIZE: // if the window is maximized or minimized // we get/lost focus. { if (wParam==SIZE_MINIMIZED) { OnFocusChange(FALSE); } else if (wParam==SIZE_MAXIMIZED) { OnFocusChange(TRUE); } } break; // Manage system key (ALT + KEY) case WM_SYSKEYDOWN: { // return OnSysKeyDownMainWindow(theApp.m_Config,(int)wParam); } break; // Repaint main frame case WM_PAINT: { OnPaint(); } break; // The main windows has been closed by the user case WM_CLOSE: PostQuitMessage(0); break; // Focus management case WM_KILLFOCUS: case WM_SETFOCUS: { OnFocusChange(message==WM_SETFOCUS); } break; default: return DefWindowProc(hWnd, message, wParam, lParam); } return DefWindowProc(hWnd, message, wParam, lParam); }