Click here to Skip to main content
15,898,134 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: SHFileOperation is pissing me off - won't copy just 1 file Pin
Waldermort25-Aug-06 13:12
Waldermort25-Aug-06 13:12 
GeneralRe: SHFileOperation is pissing me off - won't copy just 1 file Pin
AceCoolie26-Aug-06 4:48
AceCoolie26-Aug-06 4:48 
AnswerRe: SHFileOperation is pissing me off - won't copy just 1 file Pin
Justin Tay25-Aug-06 14:00
Justin Tay25-Aug-06 14:00 
GeneralRe: SHFileOperation is pissing me off - won't copy just 1 file Pin
AceCoolie26-Aug-06 4:47
AceCoolie26-Aug-06 4:47 
GeneralRe: SHFileOperation is pissing me off - won't copy just 1 file Pin
Justin Tay26-Aug-06 9:43
Justin Tay26-Aug-06 9:43 
QuestionRe: bitmap to clipboard, OLE Pin
mla15425-Aug-06 11:21
mla15425-Aug-06 11:21 
AnswerRe: bitmap to clipboard, OLE Pin
Dave Calkins25-Aug-06 16:30
Dave Calkins25-Aug-06 16:30 
QuestionRe: bitmap to clipboard, OLE [modified] Pin
mla15429-Aug-06 8:36
mla15429-Aug-06 8:36 
I tried the following:
BOOL CMyFormView::PutDataToClipboard(CBitmap *pBmp)
{
COleDataSource *pods = new COleDataSource;;
HBITMAP hBmp = (HBITMAP) *pBmp;
int i = sizeof(*pBmp);
HANDLE hData = ::GlobalAlloc(GMEM_FIXED, sizeof(*pBmp));
CBitmap* pData = (CBitmap*) ::GlobalLock (hData);
pData = pBmp;
BOOL l = ::GlobalUnlock(hData);
STGMEDIUM stg;
stg.tymed = TYMED_GDI;
stg.hBitmap = hBmp;
stg.pUnkForRelease = NULL;

// Place the data object on the OLE clipboard.
CFormApp* ab = (CFormApp*)AfxGetApp();
pods->CacheData(CF_BITMAP, &stg);
pods->SetClipboard();
//ab->pods->CacheData (CF_BITMAP, &stg);
//ab->pods->SetClipboard ();
delete pods;
return TRUE;
}

I'm unable to paste the bitmap in mspaint (and other places). Any ideas?


-- modified at 15:20 Tuesday 29th August, 2006
QuestionHTML resource file Pin
Demian Panello25-Aug-06 11:21
Demian Panello25-Aug-06 11:21 
AnswerRe: HTML resource file Pin
Gary R. Wheeler25-Aug-06 15:49
Gary R. Wheeler25-Aug-06 15:49 
QuestionProblem with ClearType text in custom control Pin
WarnerYoung25-Aug-06 10:32
WarnerYoung25-Aug-06 10:32 
AnswerRe: Problem with ClearType text in custom control Pin
Waldermort25-Aug-06 13:15
Waldermort25-Aug-06 13:15 
AnswerRe: Problem with ClearType text in custom control Pin
Justin Tay25-Aug-06 14:11
Justin Tay25-Aug-06 14:11 
QuestionBasic concepts Pin
Oliver12325-Aug-06 9:32
Oliver12325-Aug-06 9:32 
AnswerRe: Basic concepts Pin
Zac Howland25-Aug-06 9:54
Zac Howland25-Aug-06 9:54 
AnswerRe: Basic concepts Pin
Chris Losinger25-Aug-06 10:17
professionalChris Losinger25-Aug-06 10:17 
QuestionHowto draw a rotated ellipse with MFC Pin
AnTri25-Aug-06 7:35
AnTri25-Aug-06 7:35 
AnswerRe: Howto draw a rotated ellipse with MFC Pin
Zac Howland25-Aug-06 8:09
Zac Howland25-Aug-06 8:09 
QuestionC/C++ complete reference material Pin
9ine25-Aug-06 6:13
9ine25-Aug-06 6:13 
QuestionRe: C/C++ complete reference material Pin
David Crow25-Aug-06 6:15
David Crow25-Aug-06 6:15 
AnswerRe: C/C++ complete reference material Pin
9ine25-Aug-06 6:20
9ine25-Aug-06 6:20 
AnswerRe: C/C++ complete reference material Pin
Zac Howland25-Aug-06 6:34
Zac Howland25-Aug-06 6:34 
AnswerRe: C/C++ complete reference material Pin
Mike Dimmick25-Aug-06 6:43
Mike Dimmick25-Aug-06 6:43 
GeneralRe: C/C++ complete reference material Pin
Dave Calkins25-Aug-06 16:46
Dave Calkins25-Aug-06 16:46 
QuestionDifferences between embedded and regular VC++ [modified] Pin
JWood25-Aug-06 5:18
JWood25-Aug-06 5:18 

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.