I am using Visual Studio 2008, and i am working with a single document application, it is CView Based, and i want to know how i can in addition to the view, that i will be drawing on, how i can add controls, like CButton and CListBox. do i have to make a toolbar, or can it be added to the view? a simple example would be nice
sciwizeh
62
Posting Pro in Training
Recommended Answers
Jump to PostYou can add controls, but it might be easier to use CFormView which is derived from CView but acts like CDialog.
To add a button to your CView, just create an instance of CButton in the CView's class, then when initializing CView class call the button's Create() method. Of …
Jump to Postyes, and yes. If you want to know how to change the listbox contents, just read the methods that are available and you will find it (I don't recall off the top of my head.)
Jump to Postsearch www.microsoft.com for CListBox. You can find everything you need there, and for all the windows classes. You should use that for all your MFC questions, if you can't find it there then …
All 10 Replies
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
sciwizeh
62
Posting Pro in Training
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
sciwizeh
62
Posting Pro in Training
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
sciwizeh
62
Posting Pro in Training
mitrmkar
1,056
Posting Virtuoso
sciwizeh
62
Posting Pro in Training
mitrmkar
1,056
Posting Virtuoso
sciwizeh
62
Posting Pro in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.