另一窗口内接受并处理此消息
CWnd *pOtherWnd = CWnd::FindWindow(NULL, "Test");
if(pOtherWnd) 
    PostMesssage(pOtherWnd, WM_DAEMON, NULL, NULL);
这么干好像不行

解决方案 »

  1.   

    好象有用资源ID吧!MAKEINTRESOURCE(WM_DAEMON的资源ID)
      

  2.   

    你必须使用HWND,不是CWnd指针
      

  3.   

    发送消息用PostMessage(),在需要处理消息的窗口自定义一个函数就可以了
      

  4.   

    error C2065: 'PostMesssage' : undeclared identifier
    Error executing cl.exe.另外怎么得到HWND 根据窗口的标题
      

  5.   

    CWnd  *pOtherWnd = CWnd::FindWindow(NULL, "Test");
    HWND  hWnd = pOtherWnd->GetSafeHwnd();::PostMessage( hWnd, WM_TEST, NULL, NULL );我测试过,完全可以
      

  6.   

    error C2039: 'PostMesssage' : is not a member of '`global namespace''
    error C2065: 'PostMesssage' : undeclared identifier
    我这怎么就还是不成呢
      

  7.   

    ::PostMessage( hWnd, WM_TEST, NULL, NULL );