rt

解决方案 »

  1.   

    HWND CreateWindow(
      LPCTSTR lpClassName,  // registered class name
      LPCTSTR lpWindowName, // window name
      DWORD dwStyle,        // window style
      int x,                // horizontal position of window
      int y,                // vertical position of window
      int nWidth,           // window width
      int nHeight,          // window height
      HWND hWndParent,      // handle to parent or owner window
      HMENU hMenu,          // menu handle or 资源ID
      HINSTANCE hInstance,  // handle to application instance
      LPVOID lpParam        // window-creation data
    );
      

  2.   

    可以在资源中添加一个id和值,在create控件的时候把这个id指定给他
      

  3.   

    you can use any number that does not duplicate with existing Resource ID.
      

  4.   

    在Creat该控件的时候将该你想要的控件ID赋给它,不过要在view->Resource Symbols,单击new加入你的控件ID,例如:
    m_button.Create("ok",WS_VISIBLE|WS_CHILD|WS_BORDER,CRect(400,120,450,140),this,IDC_OKBUTTON)
      

  5.   

    m_button.Create("ok",WS_VISIBLE|WS_CHILD|WS_BORDER,CRect(400,120,450,140),this,110);
      

  6.   

    我的程序在运行的时候可能创建n(n>1,未知,运行时确定)个控件,那么使用create创建的时候就要为这些控件指定id,如何才能使制定的id不会与resource.h中已定义的id相等?有没有什么函数/宏可以生成与resource.h中已定义的id不相等的数字??
      

  7.   

    http://www.csdn.net/expert/topic/943/943547.xml?temp=.3037378