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

C / C++ / MFC

 
GeneralRe: No No No! Pin
digwizfox8-Jul-04 5:39
digwizfox8-Jul-04 5:39 
GeneralLock keybord and mouse Pin
Larsson7-Jul-04 23:43
Larsson7-Jul-04 23:43 
GeneralBest technique to Schedule Tasks Pin
Atif Mushtaq7-Jul-04 23:38
Atif Mushtaq7-Jul-04 23:38 
GeneralRe: Best technique to Schedule Tasks Pin
Blake Miller8-Jul-04 14:13
Blake Miller8-Jul-04 14:13 
Generalchange desktop backgroun color Pin
repekcan7-Jul-04 23:24
repekcan7-Jul-04 23:24 
GeneralRe: change desktop backgroun color Pin
Mike Dimmick8-Jul-04 0:54
Mike Dimmick8-Jul-04 0:54 
Generalthanks your help Pin
repekcan8-Jul-04 1:03
repekcan8-Jul-04 1:03 
GeneralVC++ Automation Word 2000 Error : Unable to Disable "Cntrl+C" Pin
vishalmore7-Jul-04 23:16
vishalmore7-Jul-04 23:16 
Hi,

I am automating Word 2000 and I want to disable the "Ctrl C" keyboard functionality. (Using VBA I am successful in disabling the "Ctrl+C" by doing this - "Application.FindKey(BuildKeyCode(wdKeyControl, wdKeyC)).Disable")

I am using the following C++ automation code which gives me the DISP_E_EXCEPTION error code on IDispatch::Invoke for "Disable" method ("AutoWrap" function below is a wrapper around IDispatch::Invoke). Here is my C++ code:

parm1.vt = VT_I4;
parm1.lVal = wdKeyControl;
parm2.vt = VT_I4;
parm2.lVal = wdKeyC;
VariantClear(&result);
AutoWrap(DISPATCH_METHOD, &result, pWdApp, L"BuildKeyCode",2,parm2,parm1);

parm1.vt = VT_I4;
parm1.lVal = result.lVal;
VariantClear(&result);
AutoWrap(DISPATCH_PROPERTYGET , &result, pWdApp, L"FindKey", 1,parm1);

pWdKey = result.pdispVal;
AutoWrap(DISPATCH_METHOD, NULL,pWdKey , L"Disable", 0);

Error :
"This method or property is not available because this document is in another application"



I will appreciate any help on this.

Thanks.
Vishal
----------------------



Vishal More
GeneralODBC API Pin
Yulianto.7-Jul-04 23:11
Yulianto.7-Jul-04 23:11 
GeneralRe: ODBC API Pin
Johan Rosengren8-Jul-04 0:24
Johan Rosengren8-Jul-04 0:24 
GeneralOnMouseMove value problem Pin
d0153030y7-Jul-04 21:48
sussd0153030y7-Jul-04 21:48 
GeneralRe: onmousemove value problem Pin
Mike Dimmick8-Jul-04 1:17
Mike Dimmick8-Jul-04 1:17 
Generalfread() with excel and powerpoint files Pin
Member 3600827-Jul-04 20:27
Member 3600827-Jul-04 20:27 
GeneralRe: fread() with excel and powerpoint files Pin
vmaltsev8-Jul-04 2:03
vmaltsev8-Jul-04 2:03 
GeneralRe: fread() with excel and powerpoint files Pin
Member 3600828-Jul-04 2:08
Member 3600828-Jul-04 2:08 
GeneralRe: fread() with excel and powerpoint files Pin
vmaltsev8-Jul-04 2:50
vmaltsev8-Jul-04 2:50 
GeneralRe: fread() with excel and powerpoint files Pin
David Crow8-Jul-04 3:17
David Crow8-Jul-04 3:17 
GeneralAbout fatal error,when using customized template class in MFC proj. Pin
bg2sc7-Jul-04 20:06
bg2sc7-Jul-04 20:06 
GeneralRe: About fatal error,when using customized template class in MFC proj. Pin
Mike Dimmick8-Jul-04 1:57
Mike Dimmick8-Jul-04 1:57 
GeneralTiff to raw Pin
rita12027-Jul-04 19:52
rita12027-Jul-04 19:52 
GeneralRe: Tiff to raw Pin
ThatsAlok7-Jul-04 22:32
ThatsAlok7-Jul-04 22:32 
GeneralWhy can't U Update dynamic in sort mode Pin
inlandchris7-Jul-04 18:34
inlandchris7-Jul-04 18:34 
QuestionHow can i manipulate Registry Pin
Zeeshan Bilal7-Jul-04 18:29
Zeeshan Bilal7-Jul-04 18:29 
AnswerRe: How can i manipulate Registry Pin
Yogesh Kshatriya7-Jul-04 19:21
Yogesh Kshatriya7-Jul-04 19:21 
GeneralError in Open key and Query Pin
Zeeshan Bilal7-Jul-04 20:31
Zeeshan Bilal7-Jul-04 20:31 

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.