MCPcopy Create free account
hub / github.com/SOUI2/soui / SSendMessage

Method SSendMessage

SOUI/src/core/Swnd.cpp:218–248  ·  view source on GitHub ↗

Send a message to SWindow

Source from the content-addressed store, hash-verified

216
217 // Send a message to SWindow
218 LRESULT SWindow::SSendMessage(UINT Msg, WPARAM wParam /*= 0*/, LPARAM lParam /*= 0*/,BOOL *pbMsgHandled/*=NULL*/)
219 {
220 LRESULT lResult = 0;
221
222 if ( Msg < WM_USER
223 && Msg != WM_DESTROY
224 && Msg != WM_CLOSE
225 )
226 {
227 TestMainThread();
228 }
229 AddRef();
230 SWNDMSG msgCur= {Msg,wParam,lParam};
231 SWNDMSG *pOldMsg=m_pCurMsg;
232 m_pCurMsg=&msgCur;
233
234 BOOL bOldMsgHandle=IsMsgHandled();//备分上一个消息的处理状态
235
236 SetMsgHandled(FALSE);
237
238 ProcessSwndMessage(Msg, wParam, lParam, lResult);
239
240 if(pbMsgHandled) *pbMsgHandled=IsMsgHandled();
241
242 SetMsgHandled(bOldMsgHandle);//恢复上一个消息的处理状态
243
244 m_pCurMsg=pOldMsg;
245 Release();
246
247 return lResult;
248 }
249
250 void SWindow::SDispatchMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)
251 {

Callers 15

OnKeyDownMethod · 0.80
~SComboBoxMethod · 0.80
CreateListBoxMethod · 0.80
OnScaleChangedMethod · 0.80
OnLanguageChangedMethod · 0.80
OnKeyDownMethod · 0.80
OnMouseHoverMethod · 0.80
OnMouseLeaveMethod · 0.80
OnKeyDownMethod · 0.80
CreateChildrenMethod · 0.80
OnCharMethod · 0.80
~SDateTimePickerMethod · 0.80

Calls 4

AddRefFunction · 0.50
IsMsgHandledFunction · 0.50
SetMsgHandledFunction · 0.50
ReleaseFunction · 0.50

Tested by

no test coverage detected