一个可编辑的ListCtr控件扩展类,,当检测到最后一行最后一列的时候,,想向主窗体(放ListCtr) 发送一个消息,
以至于给,主窗体(对话框)处理消息。。发现消息只能发给自己,如何才能发送给主窗体??
以至于给,主窗体(对话框)处理消息。。发现消息只能发给自己,如何才能发送给主窗体??
解决方案 »
- socket通信程序//为什么在vc6.0能过;vs08调试能收到信息;运行不行。
- 在窗口上嵌入一个VIEW,往上贴图为何是全黑色的?
- WM_DEVICECHANGE 如何响应设备接入啊
- 谁有种WIN32变的界面程序吗~~求一份
- 关于位图和调色板的问题(请附上原代码)
- 指针*P的问题
- 用自己建立的函数怎么调用void CCMyDrawView::OnDraw(CDC* pDC)?
- 高分请教怎么做个自动上网机
- 请登陆ftp://pub:[email protected]帮我调试一个程序。
- 有关access数据库的问题
- 用HOUGH变换求垂线,,这结果太怪异了,求解答啊!
- 又是那些内存读取出错的问题,烦啊!!!!
试试:GetParent()->SendMessage(...)
或者 在创建ListCtr控件扩展类的时候把主窗口的指针传递进来。
HWND hWnd, // handle to destination window
UINT Msg, // message
WPARAM wParam, // first message parameter
LPARAM lParam // second message parameter
);The PostMessage function places (posts) a message in the message queue associated with the thread that created the specified window and returns without waiting for the thread to process the message. To post a message in the message queue associate with a thread, use the PostThreadMessage function.
if(pWnd)
pWnd->PostMessage();
这样发送完全正确能用,CWnd* pWnd = AfxGetMainWnd();
if(pWnd)
pWnd->PostMessage();...
BOOL CExListDlg::PreTranslateMessage(MSG* pMsg) 主要窗体拦截即可
{
// TODO: Add your specialized code here and/or call the base class
switch (pMsg->message)
{
case WM_USER_EDIT_OVER: