Click here to Skip to main content
15,913,341 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to auto put string into edit control and press button on web page? [modified] Pin
Nibu babu thomas17-Jun-08 17:17
Nibu babu thomas17-Jun-08 17:17 
GeneralRe: How to auto put string into edit control and press button on web page? Pin
hanlei000000000917-Jun-08 19:30
hanlei000000000917-Jun-08 19:30 
AnswerRe: How to auto put string into edit control and press button on web page? Pin
blackwolf123334-Jul-11 18:53
blackwolf123334-Jul-11 18:53 
QuestionSOLVED Bitmap histogram - size does matter ! [modified] Pin
Vaclav_17-Jun-08 12:40
Vaclav_17-Jun-08 12:40 
AnswerRe: Bitmap histogram - size does matter ! Pin
Mark Salsbery17-Jun-08 13:42
Mark Salsbery17-Jun-08 13:42 
GeneralRe: Bitmap histogram - size does matter ! Pin
Vaclav_17-Jun-08 15:05
Vaclav_17-Jun-08 15:05 
GeneralRe: Bitmap histogram - size does matter ! Pin
Mark Salsbery18-Jun-08 6:03
Mark Salsbery18-Jun-08 6:03 
GeneralRe: Bitmap histogram - size does matter ! Pin
Vaclav_18-Jun-08 7:04
Vaclav_18-Jun-08 7:04 
Mark , thanks for the addendum.

But I spoke too soon. My code still asserts. My bitmaps size is 320 wide and 240 high and it asserts in about half height. I must have screwed up something. It looks like I do not have 24 bit biBitCount.
But right now I have another pressing issue ( babysitting my new grandson!)so this one is temporary on hold. Here is my code in case you want a good laugh.

As always "->" are = -> !
I do not understand why this editor does that to my code! Tired of "fixing it"!

PS. It seems to make no difference if I use casts as you suggested.




RGBQUAD *CurrentRow;


//lpBi->bmiHeader.biBitCount = 32;

LONG stride = (((lpBi->bmiHeader.biWidth * (long)lpBi->bmiHeader.biBitCount + 31L) & (~31L)) / 8L);

if(lpBi->bmiHeader.biBitCount == 24)
CurrentRow = lpBi->bmiColors; // 24bpp pixel data - use RGBQUAD
else
{
//AfxMessageBox("Unsuported bitmap format");
}

CurrentRow = lpBi->bmiColors;

for (int y = 0; y < lpBi->bmiHeader.biHeight; ++y)
{
for (int x = 0; x < lpBi->bmiHeader.biWidth; ++x)
{

iRed = CurrentRow[x].rgbRed;
iGreen = CurrentRow[x].rgbGreen;
iBlue = CurrentRow[x].rgbBlue;

/*


histogram[RED][iRed] += 1;
histogram[GREEN][iGreen] += 1;
histogram[BLUE][iBlue] += 1;

*/

icount++;

}
CurrentRow += stride;
}
GeneralRe: Bitmap histogram - size does matter ! Pin
Mark Salsbery18-Jun-08 10:58
Mark Salsbery18-Jun-08 10:58 
QuestionMFC CListCtrl Memory management Pin
Psyinx17-Jun-08 9:52
Psyinx17-Jun-08 9:52 
QuestionRe: MFC CListCtrl Memory management Pin
David Crow17-Jun-08 10:05
David Crow17-Jun-08 10:05 
AnswerRe: MFC CListCtrl Memory management Pin
Psyinx17-Jun-08 11:42
Psyinx17-Jun-08 11:42 
QuestionRe: MFC CListCtrl Memory management Pin
David Crow17-Jun-08 16:37
David Crow17-Jun-08 16:37 
AnswerRe: MFC CListCtrl Memory management Pin
bonkers12318-Jun-08 1:02
bonkers12318-Jun-08 1:02 
QuestionRe: MFC CListCtrl Memory management Pin
David Crow18-Jun-08 2:26
David Crow18-Jun-08 2:26 
AnswerRe: MFC CListCtrl Memory management Pin
bonkers12318-Jun-08 5:08
bonkers12318-Jun-08 5:08 
GeneralRe: MFC CListCtrl Memory management Pin
David Crow18-Jun-08 5:15
David Crow18-Jun-08 5:15 
GeneralRe: MFC CListCtrl Memory management Pin
bonkers12318-Jun-08 22:23
bonkers12318-Jun-08 22:23 
QuestionHow to get VC++ version installed? Pin
ben217-Jun-08 9:28
ben217-Jun-08 9:28 
AnswerRe: How to get VC++ version installed? Pin
ThatsAlok18-Jun-08 2:51
ThatsAlok18-Jun-08 2:51 
Question"extern inline" in C header file Pin
crewchill17-Jun-08 8:27
crewchill17-Jun-08 8:27 
AnswerRe: "extern inline" in C header file Pin
Joe Woodbury17-Jun-08 15:02
professionalJoe Woodbury17-Jun-08 15:02 
AnswerRe: "extern inline" in C header file Pin
Nibu babu thomas17-Jun-08 17:11
Nibu babu thomas17-Jun-08 17:11 
Questionhow to change the back ground color of Label at runtime Pin
ramnathrn17-Jun-08 8:16
ramnathrn17-Jun-08 8:16 
QuestionRe: how to change the back ground color of Label at runtime Pin
David Crow17-Jun-08 8:51
David Crow17-Jun-08 8:51 

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.