Click here to Skip to main content
14,266,228 members

C / C++ / MFC

 
GeneralRe: Hook stops application Pin
Mark_G0028-Jun-19 3:23
memberMark_G0028-Jun-19 3:23 
GeneralRe: Hook stops application Pin
Victor Nijegorodov28-Jun-19 4:50
memberVictor Nijegorodov28-Jun-19 4:50 
GeneralRe: Hook stops application Pin
Mark_G0028-Jun-19 6:41
memberMark_G0028-Jun-19 6:41 
GeneralRe: Hook stops application Pin
Victor Nijegorodov28-Jun-19 7:45
memberVictor Nijegorodov28-Jun-19 7:45 
GeneralRe: Hook stops application Pin
Mark_G0028-Jun-19 9:03
memberMark_G0028-Jun-19 9:03 
GeneralRe: Hook stops application Pin
leon de boer28-Jun-19 20:59
memberleon de boer28-Jun-19 20:59 
GeneralRe: Hook stops application Pin
Mark_G0029-Jun-19 3:36
memberMark_G0029-Jun-19 3:36 
QuestionImporting enhanced metafile from ms word to MFC problem Pin
zakomed24-Jun-19 3:55
memberzakomed24-Jun-19 3: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
_Flaviu18-Jun-19 23:38
member_Flaviu18-Jun-19 23:38 
QuestionRe: CStringList on heap Pin
CPallini19-Jun-19 2:19
mveCPallini19-Jun-19 2:19 
AnswerRe: CStringList on heap Pin
_Flaviu19-Jun-19 19:36
member_Flaviu19-Jun-19 19:36 
GeneralRe: CStringList on heap Pin
CPallini20-Jun-19 4:49
mveCPallini20-Jun-19 4:49 
AnswerRe: CStringList on heap Pin
Maximilien19-Jun-19 3:43
memberMaximilien19-Jun-19 3:43 
GeneralRe: CStringList on heap Pin
_Flaviu19-Jun-19 19:38
member_Flaviu19-Jun-19 19:38 
GeneralRe: CStringList on heap Pin
Richard MacCutchan19-Jun-19 21:07
protectorRichard MacCutchan19-Jun-19 21:07 
GeneralRe: CStringList on heap Pin
Stefan_Lang19-Jun-19 23:20
memberStefan_Lang19-Jun-19 23:20 
GeneralRe: CStringList on heap Pin
jschell23-Jun-19 5:54
memberjschell23-Jun-19 5:54 
GeneralRe: CStringList on heap Pin
Stefan_Lang23-Jun-19 21:02
memberStefan_Lang23-Jun-19 21:02 
GeneralRe: CStringList on heap Pin
CPallini20-Jun-19 4:50
mveCPallini20-Jun-19 4:50 
AnswerRe: CStringList on heap Pin
Stefan_Lang20-Jun-19 21:43
memberStefan_Lang20-Jun-19 21:43 
GeneralRe: CStringList on heap Pin
_Flaviu20-Jun-19 23:43
member_Flaviu20-Jun-19 23:43 
QuestionRFX_Date throwing "Datetime field overflow" exception after changing to ODBC Driver 13 for SQL Server Pin
Member 1106593318-Jun-19 8:04
memberMember 1106593318-Jun-19 8:04 
QuestionRe: RFX_Date throwing "Datetime field overflow" exception after changing to ODBC Driver 13 for SQL Server Pin
Eddy Vluggen18-Jun-19 8:16
mveEddy Vluggen18-Jun-19 8:16 
QuestionRe: RFX_Date throwing "Datetime field overflow" exception after changing to ODBC Driver 13 for SQL Server Pin
David Crow18-Jun-19 9:04
memberDavid Crow18-Jun-19 9:04 
AnswerRe: RFX_Date throwing "Datetime field overflow" exception after changing to ODBC Driver 13 for SQL Server Pin
Richard MacCutchan18-Jun-19 9:39
protectorRichard MacCutchan18-Jun-19 9: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.