Solved

Using MSHFlexGrid control in an MFC DLL

Posted on 2003-11-06
2
251 Views
Last Modified: 2013-11-20
Hi Experts,

I've created a regular MFC DLL that displays a dialog window when called.

On this dialog I'm trying to put a MSHFlexGrid control. Every time I put the

MSHFlexGrid control on the dialog though, it causes the dialog box not to appear.

The rest of the porgram runs fine. If I delete the grid control from the dialog and

run the program, the dialog window will appear. Am I forgetting to init something

with the grid control, or is this being caused by something else?

-CPOsosky
0
Comment
Question by:CPOsosky
2 Comments
 
LVL 23

Accepted Solution

by:
Roshan Davis earned 400 total points
ID: 9698863
Dialog Properties -> More Styles ->
*check* the box, "no fail create" and run. Now u can see the dialog right?

but not the FlexGrid.

So call "AfxEnableControlContainer()" in your App class' InitInstance

like

BOOL CContainerApp::InitInstance()
{
        AfxEnableControlContainer();
        ...
}

If again problem...you can try CoInitialize(NULL) also

Good Luck


0
 

Author Comment

by:CPOsosky
ID: 9701468
CoInitialize(NULL) worked.

Thanks!

-CPOsosky
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

786 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