Click here to Skip to main content
15,902,865 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralADPCM format Pin
harrykouk24-Aug-05 0:43
harrykouk24-Aug-05 0:43 
GeneralRe: ADPCM format Pin
David Crow24-Aug-05 4:00
David Crow24-Aug-05 4:00 
Generalprobelms in file reading ,,suggest best method Pin
a_david12324-Aug-05 0:42
a_david12324-Aug-05 0:42 
GeneralRe: probelms in file reading ,,suggest best method Pin
Mukhan24-Aug-05 1:26
Mukhan24-Aug-05 1:26 
GeneralRe: probelms in file reading ,,suggest best method Pin
David Crow24-Aug-05 3:55
David Crow24-Aug-05 3:55 
GeneralRe: probelms in file reading ,,suggest best method Pin
Jose Lamas Rios24-Aug-05 3:50
Jose Lamas Rios24-Aug-05 3:50 
GeneralRe: probelms in file reading ,,suggest best method Pin
David Crow24-Aug-05 3:54
David Crow24-Aug-05 3:54 
Generalmemcmp & bitmaps Pin
dave2k24-Aug-05 0:13
dave2k24-Aug-05 0:13 
i am trying to find an instance of a small bitmap in a screen grab of a window.

so far i have managed to load both bitmaps into two BYTE arrays. I found some code which searches through the bitmaps and uses memcmp to see if the smaller one is present in the larger. the trouble is, i am having trouble with the memcmp function:

memcmp(ScreenBmp[i][tmpY],CardBmp[x], card_line_length )



What should ScreenBmp and CardBmp represent. I have the two bitmaps in BYTE buffer arrays, so how can i get them into the format above. The code i used to get them into these arrays is below:

HANDLE hBitMap = LoadImage(0, "img.bmp", IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE);

BITMAP bitmap;
GetObject(hBitMap,sizeof(BITMAP),&bitmap);
int size = bitmap.bmHeight*bitmap.bmWidth*bitmap.bmBitsPixel/8;
/// cout << bitmap.bmHeight << endl;
BYTE *lpBits = new BYTE[ size ];

GetBitmapBits((HBITMAP)hBitMap,size,lpBits );

//delete []lpBits;

HANDLE hBitMap2 = LoadImage(0, "img2.bmp", IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE);

BITMAP bitmap2;
GetObject(hBitMap2,sizeof(BITMAP),&bitmap2);
int size2 = bitmap2.bmHeight*bitmap2.bmWidth*bitmap2.bmBitsPixel/8;
/// cout << bitmap.bmHeight << endl;
BYTE *lpBits2 = new BYTE[ size2 ];

GetBitmapBits((HBITMAP)hBitMap2,size2,lpBits2 );



cheers!
GeneralRe: memcmp &amp; bitmaps Pin
Anonymous24-Aug-05 3:58
Anonymous24-Aug-05 3:58 
GeneralAdding new column dynamically in CXListCtrl adds progress control and check boxs... Pin
Ravi Sankar S23-Aug-05 23:58
Ravi Sankar S23-Aug-05 23:58 
GeneralAssistance required on Bitmaps Pin
Barm23-Aug-05 23:50
Barm23-Aug-05 23:50 
GeneralRe: Assistance required on Bitmaps Pin
Steve S23-Aug-05 23:54
Steve S23-Aug-05 23:54 
GeneralRe: Assistance required on Bitmaps Pin
Barm24-Aug-05 0:01
Barm24-Aug-05 0:01 
GeneralRe: Assistance required on Bitmaps Pin
Hamed Musavi24-Aug-05 1:19
Hamed Musavi24-Aug-05 1:19 
GeneralRe: Assistance required on Bitmaps Pin
Achim Klein24-Aug-05 8:14
Achim Klein24-Aug-05 8:14 
GeneralCheckBox control problem Pin
Mukhan23-Aug-05 22:43
Mukhan23-Aug-05 22:43 
GeneralRe: CheckBox control problem Pin
Rage23-Aug-05 22:48
professionalRage23-Aug-05 22:48 
GeneralRe: CheckBox control problem Pin
Mukhan23-Aug-05 23:02
Mukhan23-Aug-05 23:02 
GeneralFile Transfer Using UDP Pin
yccheok23-Aug-05 22:17
yccheok23-Aug-05 22:17 
GeneralRe: File Transfer Using UDP Pin
Alexander M.,23-Aug-05 22:37
Alexander M.,23-Aug-05 22:37 
GeneralRe: File Transfer Using UDP Pin
Nemanja Trifunovic24-Aug-05 2:51
Nemanja Trifunovic24-Aug-05 2:51 
GeneralRe: File Transfer Using UDP Pin
yccheok24-Aug-05 15:50
yccheok24-Aug-05 15:50 
Generalautofill script for login box Pin
joshuatree23-Aug-05 21:22
joshuatree23-Aug-05 21:22 
GeneralRe: autofill script for login box Pin
Rage23-Aug-05 22:01
professionalRage23-Aug-05 22:01 
GeneralRe: autofill script for login box Pin
Cedric Moonen23-Aug-05 22:19
Cedric Moonen23-Aug-05 22:19 

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.