Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

MSFLEXGRID in a Sub-Dialog

Posted on 1998-08-27
1
Medium Priority
?
612 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 400 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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
Suggested Courses

783 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