Click here to Skip to main content
15,919,245 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Anyone explain why this causes a BSOD? Pin
David Wulff11-Mar-03 11:03
David Wulff11-Mar-03 11:03 
GeneralRe: Anyone explain why this causes a BSOD? Pin
Ray Cassick11-Mar-03 11:10
Ray Cassick11-Mar-03 11:10 
GeneralRe: Anyone explain why this causes a BSOD? Pin
David Wulff11-Mar-03 11:20
David Wulff11-Mar-03 11:20 
GeneralRe: Anyone explain why this causes a BSOD? Pin
Ray Cassick11-Mar-03 11:29
Ray Cassick11-Mar-03 11:29 
Generalaccess violation when trying to use fwrite() Pin
Kuniva11-Mar-03 9:36
Kuniva11-Mar-03 9:36 
GeneralRe: access violation when trying to use fwrite() Pin
Dave Bryant11-Mar-03 9:41
Dave Bryant11-Mar-03 9:41 
GeneralRe: access violation when trying to use fwrite() Pin
Kuniva11-Mar-03 9:50
Kuniva11-Mar-03 9:50 
GeneralCF_HTML (HTML Format) Pin
Kant11-Mar-03 9:34
Kant11-Mar-03 9:34 
I am looking for a sample where you can paste in HTML format.

I got Rich Edit control and strData contains like this
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 MS Sans Serif;}}
\viewkind4\uc1\pard\f0\fs17
\par \b Test\b0
\par

What I am expecting is like this:
< HTML > (intended spaces there)



< B >Test < / B> (intended spaces there)

< / HTML> (intended spaces there)

Code from Copy to Clipboard function:

UINT format = ::RegisterClipboardFormat("HTML Format");<br />
<br />
if (strData.IsEmpty())<br />
  return;<br />
<br />
CSharedFile sf(GMEM_MOVEABLE|GMEM_SHARE|GMEM_ZEROINIT);<br />
sf.Write(strData, strData.GetLength() * sizeof(TCHAR));<br />
<br />
if (!OpenClipboard())<br />
  return;<br />
<br />
EmptyClipboard();<br />
	    <br />
SetClipboardData(format, sf.Detach());<br />
<br />
CloseClipboard();


But when I paste into another control(Edit), all I get is RTF only.
Do I need to convert from RTF format to HTML format?? Confused | :confused:
If yes, then what's the use of CF_HTML("HTML Format") parameter??

Kant
GeneralRe: CF_HTML (HTML Format) Pin
Brian Shifrin11-Mar-03 16:40
Brian Shifrin11-Mar-03 16:40 
GeneralDecimal Symbol Pin
Haakon S.11-Mar-03 9:12
Haakon S.11-Mar-03 9:12 
GeneralRe: Decimal Symbol Pin
brianwelsch12-Mar-03 9:47
brianwelsch12-Mar-03 9:47 
GeneralRe: Decimal Symbol Pin
Haakon S.12-Mar-03 11:09
Haakon S.12-Mar-03 11:09 
GeneralRe: Decimal Symbol Pin
PJ Arends12-Mar-03 10:08
professionalPJ Arends12-Mar-03 10:08 
GeneralRe: Decimal Symbol Pin
Haakon S.12-Mar-03 10:59
Haakon S.12-Mar-03 10:59 
Generalmfc ActiveX control install issue Pin
work_to_live11-Mar-03 9:04
work_to_live11-Mar-03 9:04 
GeneralRe: mfc ActiveX control install issue Pin
Dave Bryant11-Mar-03 9:38
Dave Bryant11-Mar-03 9:38 
GeneralRe: mfc ActiveX control install issue Pin
work_to_live11-Mar-03 11:59
work_to_live11-Mar-03 11:59 
GeneralPassing Variables from Macromedia Director to C++ Pin
moojuice11-Mar-03 9:03
moojuice11-Mar-03 9:03 
GeneralRe: Passing Variables from Macromedia Director to C++ Pin
moojuice13-Mar-03 7:24
moojuice13-Mar-03 7:24 
QuestionDoes this code leaks memory? Pin
Joan M11-Mar-03 8:49
professionalJoan M11-Mar-03 8:49 
AnswerRe: Does this code leaks memory? Pin
Tim Smith11-Mar-03 8:56
Tim Smith11-Mar-03 8:56 
GeneralRe: Does this code leaks memory? Pin
Daniel Turini11-Mar-03 9:00
Daniel Turini11-Mar-03 9:00 
GeneralRe: Does this code leaks memory? Pin
Joan M11-Mar-03 20:39
professionalJoan M11-Mar-03 20:39 
GeneralRe: Does this code leaks memory? Pin
Tim Smith11-Mar-03 9:23
Tim Smith11-Mar-03 9:23 
AnswerRe: Does this code leaks memory? Pin
Rob Groves12-Mar-03 10:52
Rob Groves12-Mar-03 10:52 

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.