Click here to Skip to main content
15,901,284 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Adding a int array inside CStringArray Pin
CPallini19-Dec-11 1:26
mveCPallini19-Dec-11 1:26 
AnswerRe: Adding a int array inside CStringArray Pin
Richard MacCutchan19-Dec-11 2:12
mveRichard MacCutchan19-Dec-11 2:12 
GeneralRe: Adding a int array inside CStringArray Pin
Albert Holguin19-Dec-11 3:12
professionalAlbert Holguin19-Dec-11 3:12 
GeneralRe: Adding a int array inside CStringArray Pin
Richard MacCutchan19-Dec-11 6:00
mveRichard MacCutchan19-Dec-11 6:00 
QuestionAdapter Classes for using C++ library through JNI Pin
pandit8419-Dec-11 0:26
pandit8419-Dec-11 0:26 
AnswerRe: Adapter Classes for using C++ library through JNI Pin
CPallini19-Dec-11 3:12
mveCPallini19-Dec-11 3:12 
QuestionCWinThread Pin
columbos1492718-Dec-11 22:45
columbos1492718-Dec-11 22:45 
AnswerRe: CWinThread Pin
CPallini18-Dec-11 23:12
mveCPallini18-Dec-11 23:12 
AnswerRe: CWinThread Pin
Albert Holguin19-Dec-11 3:15
professionalAlbert Holguin19-Dec-11 3:15 
QuestionSave As Image Pin
john563218-Dec-11 22:08
john563218-Dec-11 22:08 
AnswerRe: Save As Image Pin
CPallini18-Dec-11 22:18
mveCPallini18-Dec-11 22:18 
GeneralRe: Save As Image Pin
john563218-Dec-11 23:44
john563218-Dec-11 23:44 
GeneralRe: Save As Image Pin
CPallini18-Dec-11 23:51
mveCPallini18-Dec-11 23:51 
GeneralRe: Save As Image Pin
john563219-Dec-11 0:24
john563219-Dec-11 0:24 
GeneralRe: Save As Image Pin
CPallini19-Dec-11 0:33
mveCPallini19-Dec-11 0:33 
Questioncopying from large buffer to smaller Pin
VCProgrammer18-Dec-11 21:21
VCProgrammer18-Dec-11 21:21 
AnswerRe: copying from large buffer to smaller Pin
CPallini18-Dec-11 21:52
mveCPallini18-Dec-11 21:52 
GeneralRe: copying from large buffer to smaller Pin
VCProgrammer19-Dec-11 1:04
VCProgrammer19-Dec-11 1:04 
GeneralRe: copying from large buffer to smaller Pin
CPallini19-Dec-11 1:24
mveCPallini19-Dec-11 1:24 
QuestionThread sync Pin
columbos1492718-Dec-11 3:28
columbos1492718-Dec-11 3:28 
AnswerRe: Thread sync Pin
Chris Losinger18-Dec-11 4:24
professionalChris Losinger18-Dec-11 4:24 
GeneralRe: Thread sync Pin
columbos1492718-Dec-11 4:35
columbos1492718-Dec-11 4:35 
Questionclipboard and file Pin
Member 820281618-Dec-11 0:37
Member 820281618-Dec-11 0:37 
AnswerRe: clipboard and file Pin
Richard MacCutchan18-Dec-11 1:19
mveRichard MacCutchan18-Dec-11 1:19 
GeneralRe: clipboard and file Pin
Member 820281618-Dec-11 1:54
Member 820281618-Dec-11 1:54 
Ok, thank you, actually to put in the clipboard the path is what I want to do, not the content of the file, in other word I want to do the same thing that you do on windows when you select a file and click on copy.

The code:
(filename format 49158)
char path[]="C:\\file.txt";
int size=strlen(path)+1;
hglbDato = GlobalAlloc(GMEM_MOVEABLE,size);
PVOID pv = (PVOID) GlobalLock(hglbDato);
memcpy(pv,path,size);
GlobalUnlock(hglbDato);
SetClipboardData(49158,hglbDato);


and I do the same for format filenameW (49159) but instead to use a char array I use a wchar array and wcslen() instead of strlen(). Obviously the file.txt exists.

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.