Click here to Skip to main content
15,894,460 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionmatch the character of a string Pin
vikas choudhry31-Jul-09 0:04
vikas choudhry31-Jul-09 0:04 
AnswerRe: match the character of a string Pin
_AnsHUMAN_ 31-Jul-09 0:20
_AnsHUMAN_ 31-Jul-09 0:20 
GeneralRe: match the character of a string Pin
vikas choudhry31-Jul-09 0:26
vikas choudhry31-Jul-09 0:26 
GeneralRe: match the character of a string Pin
Chandrasekharan P31-Jul-09 0:30
Chandrasekharan P31-Jul-09 0:30 
QuestionRe: match the character of a string Pin
CPallini31-Jul-09 0:23
mveCPallini31-Jul-09 0:23 
QuestionRe: match the character of a string Pin
Chandrasekharan P31-Jul-09 0:25
Chandrasekharan P31-Jul-09 0:25 
AnswerRe: match the character of a string Pin
Rajesh R Subramanian31-Jul-09 0:29
professionalRajesh R Subramanian31-Jul-09 0:29 
AnswerRe: match the character of a string [modified] Pin
Adam Roderick J31-Jul-09 0:40
Adam Roderick J31-Jul-09 0:40 
GeneralRe: match the character of a string Pin
vikas choudhry31-Jul-09 2:48
vikas choudhry31-Jul-09 2:48 
GeneralRe: match the character of a string Pin
Sauce!31-Jul-09 3:57
Sauce!31-Jul-09 3:57 
QuestionConversion of CBitmap into Array of BYTE and Vice Versa Pin
Madhu_Rani30-Jul-09 23:56
Madhu_Rani30-Jul-09 23:56 
AnswerRe: Conversion of CBitmap into Array of BYTE and Vice Versa Pin
Adam Roderick J31-Jul-09 0:12
Adam Roderick J31-Jul-09 0:12 
GeneralRe: Conversion of CBitmap into Array of BYTE and Vice Versa Pin
Madhu_Rani31-Jul-09 0:50
Madhu_Rani31-Jul-09 0:50 
GeneralRe: Conversion of CBitmap into Array of BYTE and Vice Versa Pin
Adam Roderick J31-Jul-09 1:43
Adam Roderick J31-Jul-09 1:43 
GeneralRe: Conversion of CBitmap into Array of BYTE and Vice Versa Pin
Madhu_Rani31-Jul-09 2:11
Madhu_Rani31-Jul-09 2:11 
I tried with the way discussed in the article as well. Using GetBitmapBits and SetBitmapBits[^]

but it does not work.

There is no error but the output is not correct.


see the code below

CDeskTop desktop;

BITMAP bmpX,bmpY;
CBitmap mybmp,bmpClone;
DWORD dwValue,dwValue2;


mybmp.Attach(desktop.GetDeskTopImage());
mybmp.GetBitmap(&bmpX );

bmpClone.LoadBitmap(IDB_BITMAP1); // IDB_BITMAP1 bears the same co-ordinate as the source
int x=bmpX.bmHeight*bmpX.bmWidth;



BYTE* bmpBuffer=NULL;
bmpBuffer=(BYTE*)GlobalAlloc(GMEM_ZEROINIT,bmpX.bmWidth*bmpX.bmHeight);
dwValue=mybmp.GetBitmapBits(bmpX.bmWidth*bmpX.bmHeight,bmpBuffer);


dwValue2 = bmpClone.SetBitmapBits(bmpX.bmWidth*bmpX.bmHeight,bmpBuffer);
bmpClone.GetBitmap(&bmpY);

CDC memDC;
CClientDC dc(this);
memDC.CreateCompatibleDC(&dc);
memDC.SelectObject(&bmpClone );
dc.BitBlt(0, 0, bmpY.bmWidth, bmpY.bmHeight, &memDC, 0, 0,SRCCOPY);
DeleteDC(dc.m_hDC);
GlobalFree((HGLOBAL)bmpBuffer);
QuestionMatlab to C language Pin
Dhinakum30-Jul-09 23:18
Dhinakum30-Jul-09 23:18 
Questionhow to convert power point (.ppt ) to image file such as jpg or bmp fles? Pin
rambojanggoon30-Jul-09 21:41
rambojanggoon30-Jul-09 21:41 
AnswerRe: how to convert power point (.ppt ) to image file such as jpg or bmp fles? Pin
_AnsHUMAN_ 30-Jul-09 21:44
_AnsHUMAN_ 30-Jul-09 21:44 
QuestionHow to convet the Visual C++ codings in to java? Pin
Sakthi.Gs :-)30-Jul-09 21:18
Sakthi.Gs :-)30-Jul-09 21:18 
AnswerRe: How to convet the Visual C++ codings in to java? [modified] Pin
_AnsHUMAN_ 30-Jul-09 21:24
_AnsHUMAN_ 30-Jul-09 21:24 
AnswerRe: How to convet the Visual C++ codings in to java? Pin
Rajesh R Subramanian30-Jul-09 22:15
professionalRajesh R Subramanian30-Jul-09 22:15 
AnswerRe: How to convet the Visual C++ codings in to java? Pin
Dave Doknjas31-Jul-09 12:16
Dave Doknjas31-Jul-09 12:16 
QuestionSDI for GB2312 Pin
aravind.sn30-Jul-09 19:43
aravind.sn30-Jul-09 19:43 
QuestionRe: SDI for GB2312 Pin
Adam Roderick J30-Jul-09 20:02
Adam Roderick J30-Jul-09 20:02 
AnswerRe: SDI for GB2312 Pin
aravind.sn30-Jul-09 22:54
aravind.sn30-Jul-09 22:54 

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.