Solved

MSFLEXGRID in a Sub-Dialog

Posted on 1998-08-27
1
583 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
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

744 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

16 Experts available now in Live!

Get 1:1 Help Now