Click here to Skip to main content
15,913,854 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: GDI+ drawings on background image Pin
_NielsB27-Sep-05 1:04
_NielsB27-Sep-05 1:04 
QuestionProblem with unicode data Pin
Veera Raghavendra27-Sep-05 0:34
Veera Raghavendra27-Sep-05 0:34 
AnswerRe: Problem with unicode data Pin
MailtoGops27-Sep-05 2:45
MailtoGops27-Sep-05 2:45 
GeneralRe: Problem with unicode data Pin
Veera Raghavendra27-Sep-05 3:32
Veera Raghavendra27-Sep-05 3:32 
Questionwho sets the last error? Pin
Chintoo72327-Sep-05 0:07
Chintoo72327-Sep-05 0:07 
AnswerRe: who sets the last error? Pin
mark novak27-Sep-05 2:54
mark novak27-Sep-05 2:54 
AnswerRe: who sets the last error? Pin
Marc Soleda27-Sep-05 3:22
Marc Soleda27-Sep-05 3:22 
QuestionProblem Unloading ActiveX Control Pin
scch26-Sep-05 23:51
scch26-Sep-05 23:51 
In my MFC based dialog Application I display an ActiveX Control.

CString strControlProgid = "Project1.UserControl1"; //ActiveX Control name
::GetClientRect(m_hWnd,&rc);
//CWnd m_PLC_Control; Member defined in .h
bStat= m_PLC_Control.CreateControl ( strControlProgid, "", WS_VISIBLE, rc,
this, 5000, NULL, FALSE, NULL );
::SetWindowText (m_hWnd,strControlProgid);
pPlcControl = m_PLC_Control.GetControlUnknown ();
pPlcControl->QueryInterface(IID_IDispatch, (void **)&pdisp);


So far it works fine. After I get an event from the ActiveX Control I close it. But it does not release it from memory.

m_PLC_Control.DestroyWindow();
::SetWindowText (m_hWnd,"ActiveX Container");


So next time I display the ActiveX Control, the memory increases again. So on until memory is to high and CreateControl failes.

What have I to do to release the memory so I am able to display the ActiveX Control as often as I want?

Thanks for your help in advance
Christian
AnswerRe: Problem Unloading ActiveX Control Pin
Blake Miller27-Sep-05 4:24
Blake Miller27-Sep-05 4:24 
GeneralRe: Problem Unloading ActiveX Control Pin
scch27-Sep-05 6:07
scch27-Sep-05 6:07 
GeneralIt works Pin
scch27-Sep-05 6:26
scch27-Sep-05 6:26 
GeneralRe: Problem Unloading ActiveX Control Pin
Blake Miller27-Sep-05 6:49
Blake Miller27-Sep-05 6:49 
QuestionHow to change cursor? Pin
george ivanov26-Sep-05 23:42
george ivanov26-Sep-05 23:42 
AnswerRe: How to change cursor? Pin
AHawk27-Sep-05 0:08
AHawk27-Sep-05 0:08 
AnswerRe: How to change cursor? Pin
AHawk27-Sep-05 0:10
AHawk27-Sep-05 0:10 
AnswerRe: How to change cursor? Pin
Ashok Dhamija27-Sep-05 4:36
Ashok Dhamija27-Sep-05 4:36 
QuestionHow to initialize _TCHAR array Pin
Boaz V26-Sep-05 23:32
Boaz V26-Sep-05 23:32 
AnswerRe: How to initialize _TCHAR array Pin
Laffis26-Sep-05 23:36
Laffis26-Sep-05 23:36 
GeneralRe: How to initialize _TCHAR array Pin
Boaz V27-Sep-05 0:42
Boaz V27-Sep-05 0:42 
QuestionUse of Narrator and other screen readers Pin
greekgoddj26-Sep-05 23:27
greekgoddj26-Sep-05 23:27 
QuestionHelp hooking Windows API functions Pin
JaVinci26-Sep-05 23:27
JaVinci26-Sep-05 23:27 
AnswerRe: Help hooking Windows API functions Pin
Laffis26-Sep-05 23:41
Laffis26-Sep-05 23:41 
GeneralRe: Help hooking Windows API functions Pin
ThatsAlok27-Sep-05 1:42
ThatsAlok27-Sep-05 1:42 
QuestionTo save & restore Files and Folders Pin
rajeevktripathi26-Sep-05 23:16
rajeevktripathi26-Sep-05 23:16 
AnswerRe: To save & restore Files and Folders Pin
AHawk26-Sep-05 23:56
AHawk26-Sep-05 23:56 

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.