大哥,请问用什么API函数可以在对话框中直接创建控件,应包含什么头文件。。
或者是通过什么途径在对话框中创建控件????
谢谢大哥们!!!

解决方案 »

  1.   

    CreateWindowEx
    The CreateWindowEx function creates an overlapped, pop-up, or child window with an extended window style; otherwise, this function is identical to the CreateWindow function. For more information about creating a window and for full descriptions of the other parameters of CreateWindowEx, see CreateWindow. HWND CreateWindowEx(
      DWORD dwExStyle,      // extended window style
      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 child identifier
      HINSTANCE hInstance,  // handle to application instance
      LPVOID lpParam        // window-creation data
    );
     Header: Declared in Winuser.h; include Windows.h.
      Library: Use User32.lib.