Click here to Skip to main content
15,903,033 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Need help in getting Fax APIs Pin
Waldermort24-Jan-07 4:46
Waldermort24-Jan-07 4:46 
GeneralAnonymous seem to be back Pin
toxcct24-Jan-07 6:50
toxcct24-Jan-07 6:50 
AnswerRe: Need help in getting Fax APIs Pin
Hamid_RT25-Jan-07 19:23
Hamid_RT25-Jan-07 19:23 
QuestionDirectX and Circles Pin
Waldermort24-Jan-07 4:18
Waldermort24-Jan-07 4:18 
AnswerRe: DirectX and Circles Pin
Reagan Conservative24-Jan-07 6:07
Reagan Conservative24-Jan-07 6:07 
GeneralRe: DirectX and Circles Pin
Waldermort24-Jan-07 6:22
Waldermort24-Jan-07 6:22 
QuestionTrouble with Vista, MAPI, and Outlook 2000 Pin
gageller24-Jan-07 4:01
gageller24-Jan-07 4:01 
QuestionProblem in Creating Activex in AtlComponent Pin
narayanagvs24-Jan-07 3:13
narayanagvs24-Jan-07 3:13 
Hi,

I have an Atl Component with an Interface EFCMyForm .(ATL Simple Object -- VS2005)
And a Dialog class CMydialog with ActiveX controls Placed on it. using right Click on Dialog and Insert ActiveX Control

In One of thw Exposed Method I am creating the dialog box CMyDialog

CMydialog g_myDlg;  // Global variable
STDMETHODIMP CEFCMyForm::Create() 
{
#ifdef _AFXDLL
	AFX_MANAGE_STATE(AfxGetStaticModuleState())
#endif
    g_myDlg.Create(IDD_MY_DLG);
}
using CDialog:: Create().

If I take a Global variable I don't have any problem but if I take mydialog obj as member variable as shown below...

CMydialog m_myDlg;  // member variable
STDMETHODIMP CEFCMyForm::Create() 
{
#ifdef _AFXDLL
	AFX_MANAGE_STATE(AfxGetStaticModuleState())
#endif
    m_myDlg.Create(IDD_MY_DLG);
}
using CDialog:: Create().

then the ActiveX Controls which are placed on the Dialog are not being Shown.

To resolve this If I try to Dyanamically create the ActiveX controls in
CMyDialog::OninitDialog()
{
-----Using Create Control------
CLSID clsid;
		HRESULT hr1 = CLSIDFromProgID(OLESTR("EsdGraphCtrl.EsdGraphControl.3.0"),&clsid)	;

		if (FAILED(hr1))
		{
		return FALSE;
		}
		BOOL blnSuccess;
		CRect rc;
		rc.left=0;
		rc.top=0;
		rc.right= 100;
		rc.bottom =100;
		blnSuccess = m_AxGraphControl.CreateControl(clsid,_T("Graph"),WS_VISIBLE|WS_CHILD,rc,this,100,0,0,0);

// Then  it is Resulting in Assertion in the above line 
		if (!blnSuccess)
		{
		return FALSE;
		}
}


Any Suggestions would be helpful

Thanks

Today is a gift, that's why it is called the present.

QuestionDetect ethernet interface STATUS?! Pin
djmarki24-Jan-07 2:57
djmarki24-Jan-07 2:57 
QuestionRe: Detect ethernet interface STATUS?! Pin
David Crow24-Jan-07 5:01
David Crow24-Jan-07 5:01 
QuestionGDI Text Input Control Required Urgently.. Pin
zeemalik24-Jan-07 2:50
zeemalik24-Jan-07 2:50 
AnswerRe: GDI Text Input Control Required Urgently.. Pin
Mark Salsbery24-Jan-07 5:39
Mark Salsbery24-Jan-07 5:39 
Questionbased pointer crashed my app Pin
Alex Cutovoi24-Jan-07 2:09
Alex Cutovoi24-Jan-07 2:09 
AnswerRe: based pointer crashed my app Pin
KarstenK24-Jan-07 2:27
mveKarstenK24-Jan-07 2:27 
GeneralRe: based pointer crashed my app Pin
toxcct24-Jan-07 2:30
toxcct24-Jan-07 2:30 
GeneralRe: based pointer crashed my app Pin
KarstenK24-Jan-07 4:35
mveKarstenK24-Jan-07 4:35 
GeneralRe: based pointer crashed my app Pin
toxcct24-Jan-07 4:39
toxcct24-Jan-07 4:39 
GeneralRe: based pointer crashed my app Pin
Alex Cutovoi24-Jan-07 2:38
Alex Cutovoi24-Jan-07 2:38 
GeneralRe: based pointer crashed my app Pin
KarstenK24-Jan-07 4:37
mveKarstenK24-Jan-07 4:37 
GeneralRe: based pointer crashed my app Pin
Mark Salsbery24-Jan-07 5:54
Mark Salsbery24-Jan-07 5:54 
QuestionRe: based pointer crashed my app Pin
David Crow24-Jan-07 4:17
David Crow24-Jan-07 4:17 
AnswerRe: based pointer crashed my app Pin
Alex Cutovoi24-Jan-07 6:00
Alex Cutovoi24-Jan-07 6:00 
QuestionRe: based pointer crashed my app Pin
David Crow24-Jan-07 7:01
David Crow24-Jan-07 7:01 
AnswerRe: based pointer crashed my app Pin
Alex Cutovoi24-Jan-07 8:10
Alex Cutovoi24-Jan-07 8:10 
GeneralRe: based pointer crashed my app Pin
David Crow24-Jan-07 8:37
David Crow24-Jan-07 8:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.