Solved

Using MSHFlexGrid control in an MFC DLL

Posted on 2003-11-06
2
248 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Generic progress indicator 6 113
Tab names are off by one 5 53
How to know only "File created" with EventLog 3 32
maxBlock challenge 30 112
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
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.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

920 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

15 Experts available now in Live!

Get 1:1 Help Now