1、hWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,
      CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, hInstance, NULL);
中 WS_OVERLAPPEDWINDOW表示窗口的一种风格,请问窗口还有那些风格,是什么参数,各表示什么样的风格?
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT 4个单词表示分别表示什么意思,还有没有其他的标识?
2、TCHAR 表示什么样的数据类型?

解决方案 »

  1.   

    没事多查查MSDN,上面都有~
    风格
    WS_BORDER 
    Creates a window that has a thin-line border.WS_CAPTION 
    Creates a window that has a title bar (includes the WS_BORDER style).WS_CHILD 
    Creates a child window. A window with this style cannot have a menu bar. This style cannot be used with the WS_POPUP style.WS_CHILDWINDOW 
    Same as the WS_CHILD style.WS_CLIPCHILDREN 
    Excludes the area occupied by child windows when drawing occurs within the parent window. This style is used when creating the parent window.WS_CLIPSIBLINGS 
    Clips child windows relative to each other; that is, when a particular child window receives a WM_PAINT message, the WS_CLIPSIBLINGS style clips all other overlapping child windows out of the region of the child window to be updated. If WS_CLIPSIBLINGS is not specified and child windows overlap, it is possible, when drawing within the client area of a child window, to draw within the client area of a neighboring child window.WS_DISABLED 
    Creates a window that is initially disabled. A disabled window cannot receive input from the user. To change this after a window has been created, use EnableWindow. WS_DLGFRAME 
    Creates a window that has a border of a style typically used with dialog boxes. A window with this style cannot have a title bar.WS_GROUP 
    Specifies the first control of a group of controls. The group consists of this first control and all controls defined after it, up to the next control with the WS_GROUP style. The first control in each group usually has the WS_TABSTOP style so that the user can move from group to group. The user can subsequently change the keyboard focus from one control in the group to the next control in the group by using the direction keys.
    You can turn this style on and off to change dialog box navigation. To change this style after a window has been created, use SetWindowLong.
    WS_HSCROLL 
    Creates a window that has a horizontal scroll bar.WS_ICONIC 
    Creates a window that is initially minimized. Same as the WS_MINIMIZE style.WS_MAXIMIZE 
    Creates a window that is initially maximized.WS_MAXIMIZEBOX 
    Creates a window that has a maximize button. Cannot be combined with the WS_EX_CONTEXTHELP style. The WS_SYSMENU style must also be specified. WS_MINIMIZE 
    Creates a window that is initially minimized. Same as the WS_ICONIC style.WS_MINIMIZEBOX 
    Creates a window that has a minimize button. Cannot be combined with the WS_EX_CONTEXTHELP style. The WS_SYSMENU style must also be specified. WS_OVERLAPPED 
    Creates an overlapped window. An overlapped window has a title bar and a border. Same as the WS_TILED style.WS_OVERLAPPEDWINDOW 
    Creates an overlapped window with the WS_OVERLAPPED, WS_CAPTION, WS_SYSMENU, WS_THICKFRAME, WS_MINIMIZEBOX, and WS_MAXIMIZEBOX styles. Same as the WS_TILEDWINDOW style. WS_POPUP 
    Creates a pop-up window. This style cannot be used with the WS_CHILD style.WS_POPUPWINDOW 
    Creates a pop-up window with WS_BORDER, WS_POPUP, and WS_SYSMENU styles. The WS_CAPTION and WS_POPUPWINDOW styles must be combined to make the window menu visible.WS_SIZEBOX 
    Creates a window that has a sizing border. Same as the WS_THICKFRAME style.WS_SYSMENU 
    Creates a window that has a window menu on its title bar. The WS_CAPTION style must also be specified.WS_TABSTOP 
    Specifies a control that can receive the keyboard focus when the user presses the TAB key. Pressing the TAB key changes the keyboard focus to the next control with the WS_TABSTOP style. 
    You can turn this style on and off to change dialog box navigation. To change this style after a window has been created, use SetWindowLong.
    WS_THICKFRAME 
    Creates a window that has a sizing border. Same as the WS_SIZEBOX style.WS_TILED 
    Creates an overlapped window. An overlapped window has a title bar and a border. Same as the WS_OVERLAPPED style. WS_TILEDWINDOW 
    Creates an overlapped window with the WS_OVERLAPPED, WS_CAPTION, WS_SYSMENU, WS_THICKFRAME, WS_MINIMIZEBOX, and WS_MAXIMIZEBOX styles. Same as the WS_OVERLAPPEDWINDOW style. WS_VISIBLE 
    Creates a window that is initially visible.
    This style can be turned on and off by using ShowWindow or SetWindowPos.
    WS_VSCROLL 
    Creates a window that has a vertical scroll bar.
      

  2.   

    HWND CreateWindow(          LPCTSTR lpClassName,
        LPCTSTR lpWindowName,
        DWORD dwStyle,
        int x,
        int y,
        int nWidth,
        int nHeight,
        HWND hWndParent,
        HMENU hMenu,
        HINSTANCE hInstance,
        LPVOID lpParam
    );
    ParameterslpClassName
    [in] Pointer to a null-terminated string or a class atom created by a previous call to the RegisterClass or RegisterClassEx function. The atom must be in the low-order word of lpClassName; the high-order word must be zero. If lpClassName is a string, it specifies the window class name. The class name can be any name registered with RegisterClass or RegisterClassEx, provided that the module that registers the class is also the module that creates the window. The class name can also be any of the predefined system class names. For a list of system class names, see the Res section. 
    lpWindowName
    [in] Pointer to a null-terminated string that specifies the window name. If the window style specifies a title bar, the window title pointed to by lpWindowName is displayed in the title bar. When using CreateWindow to create controls, such as buttons, check boxes, and static controls, use lpWindowName to specify the text of the control. When creating a static control with the SS_ICON style, use lpWindowName to specify the icon name or identifier. To specify an identifier, use the syntax "#num". 
    dwStyle
    [in] Specifies the style of the window being created. This parameter can be a combination of window styles, plus the control styles indicated in the Res section. 
    x
    [in] Specifies the initial horizontal position of the window. For an overlapped or pop-up window, the x parameter is the initial x-coordinate of the window's upper-left corner, in screen coordinates. For a child window, x is the x-coordinate of the upper-left corner of the window relative to the upper-left corner of the parent window's client area. If this parameter is set to CW_USEDEFAULT, the system selects the default position for the window's upper-left corner and ignores the y parameter. CW_USEDEFAULT is valid only for overlapped windows; if it is specified for a pop-up or child window, the x and y parameters are set to zero. 
    y
    [in] Specifies the initial vertical position of the window. For an overlapped or pop-up window, the y parameter is the initial y-coordinate of the window's upper-left corner, in screen coordinates. For a child window, y is the initial y-coordinate of the upper-left corner of the child window relative to the upper-left corner of the parent window's client area. For a list box, y is the initial y-coordinate of the upper-left corner of the list box's client area relative to the upper-left corner of the parent window's client area. If an overlapped window is created with the WS_VISIBLE style bit set and the x parameter is set to CW_USEDEFAULT, the system ignores the y parameter. 
    nWidth
    [in] Specifies the width, in device units, of the window. For overlapped windows, nWidth is either the window's width, in screen coordinates, or CW_USEDEFAULT. If nWidth is CW_USEDEFAULT, the system selects a default width and height for the window; the default width extends from the initial x-coordinate to the right edge of the screen, and the default height extends from the initial y-coordinate to the top of the icon area. CW_USEDEFAULT is valid only for overlapped windows; if CW_USEDEFAULT is specified for a pop-up or child window, nWidth and nHeight are set to zero. 
    nHeight
    [in] Specifies the height, in device units, of the window. For overlapped windows, nHeight is the window's height, in screen coordinates. If nWidth is set to CW_USEDEFAULT, the system ignores nHeight. 
    hWndParent
    [in] Handle to the parent or owner window of the window being created. To create a child window or an owned window, supply a valid window handle. This parameter is optional for pop-up windows. 
    Windows 2000/XP: To create a message-only window, supply HWND_MESSAGE or a handle to an existing message-only window. hMenu
    [in] Handle to a menu, or specifies a child-window identifier depending on the window style. For an overlapped or pop-up window, hMenu identifies the menu to be used with the window; it can be NULL if the class menu is to be used. For a child window, hMenu specifies the child-window identifier, an integer value used by a dialog box control to notify its parent about events. The application determines the child-window identifier; it must be unique for all child windows with the same parent window. 
    hInstance
    [in] Windows 95/98/Me: Handle to the instance of the module to be associated with the window. 
    Windows NT/2000/XP: This value is ignored.lpParam
    [in] Pointer to a value to be passed to the window through the CREATESTRUCT structure passed in the lpParam parameter the WM_CREATE message. If an application calls CreateWindow to create a multiple-document interface (MDI) client window, lpParam must point to a CLIENTCREATESTRUCT structure. 
      

  3.   

    TCHAR A WCHAR if UNICODE is defined, a CHAR otherwise.