Click here to Skip to main content
15,914,160 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralClipboard & Lines :: MFC Pin
valikac17-Sep-02 21:12
valikac17-Sep-02 21:12 
GeneralRe: Clipboard & Lines :: MFC Pin
Steve S17-Sep-02 21:24
Steve S17-Sep-02 21:24 
That sounds like a good plan to me!

The data must be in a registered clipboard format, and CF_TEXT (or CF_UNICODETEXT) is probably the one to ask for. This gives you the raw character (or wide character data), and it will have embedded newline or carriage-return/newline pairs as they were placed in by the source of the cut or copy.

You could use a CString and the Find() member, or if not, then something like strchr, wcschr or for portability, _tcschr would help you find the line breaks. If you are happy to modify a copy of the data, strtok (_tcstok) would be easy enough.


Steve S
[This signature space for rent]
GeneralRe: Clipboard & Lines :: MFC Pin
includeh1017-Sep-02 21:23
includeh1017-Sep-02 21:23 
GeneralRe: Clipboard & Lines :: MFC Pin
valikac18-Sep-02 4:37
valikac18-Sep-02 4:37 
Questionwhat is wrong with my thread? help Pin
includeh1017-Sep-02 21:11
includeh1017-Sep-02 21:11 
AnswerRe: what is wrong with my thread? help Pin
valikac17-Sep-02 21:17
valikac17-Sep-02 21:17 
GeneralRe: what is wrong with my thread? help Pin
Steve S17-Sep-02 21:27
Steve S17-Sep-02 21:27 
GeneralRe: what is wrong with my thread? help Pin
includeh1017-Sep-02 21:27
includeh1017-Sep-02 21:27 
GeneralRe: what is wrong with my thread? help Pin
Steve S17-Sep-02 22:02
Steve S17-Sep-02 22:02 
GeneralRe: what is wrong with my thread? help Pin
includeh1017-Sep-02 21:44
includeh1017-Sep-02 21:44 
GeneralRe: what is wrong with my thread? help Pin
valikac18-Sep-02 4:35
valikac18-Sep-02 4:35 
AnswerRe: what is wrong with my thread? help Pin
Stephane Rodriguez.17-Sep-02 22:09
Stephane Rodriguez.17-Sep-02 22:09 
GeneralHelp: ClassWizard error! Pin
Daniel Strigl17-Sep-02 20:38
Daniel Strigl17-Sep-02 20:38 
GeneralRe: Help: ClassWizard error! Pin
Steve S17-Sep-02 21:18
Steve S17-Sep-02 21:18 
GeneralRe: Help: ClassWizard error! Pin
Daniel Strigl17-Sep-02 21:39
Daniel Strigl17-Sep-02 21:39 
GeneralChange the bitmap of a CommandBand button... Pin
Daniel Strigl17-Sep-02 20:00
Daniel Strigl17-Sep-02 20:00 
GeneralUsing ShellExecute to send email Pin
Abin17-Sep-02 18:02
Abin17-Sep-02 18:02 
GeneralRe: Using ShellExecute to send email Pin
Shog917-Sep-02 19:19
sitebuilderShog917-Sep-02 19:19 
GeneralRe: Using ShellExecute to send email Pin
Abin17-Sep-02 20:17
Abin17-Sep-02 20:17 

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.