在callback机制循环处理消息时,
1 组合框的选项发生改变,该在消息处理函数中,用case语句捕获什么消息?
2 标签式对话框(PROPSHEETPAGE)从一页点到另一页时,我想把这页的数据保存到一个类的私有变量里 该捕获什么消息?可能我表达有点不清楚,能加我qq最好了 187062798

解决方案 »

  1.   

    这是初始时给combo box IDC_PORT 3个选项,能正常显示,可我一点组合框,选择一个,马上就程序终止了,提示该内存不能被read
    BOOL CALLBACK setting_page (HWND hwnd_dlg, UINT uMsg, WPARAM wParam, LPARAM lParam, SHORT page)
    {
    switch (uMsg)
        {
    //初始化,
    case WM_INITDIALOG :
    {

    HWND hCombo=GetDlgItem(hwnd_dlg,IDC_PORT);
    SendMessage(hCombo,CB_ADDSTRING,0,(LPARAM)"1");//第一项
    SendMessage(hCombo,CB_ADDSTRING,1,(LPARAM)"2");//第二项
    SendMessage(hCombo,CB_ADDSTRING,2,(LPARAM)"3");//第三项
    //SendMessage(hCombo,CB_SETCURSEL,0,0);//把第一项 1 作为默认项放进Combobox的文本框. break;
    }
    case WM_COMMAND:
                switch (LOWORD(wParam)) 
                {
                   //打开文件
      default :
                    break;
     
                }
    case WM_DROPFILES:
    {
    OnDropFiles((HDROP)wParam,hwnd_dlg);
    }
          return 0;    case WM_NOTIFY :
            {        
                default :
                    break;
                }
            }
            break;    default:
            break;
        }
        return 0;
    }
      

  2.   

    lixiaosan(小三)
    能告诉我你的QQ吗?
    不会耽误你很久的
      

  3.   

    MSDN对CBN_SELCHANGE是这样说明的。
    This message is sent when the selection in the list box of a combo box is about to be changed as a result of the user either clicking in the list box or changing the selection by using the arrow keys. The parent window of the combo box receives this message through the WM_COMMAND message.