Click here to Skip to main content
15,893,486 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: struct problem Pin
kfaday1-Jun-04 5:35
kfaday1-Jun-04 5:35 
Questionhow can i paste a GIF , BMP or JPEG as background on dialog Pin
Zeeshan Bilal1-Jun-04 1:37
Zeeshan Bilal1-Jun-04 1:37 
AnswerRe: how can i paste a GIF , BMP or JPEG as background on dialog Pin
Anthony_Yio1-Jun-04 1:44
Anthony_Yio1-Jun-04 1:44 
GeneralRe: how can i paste a GIF , BMP or JPEG as background on dialog Pin
Zeeshan Bilal1-Jun-04 1:56
Zeeshan Bilal1-Jun-04 1:56 
Generaldate/time Pin
ozgul1-Jun-04 1:32
ozgul1-Jun-04 1:32 
GeneralRe: date/time Pin
Anthony_Yio1-Jun-04 1:40
Anthony_Yio1-Jun-04 1:40 
GeneralRe: date/time Pin
Zeeshan Bilal1-Jun-04 1:48
Zeeshan Bilal1-Jun-04 1:48 
GeneralMicrosoft Script control Pin
repekcan1-Jun-04 1:28
repekcan1-Jun-04 1:28 
Hi,
I try to use Script Control OCX in VC++ 7.0
i can do that.My problem is that i want to just compile script file by using AddCode method.But it is do compile and run script code.how can i disallow running script:

if (m_TargetEngine == CLSID_JScript)
{
m_ScriptControl.put_Language("JScript");
}
else
{
m_ScriptControl.put_Language("VBScript");
}

m_ScriptControl.put_State(0);
UINT column = 0;
UINT line = 0;
UINT Number;
CString Description;
CString Source;
CString Text;

try
{
//it is also do run but i dont want it do that
m_ScriptControl.AddCode(strCode);
}
catch (...)
{
LPDISPATCH lpdisp = m_ScriptControl.get_Error();
DISPID dispid;
OLECHAR* name = L"Column";
CComVariant result;

HRESULT hr = lpdisp->GetIDsOfNames(IID_NULL,&name,1,GetUserDefaultLCID(),&dispid);
DISPPARAMS params = {NULL,NULL,0,0};
hr = lpdisp->Invoke(dispid,IID_NULL,GetUserDefaultLCID(),DISPATCH_PROPERTYGET,¶ms,&result,NULL,NULL);
column = result.iVal;

name = L"Line";
hr = lpdisp->GetIDsOfNames(IID_NULL,&name,1,GetUserDefaultLCID(),&dispid);
hr = lpdisp->Invoke(dispid,IID_NULL,GetUserDefaultLCID(),DISPATCH_PROPERTYGET,¶ms,&result,NULL,NULL);
line = result.iVal;


name = L"Description";
hr = lpdisp->GetIDsOfNames(IID_NULL,&name,1,GetUserDefaultLCID(),&dispid);
hr = lpdisp->Invoke(dispid,IID_NULL,GetUserDefaultLCID(),DISPATCH_PROPERTYGET,¶ms,&result,NULL,NULL);
Description = CComBSTR(result.bstrVal);

name = L"Source";
hr = lpdisp->GetIDsOfNames(IID_NULL,&name,1,GetUserDefaultLCID(),&dispid);
hr = lpdisp->Invoke(dispid,IID_NULL,GetUserDefaultLCID(),DISPATCH_PROPERTYGET,¶ms,&result,NULL,NULL);
Source = CComBSTR(result.bstrVal);

name = L"Number";
hr = lpdisp->GetIDsOfNames(IID_NULL,&name,1,GetUserDefaultLCID(),&dispid);
hr = lpdisp->Invoke(dispid,IID_NULL,GetUserDefaultLCID(),DISPATCH_PROPERTYGET,¶ms,&result,NULL,NULL);
Number = result.iVal;

name = L"Text";
hr = lpdisp->GetIDsOfNames(IID_NULL,&name,1,GetUserDefaultLCID(),&dispid);
hr = lpdisp->Invoke(dispid,IID_NULL,GetUserDefaultLCID(),DISPATCH_PROPERTYGET,¶ms,&result,NULL,NULL);
Text = CComBSTR(result.bstrVal);

CString strResultFormat;
strResultFormat.Format(_T("Line[%d] Column[%d] %d>> %s %s (%s)"),line,column,Number,Text,Description,Source);
m_TaskList.AddString(strResultFormat);
}

GeneralAccessing Extended ASCII characters in VC++ Pin
Sukumaran K.1-Jun-04 1:19
Sukumaran K.1-Jun-04 1:19 
GeneralRe: Accessing Extended ASCII characters in VC++ Pin
Anthony_Yio1-Jun-04 1:35
Anthony_Yio1-Jun-04 1:35 
GeneralVisual C++ static library creation question Pin
Indrawati1-Jun-04 0:22
Indrawati1-Jun-04 0:22 
GeneralRe: Visual C++ static library creation question Pin
Diddy1-Jun-04 0:48
Diddy1-Jun-04 0:48 
GeneralCapture Keyboard Input Pin
sweep12331-May-04 23:35
sweep12331-May-04 23:35 
GeneralRe: Capture Keyboard Input Pin
Andrew Quinn AUS1-Jun-04 0:33
Andrew Quinn AUS1-Jun-04 0:33 
GeneralRe: Capture Keyboard Input Pin
Diddy1-Jun-04 0:52
Diddy1-Jun-04 0:52 
GeneralRe: Capture Keyboard Input Pin
sweep1231-Jun-04 0:57
sweep1231-Jun-04 0:57 
GeneralRe: Capture Keyboard Input Pin
Diddy1-Jun-04 1:08
Diddy1-Jun-04 1:08 
GeneralRe: Capture Keyboard Input Pin
sweep1231-Jun-04 1:13
sweep1231-Jun-04 1:13 
GeneralRe: Capture Keyboard Input Pin
Anthony_Yio1-Jun-04 1:26
Anthony_Yio1-Jun-04 1:26 
GeneralRe: Capture Keyboard Input Pin
dart131-Jun-04 1:32
dart131-Jun-04 1:32 
QuestionHow to launch .job file in VC++ Pin
kt wu31-May-04 23:03
kt wu31-May-04 23:03 
AnswerRe: How to launch .job file in VC++ Pin
Anthony_Yio1-Jun-04 1:03
Anthony_Yio1-Jun-04 1:03 
GeneralProblem in impersonating COM control Pin
amit131331-May-04 22:35
amit131331-May-04 22:35 
GeneralRe: Problem in impersonating COM control Pin
Anthony_Yio1-Jun-04 1:58
Anthony_Yio1-Jun-04 1:58 
GeneralEnable/Disable On Apply Button Pin
Rajesh_K_Sharma31-May-04 22:13
Rajesh_K_Sharma31-May-04 22:13 

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.