Solved

MSFLEXGRID in a Sub-Dialog

Posted on 1998-08-27
1
594 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
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 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 how to clear a vector as well as how to detect empty vectors in C++.
Suggested Courses

615 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