/ should never get here // subclass the window with the proc which does gray backgroundsoldWndProc WNDPROCGetWindowLonghWnd GWL_WNDPROCif oldWndProc NULLASSERTGetProphWnd szAfxOldWndProc NULLSetProphWnd szAfxOldWndProc oldWndProcif WNDPROCGetProphWnd szAfxOldWndProc oldWndProcSetWindowLonghWnd GWL_WNDPROCDWORDpThreadState-gtm_bDlgCreate _AfxGrayBackgroundWndProc : _AfxActivationWndProcASSERToldWndProc NULL LRESULT lResult CallNextHookExpThreadState-gtm_hHookOldCbtFilter codewParam lParam ifndef _AFXDLLif afxContextIsDLL::UnhookWindowsHookExpThreadState-gtm_hHookOldCbtFilterpThreadState-gtm_hHookOldCbtFilter NULLendifreturn lResult // always indirectly accessed via AfxGetAfxWndProcWNDPROC AFXAPI AfxGetAfxWndProcifdef _AFXDLLreturn AfxGetModuleState-gtm_pfnAfxWndProc// 如果MFC是让让让入返回的地址是AfxWndProcBaseelsereturn ampAfxWndProc // 否让返回AfxWndProcendif // The WndProc for all CWnd’s and derived classes LRESULT CALLBACKAfxWndProcHWND hWnd UINT nMsg WPARAM wParam LPARAM lParam// special message which identifies the window as using AfxWndProcif nMsg WM_QUERYAFXWNDPROC 让让是否让AFX的口让程窗return 1 // all other messages route through message mapCWnd pWnd CWnd::FromHandlePermanenthWndFromHandlePermanent函用于返回一和数个hWnd句柄让让的永久的CWnd让所让永久的就是CWnd让用了Attach函数让上了一口句柄。
个窗ASSERTpWnd NULLASSERTpWnd-gtm_hWnd hWndreturn AfxCallWndProcpWnd hWnd nMsg wParam lParam 函让后数 ifdef _AFXDLLundef AfxWndProcLRESULT CALLBACKAfxWndProcBaseHWND hWnd UINT nMsg WPARAM wParam LPARAM lParamAFX_MANAGE_STATE_afxBaseModuleState.GetData// 由于MFC是让让让入的所以必让要让让句条return AfxWndProchWnd nMsg wParam lParam让用MFC让让入让使用的函静数endif // 微让官方让定的让送消息让CWnd的函数LRESULT AFXAPI AfxCallWndProcCWnd pWnd HWND hWnd UINT nMsgWPARAM wParam 0 LPARAM lParam 0_AFX_THREAD_STATE pThreadState _afxThreadState.GetDataMSG oldState pThreadState-gtm_lastSentMsg // save for nestingpThreadState-gtm_lastSentMsg.hwnd hWndpThreadState-gtm_lastSentMsg.message nMsgpThreadState-gtm_lastSentMsg.wParam wParampThreadState-gtm_lastSentMsg.lParam lParam ifdef _DEBUGif afxTraceFlags amp traceWinMsg_AfxTraceMsg_TquotWndProcquot amppThreadState-gtm_lastSentMsgendif // Catch exceptions thrown outside the scope of a callback// in debug builds and warn the user.LRESULT lResultTRYifndef _AFX_NO_OCC_SUPPORT// special case for WM_DESTROYif nMsg WM_DESTROY ampamp pWnd-gtm_pCtrlCont NULLpWnd-gtm_pCtrlCont-gtOnUIActivateNULLendif // special case for WM_INITDIALOGCRect rectOldDWORD dwStyleif nMsg WM_INITDIALOG_AfxPreInitDialogpWnd amprectOld ampdwStyle // delegate to object’s WindowProclResult pWnd-gtWindowProcnMsg wParam lParam让用CWnd让的WindowProc函数函让后 数// more special case for WM_INITDIALOGif nMsg WM_INITDIALOG_AfxPostInitDialogpWnd rectOld dwStyleCATCH_ALLelResult AfxGetThread-gtProcessWndProcExceptione amppThreadState-gtm_lastSentMsgTRACE1quotWarning: Uncaught exception in WindowProc returning ld.nquotlResultDELETE_EXCEPTIONeEND_CA.
上一篇:
VC 怎样调试程序
下一篇:
食品类面包毕业论文