Solved

Using MSHFlexGrid control in an MFC DLL

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

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: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

760 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

21 Experts available now in Live!

Get 1:1 Help Now