1、windows编程中的窗口共有多少种类型,在那里可以查到各种类型的属性
2、如果得到一个进程的所以窗口类型。()其实只要能得到一个类型就可以了,我可以自己举出其它类型。
3、可以给出方法,函数、或者相关资料的网址

解决方案 »

  1.   

    1、很多,具体没树过,你可以在MSDN中查到各种窗口的风格
    2、使用EnumWindow和EnumChildWindow来枚举窗口,
    3、使用GetWindowLong来获得窗口的风格
      

  2.   

    Window Styles
    WS_BORDER   Creates a window that has a border.
    WS_CAPTION   Creates a window that has a title bar (implies the WS_BORDER style). Cannot be used with the WS_DLGFRAME style.
    WS_CHILD   Creates a child window. Cannot be used with the WS_POPUP style.
    WS_CLIPCHILDREN   Excludes the area occupied by child windows when you draw within the parent window. Used when you create the parent window.
    WS_CLIPSIBLINGS   Clips child windows relative to each other; that is, when a particular child window receives a paint message, the WS_CLIPSIBLINGS style clips all other overlapped child windows out of the region of the child window to be updated. (If WS_CLIPSIBLINGS is not given and child windows overlap, when you draw within the client area of a child window, it is possible to draw within the client area of a neighboring child window.) For use with the WS_CHILD style only.
    WS_DISABLED   Creates a window that is initially disabled.
    WS_DLGFRAME   Creates a window with a double border but no title.
    WS_GROUP   Specifies the first control of a group of controls in which the user can move from one control to the next with the arrow keys. All controls defined with the WS_GROUP style FALSE after the first control belong to the same group. The next control with the WS_GROUP style starts the next group (that is, one group ends where the next begins).
    WS_HSCROLL   Creates a window that has a horizontal scroll bar.
    WS_MAXIMIZE   Creates a window of maximum size.
    WS_MAXIMIZEBOX   Creates a window that has a Maximize button.
    WS_MINIMIZE   Creates a window that is initially minimized. For use with the WS_OVERLAPPED style only.
    WS_MINIMIZEBOX   Creates a window that has a Minimize button.
    WS_OVERLAPPED   Creates an overlapped window. An overlapped window usually has a caption and a border.
    WS_OVERLAPPEDWINDOW   Creates an overlapped window with the WS_OVERLAPPED, WS_CAPTION, WS_SYSMENU, WS_THICKFRAME, WS_MINIMIZEBOX, and WS_MAXIMIZEBOX styles.
    WS_POPUP   Creates a pop-up window. Cannot be used with the WS_CHILD style.
    WS_POPUPWINDOW   Creates a pop-up window with the WS_BORDER, WS_POPUP, and WS_SYSMENU styles. The WS_CAPTION style must be combined with the WS_POPUPWINDOW style to make the Control menu visible.
    WS_SYSMENU   Creates a window that has a Control-menu box in its title bar. Used only for windows with title bars.
    WS_TABSTOP   Specifies one of any number of controls through which the user can move by using the TAB key. The TAB key moves the user to the next control specified by the WS_TABSTOP style.
    WS_THICKFRAME   Creates a window with a thick frame that can be used to size the window.
    WS_VISIBLE   Creates a window that is initially visible.
    WS_VSCROLL   Creates a window that has a vertical scroll bar. 
      

  3.   

    Extended Window Styles
    WS_EX_ACCEPTFILES   Specifies that a window created with this style accepts drag-and-drop files. 
    WS_EX_CLIENTEDGE   Specifies that a window has a 3D look — that is, a border with a sunken edge.
    WS_EX_CONTEXTHELP   Includes a question  in the title bar of the window. When the user clicks the question , the cursor changes to a question  with a pointer. If the user then clicks a child window, the child receives a WM_HELP message.
    WS_EX_CONTROLPARENT   Allows the user to navigate among the child windows of the window by using the TAB key.
    WS_EX_DLGMODALFRAME   Designates a window with a double border that may (optionally) be created with a title bar when you specify the WS_CAPTION style flag in the dwStyle parameter. 
    WS_EX_LEFT   Gives window generic left-aligned properties. This is the default.
    WS_EX_LEFTSCROLLBAR   Places a  vertical scroll bar to the left of the client area.
    WS_EX_LTRREADING   Displays the window text using left-to-right reading order properties. This is the default.
    WS_EX_MDICHILD   Creates an MDI child window.
    WS_EX_NOPARENTNOTIFY   Specifies that a child window created with this style will not send the WM_PARENTNOTIFY message to its parent window when the child window is created or destroyed. 
    WS_EX_OVERLAPPEDWINDOW   Combines the WS_EX_CLIENTEDGE and WS_EX_WINDOWEDGE styles
    WS_EX_PALETTEWINDOW   Combines the WS_EX_WINDOWEDGE and WS_EX_TOPMOST styles.
    WS_EX_RIGHT   Gives a window generic right-aligned properties. This depends on the window class.
    WS_EX_RIGHTSCROLLBAR   Places a vertical scroll bar (if present) to the right of the client area. This is the default.
    WS_EX_RTLREADING   Displays the window text using right-to-left reading order properties.
    WS_EX_STATICEDGE   Creates a window with a three-dimensional border style intended to be used for items that do not accept user input.
    WS_EX_TOOLWINDOW   Creates a tool window, which is a window intended to be used as a floating toolbar. A tool window has a title bar that is shorter than a normal title bar, and the window title is drawn using a smaller font. A tool window does not appear in the task bar or in the window that appears when the user presses ALT+TAB.
    WS_EX_TOPMOST   Specifies that a window created with this style should be placed above all nontopmost windows and stay above them even when the window is deactivated. An application can use the SetWindowPos member function to add or remove this attribute. 
    WS_EX_TRANSPARENT   Specifies that a window created with this style is to be transparent. That is, any windows that are beneath the window are not obscured by the window. A window created with this style receives WM_PAINT messages only after all sibling windows beneath it have been updated.
    WS_EX_WINDOWEDGE   Specifies that a window has a border with a raised edge. 
      

  4.   

    枚举窗口相信大家都用过了,但是都会碰到同样一个问题,就是调用EnumWindow或者EnumChildWindow或者之类的方法的时候,枚举出来的窗口是所有的桌面窗口,往往一般我们只需要我们打开的应用程序的窗口,也就是任务栏上显示的窗口,试了一下,用下面的方法类似的可以得到任务栏的窗口。BOOL CALLBACK EnumWindowsProc(HWND hwnd, LPARAM lParam)
    {
    if(IsWindowVisible(hwnd) && 
    ((GetWindowLong(hwnd, GWL_EXSTYLE)&WS_EX_TOOLWINDOW)!=WS_EX_TOOLWINDOW) &&
    (GetWindowLong(hwnd, GWL_HWNDPARENT)==0))
    g_dwWndList.Add((DWORD)hwnd);
    return TRUE;
    }g_dwWndList是一个全局的CDWordArray的变量保存枚举出来的窗口。
    这种方法可以稍加改变就可以找出你想找的具有特定类型的窗口。
      

  5.   

    谢谢各位大侠,我的E文不好,所以很多MSDN上的都看不懂,不过,看了上面的总算有点头绪了。
    还有,有这种方法可以得到这个窗体中的所有控件吗?比如:编辑框或按钮之类的。
    我想做一个可以查找本窗口所有组成控件的函数,不知道现不现实?
    正在实验中。希望各位继续支持!