Click here to Skip to main content
15,113,692 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Hook stops application Pin
Mark_G0028-Jun-19 4:23
MemberMark_G0028-Jun-19 4:23 
GeneralRe: Hook stops application Pin
Victor Nijegorodov28-Jun-19 5:50
MemberVictor Nijegorodov28-Jun-19 5:50 
GeneralRe: Hook stops application Pin
Mark_G0028-Jun-19 7:41
MemberMark_G0028-Jun-19 7:41 
GeneralRe: Hook stops application Pin
Victor Nijegorodov28-Jun-19 8:45
MemberVictor Nijegorodov28-Jun-19 8:45 
GeneralRe: Hook stops application Pin
Mark_G0028-Jun-19 10:03
MemberMark_G0028-Jun-19 10:03 
GeneralRe: Hook stops application Pin
leon de boer28-Jun-19 21:59
Memberleon de boer28-Jun-19 21:59 
GeneralRe: Hook stops application Pin
Mark_G0029-Jun-19 4:36
MemberMark_G0029-Jun-19 4:36 
QuestionImporting enhanced metafile from ms word to MFC problem Pin
zakomed24-Jun-19 4:55
Memberzakomed24-Jun-19 4:55 
<pre>I am implementing a MS Word report program (in MFC c++) which uses MS Word to produce some kind of report from my program.
A document that is produced is based on a template "mytemplate.dot" or "mytemplate.dotm" .
When creating "mytemplate" in MS Word, I insert an enhanced metafile picture (via clippboard) from my program. This enhanced metafile has a unique signature text "XYZ" (example).
"mytemplate' is stored in both "dot" and "dotm" formats. Any new file created in Word (2007,20016) based on these tempaltes opens correctly and I can see my enhanced metafile picture correctly displayed in Word and my unique "XYZ" is there.
Now I create a "mytemplated" based document in my c++ program (using msword.olb type library).
m_doc = documents.Add(& mytemplate,....)

Then I enumarete through inlineshapes to find the wdInlineShapePicture type (which for the test purpose is the only inlineshape in document). I find the inlineshape object without any problem ("myinlineshape"). I do myinlineshape.Copy() and then use the clipboard to copy the enhanced metafile picture to my c++ program:

OpenClipboard(AfxGetMainWnd()->m_hWnd);
HANDLE hclip = GetClipboardData (CF_ENHMETAFILE ); //first I check if CF_ENMETAFILE is available in the clippboard

everything is OK till now

Now when I use the "mytemplate.dot" format the enhanced metafile in my program is exactly the same as it in Word - (the size and number of segments is exactly the same).
When I use the "mytemplate.dotm" format, the metafile is changed - the size is different, number of segments is suddently quite small (like 19 vs 5000 in original). The picture shows the same contents but it is more like bitmap not a metafile.

Can anybody explain what can be wrong?</pre>
QuestionCStringList on heap Pin
_Flaviu19-Jun-19 0:38
Member_Flaviu19-Jun-19 0:38 
QuestionRe: CStringList on heap Pin
CPallini19-Jun-19 3:19
mveCPallini19-Jun-19 3:19 
AnswerRe: CStringList on heap Pin
_Flaviu19-Jun-19 20:36
Member_Flaviu19-Jun-19 20:36 
GeneralRe: CStringList on heap Pin
CPallini20-Jun-19 5:49
mveCPallini20-Jun-19 5:49 
AnswerRe: CStringList on heap Pin
Maximilien19-Jun-19 4:43
MemberMaximilien19-Jun-19 4:43 
GeneralRe: CStringList on heap Pin
_Flaviu19-Jun-19 20:38
Member_Flaviu19-Jun-19 20:38 
GeneralRe: CStringList on heap Pin
Richard MacCutchan19-Jun-19 22:07
mveRichard MacCutchan19-Jun-19 22:07 
GeneralRe: CStringList on heap Pin
Stefan_Lang20-Jun-19 0:20
mveStefan_Lang20-Jun-19 0:20 
GeneralRe: CStringList on heap Pin
jschell23-Jun-19 6:54
Memberjschell23-Jun-19 6:54 
GeneralRe: CStringList on heap Pin
Stefan_Lang23-Jun-19 22:02
mveStefan_Lang23-Jun-19 22:02 
GeneralRe: CStringList on heap Pin
CPallini20-Jun-19 5:50
mveCPallini20-Jun-19 5:50 
AnswerRe: CStringList on heap Pin
Stefan_Lang20-Jun-19 22:43
mveStefan_Lang20-Jun-19 22:43 
GeneralRe: CStringList on heap Pin
_Flaviu21-Jun-19 0:43
Member_Flaviu21-Jun-19 0:43 
QuestionRFX_Date throwing "Datetime field overflow" exception after changing to ODBC Driver 13 for SQL Server Pin
Member 1106593318-Jun-19 9:04
MemberMember 1106593318-Jun-19 9:04 
QuestionRe: RFX_Date throwing "Datetime field overflow" exception after changing to ODBC Driver 13 for SQL Server Pin
Eddy Vluggen18-Jun-19 9:16
professionalEddy Vluggen18-Jun-19 9:16 
QuestionRe: RFX_Date throwing "Datetime field overflow" exception after changing to ODBC Driver 13 for SQL Server Pin
David Crow18-Jun-19 10:04
MemberDavid Crow18-Jun-19 10:04 
AnswerRe: RFX_Date throwing "Datetime field overflow" exception after changing to ODBC Driver 13 for SQL Server Pin
Richard MacCutchan18-Jun-19 10:39
mveRichard MacCutchan18-Jun-19 10:39 

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.