Solved

Using MSHFlexGrid control in an MFC DLL

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

Get proactive database performance tuning online

At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!

Question has a verified solution.

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

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
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.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

630 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