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

C / C++ / MFC

 
GeneralThe VxD problem Pin
Jeef5-May-03 17:59
Jeef5-May-03 17:59 
Generalredirected streams and stdout Pin
virtual me()5-May-03 16:50
virtual me()5-May-03 16:50 
GeneralRe: redirected streams and stdout Pin
Andrew Walker6-May-03 0:19
Andrew Walker6-May-03 0:19 
GeneralCustom Component Newbie Question Pin
crewchill5-May-03 16:18
crewchill5-May-03 16:18 
GeneralRe: Custom Component Newbie Question Pin
Ryan Binns6-May-03 1:50
Ryan Binns6-May-03 1:50 
GeneralCGI printing under IIS Pin
Anonymous5-May-03 13:49
Anonymous5-May-03 13:49 
GeneralRe: CGI printing under IIS Pin
basementman6-May-03 5:16
basementman6-May-03 5:16 
QuestionCopying form a Window to MS Word? Pin
krle5-May-03 13:49
krle5-May-03 13:49 
I am trying to copy contenst of the client area in the window, from a C++ appliation to the MS Word. I am trying to copy to a clipboard using CMetaFileDC and I would like to paste it to the word project. This is what I have so far.

if ( OpenClipboard() )
{
EmptyClipboard();
//create the metafile DC
CMetaFileDC * cDC = new CMetaFileDC();
cDC->CreateEnhanced(GetDC(),NULL,NULL,"the_name");

//DRAWING PROCEDURE USING cDC....

//close meta CMetafileDC and get its handle
HENHMETAFILE handle = cDC->CloseEnhanced();

//place it on the clipboard
SetClipboardData(CF_ENHMETAFILE,handle);
CloseClipboard();

//delete the dc
delete cDC;
}

_Application objWord;
COleVariant vtOptional((long)DISP_E_PARAMNOTFOUND,VT_ERROR),
vtTrue((short)TRUE),
vtFalse((short)FALSE);

// Get the IDispatch pointer and attach it to the objWord object.
if (!objWord.CreateDispatch("Word.Application"))
{
AfxMessageBox("Couldn't get Word object.");
return;
}
objWord.SetVisible(TRUE); //This shows the application.

I am suck in opening the MS Word project and I can't seem to paste the contents of the clipboard. Is this logic correct. Does anybody have a suggestion on how to paste the contents of the metafile??? Thanks.
QuestionHow do I control what happens on a keypress? Pin
Kaezin5-May-03 13:13
Kaezin5-May-03 13:13 
AnswerRe: How do I control what happens on a keypress? Pin
valikac5-May-03 13:47
valikac5-May-03 13:47 
AnswerRe: How do I control what happens on a keypress? Pin
Michael Dunn5-May-03 17:43
sitebuilderMichael Dunn5-May-03 17:43 
Generalunknown mistake Pin
aguest5-May-03 12:34
aguest5-May-03 12:34 
GeneralRe: unknown mistake Pin
Baris Kurtlutepe5-May-03 12:38
Baris Kurtlutepe5-May-03 12:38 
GeneralRe: unknown mistake Pin
Wes Aday5-May-03 12:39
professionalWes Aday5-May-03 12:39 
GeneralRe: unknown mistake Pin
jhaga5-May-03 12:55
professionaljhaga5-May-03 12:55 
GeneralRe: unknown mistake Pin
aguest5-May-03 13:08
aguest5-May-03 13:08 
GeneralRe: unknown mistake Pin
aguest5-May-03 13:14
aguest5-May-03 13:14 
Generalanother problem Pin
aguest5-May-03 13:28
aguest5-May-03 13:28 
GeneralRe: another problem Pin
Chris Richardson6-May-03 5:16
Chris Richardson6-May-03 5:16 
GeneralLaunch a thread in a dll Pin
peter ho5-May-03 12:29
peter ho5-May-03 12:29 
GeneralRe: Launch a thread in a dll Pin
Trollslayer5-May-03 13:26
mentorTrollslayer5-May-03 13:26 
GeneralRe: Launch a thread in a dll Pin
Neville Franks6-May-03 1:39
Neville Franks6-May-03 1:39 
GeneralMaze program using recursive function UPDATED! Pin
lostlinkpr5-May-03 11:19
lostlinkpr5-May-03 11:19 
GeneralRe: Maze program using recursive function Pin
Nick Pirocanac5-May-03 11:48
Nick Pirocanac5-May-03 11:48 
GeneralRe: Maze program using recursive function Pin
Sean Cundiff5-May-03 11:49
Sean Cundiff5-May-03 11:49 

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.