Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Using MSHFlexGrid control in an MFC DLL

Posted on 2003-11-06
2
Medium Priority
?
273 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 1600 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

670 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