Development of the VC property list

Source: Internet
Author: User

The recent development of a software encountered the problem of property editing, would like to use a list control to replace, but found that the list control has a lot of flaws, not too useful. The property control does not support editing and Drop-down list functionality, which has built-in these two features and provides Customdraw, but is not yet complete. Program running screen as shown in figure I:

Figure I

Here's a description of the main methods:

You define a macro to frame the list sequence:

begin_create_node
Begin_yjitem (0,yj_folder,yj_default,_t ("file"), yjedit,true,_t ("file")
Begin_ Yjitem (1,yj_folder,yj_default,_t ("new"), yjedit,true,_t ("document"))
Begin_yjitem (1,yj_item,yj_default,_t ("open"), yjlistbox,true,_t ("Document # program # text"))
Begin_yjitem (1,yj_item,yj_default,_t ("Exit"), yjlistbox,true,_t ("Document # program # text"))
Begin_yjitem (0,yj_folder,yj_default,_t ("edit"), yjedit,true,_t ("file")
Begin_yjitem (1,yj_item,yj_default,_t ("undo"), yjedit,true,_t ("file"))
Begin_yjitem (1,yj_item,yj_default,_t ("paste"), yjedit,true,_t ("file")
Begin_ Yjitem (1,yj_item,yj_default,_t ("copy"), yjedit,true,_t ("file"))
Begin_yjitem (0,yj_folder,yj_default,_t ("View"), yjedit,true,_t ("file"))
Begin_yjitem (1,yj_item,yj_default,_t ("undo"), yjedit,true,_t ("file"))
Begin_yjitem (1,YJ _item,yj_default,_t ("Paste"), yjedit,true,_t ("file"))
Begin_yjitem (1,yj_item,yj_default,_t ("copy"), yjedit,true,_t (" File)
End_create_node

Where the list string is separated by "#". The edit box is Yjedit, the list box is Yjlistbox, and then the macro is invoked inside the program,

CRATE_STRUCT(&m_propertyList)
m_propertyList.Invalidate();   

Show Traversal Property list:

For(int i=0;i< m_propertyList.GetSize();i++)
M_propertyList.m_List[i]->GetString();   

Each of these entries corresponds to a pointer to a Yjpropertyitem object. Please look at the code.

Development: Windows xp+vs2003 code See related attachments

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.