Solved

MSFLEXGRID in a Sub-Dialog

Posted on 1998-08-27
1
587 Views
Last Modified: 2008-02-01
I built a Single Document MFC-AppWizard project with a view-class derived from CFormView. I insert the MSFLEXGRID from the controls into the view, set some properties and used the grid without a problem. I tried the same with a dialog in the same project. I open the dialog with .DoModal() from the view.The grid is visible. When I try to use any grid function such as .SetFixedCols(3) there is an error "dialog assertion failed, File winocc.cpp, Line 349", probably because "m_pCtrlSite" is zero. My question is : What do I have to do to use MSFLEXGRID in a dialog ?
0
Comment
Question by:schopp
1 Comment
 
LVL 23

Accepted Solution

by:
chensu earned 100 total points
ID: 1171311
1. Use Components and Controls Gallery to insert the ActiveX control into your project.
2. Place the ActiveX control onto the dialog box by using the Dialog Editor.
3. Use ClassWizard to associate the ActiveX control with a member variable (eg., CMSFlexGrid m_msfg;).
4. In your dialog class, call the function m_msfg.SetFixedCols(3). If you do so in the OnInitDialog(), you should call it after CDialog::OnInitDialog();.
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Visual c++ and text files 7 67
Fast, free, private online code repository / editor 7 97
Fully specialized class template function 21 136
What is sub-make ? 2 58
Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now