none
ddx_control有什么意义? RRS feed

  • 问题

  • 绑定控制成员变量和ID吗?
    直接在类内定义出指针,然后在初始化的时候用getdlgitem给指针赋值,操作该control就用这指针,就可以达到同样的效果啊
    为什么要定义个成员control变量,ddx的时候估计要为它create的,那样不是浪费内存吗?
    2011年8月31日 21:14

答案

  • 去看看DDX的实现吧,只是subclass而已。

    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP
    • 已标记为答案 Rob Pan 2011年9月5日 8:33
    2011年8月31日 21:39
    版主
  • CWnd::GetDlgItem();

    A pointer to the given control or child window. If no control with the integer ID given by the nID parameter exists, the value is NULL.

    The returned pointer may be temporary and should not be stored for later use.


    Visual C++ enthusiast, like network programming and driver development. At present is being engaged in the WinCE/Windows Mobile platform embedded development.
    • 已标记为答案 Rob Pan 2011年9月5日 8:33
    2011年9月1日 0:14
    版主

全部回复

  • 去看看DDX的实现吧,只是subclass而已。

    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP
    • 已标记为答案 Rob Pan 2011年9月5日 8:33
    2011年8月31日 21:39
    版主
  • CWnd::GetDlgItem();

    A pointer to the given control or child window. If no control with the integer ID given by the nID parameter exists, the value is NULL.

    The returned pointer may be temporary and should not be stored for later use.


    Visual C++ enthusiast, like network programming and driver development. At present is being engaged in the WinCE/Windows Mobile platform embedded development.
    • 已标记为答案 Rob Pan 2011年9月5日 8:33
    2011年9月1日 0:14
    版主