Click here to Skip to main content
15,923,226 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Is that possible to run an EXE file that is placed inside a data file ? Pin
Iain Clarke, Warrior Programmer23-Nov-07 4:30
Iain Clarke, Warrior Programmer23-Nov-07 4:30 
GeneralRe: Is that possible to run an EXE file that is placed inside a data file ? Pin
sdancer7523-Nov-07 6:34
sdancer7523-Nov-07 6:34 
QuestionChecking a CWnd pointer Pin
Hadi Dayvary22-Nov-07 1:38
professionalHadi Dayvary22-Nov-07 1:38 
AnswerRe: Checking a CWnd pointer Pin
Paresh Chitte22-Nov-07 1:43
Paresh Chitte22-Nov-07 1:43 
GeneralRe: Checking a CWnd pointer Pin
Hadi Dayvary22-Nov-07 2:02
professionalHadi Dayvary22-Nov-07 2:02 
AnswerRe: Checking a CWnd pointer Pin
jhwurmbach22-Nov-07 5:43
jhwurmbach22-Nov-07 5:43 
GeneralRe: Checking a CWnd pointer Pin
Iain Clarke, Warrior Programmer22-Nov-07 6:09
Iain Clarke, Warrior Programmer22-Nov-07 6:09 
QuestionDisable Activex Controls on Another Application Pin
narayanagvs22-Nov-07 0:52
narayanagvs22-Nov-07 0:52 
Hi,

I need to disable Windowed ActiveX Controls on another Application, say Windows Media Player.

Is it Possible?
Iam doing this way...

Initially I am opening the windows media player and then executing the below code.I could notice that the ActiveX controls on WmPlayer are windowed ActiveX controls by placing messageboxes.

But when I disable the ActiveX control using the handle I got it throws an assertion


CWnd *pWnd = CWnd::FindWindow(_T("WMPlayerApp"),NULL); 
if(pWnd == NULL)
{
if(AfxMessageBox(_T("Couldn't find the Windows Media Player application. Do you want to start it?"),MB_YESNO) == IDYES)
{
//System::Diagnostics::Process::Start("WMPlayer");   (or) using createprocess
}
return;
}

HWND hWndChildAfter = NULL; 
CWnd *pChild = CWnd::FindWindowEx(pWnd->GetSafeHwnd(),hWndChildAfter,_T("WMPAppHost"),NULL);

COleControlSiteOrWnd* pOleChildSiteOrWnd = (COleControlSiteOrWnd*)pChild->GetNextDlgTabItem((CWnd*)pChild);
COleControlSite* pOleControlSite;
if(pOleChildSiteOrWnd->m_hWnd == NULL)
{
AfxMessageBox(_T("Its a Windowless ActiveX Control")); 
}
else if(pOleChildSiteOrWnd->m_pSite == NULL)
{
AfxMessageBox(_T("Its a Standard Window Control")); 
}
else if(pOleChildSiteOrWnd->m_hWnd != NULL && pOleChildSiteOrWnd->m_pSite != NULL)
{
AfxMessageBox(_T("Its a Windowed ActiveX Control")); 
pOleControlSite = pOleChildSiteOrWnd->m_pSite;
}
pOleControlSite->EnableWindow(FALSE);//---> Getting Assertion at this point


Is this the right approach? or else can this be possible by hooking and inspecting the click on the ActiveX control? I need an approach. Any suggestions would be greatly appreciated.

Thanks in Advance
Satya





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

QuestionHow do I create a CDialog object without showing it? Pin
arnold_w22-Nov-07 0:26
arnold_w22-Nov-07 0:26 
AnswerRe: How do I create a CDialog object without showing it? Pin
CPallini22-Nov-07 0:42
mveCPallini22-Nov-07 0:42 
GeneralRe: How do I create a CDialog object without showing it? Pin
arnold_w22-Nov-07 1:37
arnold_w22-Nov-07 1:37 
GeneralRe: How do I create a CDialog object without showing it? Pin
CPallini22-Nov-07 2:00
mveCPallini22-Nov-07 2:00 
GeneralRe: How do I create a CDialog object without showing it? Pin
Malli_S22-Nov-07 2:13
Malli_S22-Nov-07 2:13 
GeneralRe: How do I create a CDialog object without showing it? Pin
CPallini22-Nov-07 2:21
mveCPallini22-Nov-07 2:21 
GeneralRe: How do I create a CDialog object without showing it? Pin
arnold_w22-Nov-07 2:22
arnold_w22-Nov-07 2:22 
GeneralRe: How do I create a CDialog object without showing it? Pin
arnold_w22-Nov-07 2:16
arnold_w22-Nov-07 2:16 
AnswerRe: How do I create a CDialog object without showing it? Pin
Malli_S22-Nov-07 2:09
Malli_S22-Nov-07 2:09 
GeneralRe: How do I create a CDialog object without showing it? Pin
arnold_w22-Nov-07 2:19
arnold_w22-Nov-07 2:19 
QuestionDynamic Port allocation Pin
Shreyas Ganesh22-Nov-07 0:24
Shreyas Ganesh22-Nov-07 0:24 
AnswerRe: Dynamic Port allocation Pin
Moak29-Nov-07 23:50
Moak29-Nov-07 23:50 
QuestionTCHAR[500] to const char* Pin
Paulraj G21-Nov-07 23:47
Paulraj G21-Nov-07 23:47 
AnswerRe: TCHAR[500] to const char* Pin
CPallini22-Nov-07 0:11
mveCPallini22-Nov-07 0:11 
AnswerRe: TCHAR[500] to const char* Pin
winter7723-Nov-07 19:32
winter7723-Nov-07 19:32 
QuestionOn Timer Pin
Chandrasekharan P21-Nov-07 23:40
Chandrasekharan P21-Nov-07 23:40 
AnswerRe: On Timer Pin
KarstenK22-Nov-07 0:35
mveKarstenK22-Nov-07 0:35 

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.