Solved

MSFLEXGRID in a Sub-Dialog

Posted on 1998-08-27
1
590 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Which IDE to use to begin C++ training? 5 66
White board coding practice 3 92
Least Squares Curve Fitting 4 99
Outlook 13 45
Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

830 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