Enumerate all windows in the system in ctreectrl! (I)

Source: Internet
Author: User
This article will provide a source program
In the treectrl dialog box, enumerate the window in the tree format.
 
This is the header file
 
// Winlist. h: header file
//
 
//////////////////////////////////////// /////////////////////////////////////
// Cwinlist Dialog
 
Class cwinlist: Public cdialog
{
// Construction
Public:
Hwnd m_hselected;
Cwinlist (cwnd * pparent = NULL); // standard Constructor
Static bool callback enumwindowsproc (hwnd, lparam );
Static bool callback enumchildproc (hwnd, lparam );
Void builttree (hwnd );
 
// Dialog data
// {Afx_data (cwinlist)
Enum {IDD = id_winlist };
Ctreectrl m_tree;
//} Afx_data
 
 
// Overrides
// Classwizard generated virtual function overrides
// {Afx_virtual (cwinlist)
Public:
Virtual bool destroywindow ();
Protected:
Virtual void dodataexchange (cdataexchange * PDX); // DDX/DDV support
//} Afx_virtual
 
// Implementation
Protected:
Void drawflash (hwnd );
Void refresh ();
 
// Generated message map Functions
// {Afx_msg (cwinlist)
Virtual bool oninitdialog ();
Afx_msg void onrefresh ();
Afx_msg void onselchangedtree (nmhdr * pnmhdr, lresult * presult );
//} Afx_msg
Declare_message_map ()
PRIVATE:
Cfont treefont;
TV _insertstruct treeitem;
Int rootpt;
Htreeitem rootarray [10];
};
 
 
--
Certificate ---- Snapshot
│ Bay │
Certificate ---- Snapshot

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.