Click here to Skip to main content
15,895,142 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionDisconnection of Socket Pin
shakumar_2214-Jun-07 23:35
shakumar_2214-Jun-07 23:35 
QuestionRe: Disconnection of Socket Pin
David Crow15-Jun-07 2:31
David Crow15-Jun-07 2:31 
AnswerRe: Disconnection of Socket Pin
Mark Salsbery15-Jun-07 6:53
Mark Salsbery15-Jun-07 6:53 
QuestionHow to show bitmap files in listctrl in icon form~ Pin
Chen-XuNuo14-Jun-07 22:27
Chen-XuNuo14-Jun-07 22:27 
AnswerRe: How to show bitmap files in listctrl in icon form~ Pin
Hamid_RT14-Jun-07 22:31
Hamid_RT14-Jun-07 22:31 
QuestionAlpha channel manipulation: CImage ? Pin
HappyFunBall14-Jun-07 21:54
HappyFunBall14-Jun-07 21:54 
AnswerRe: Alpha channel manipulation: CImage ? Pin
Hamid_RT14-Jun-07 22:27
Hamid_RT14-Jun-07 22:27 
AnswerRe: Alpha channel manipulation: CImage ? Pin
Mark Salsbery15-Jun-07 7:02
Mark Salsbery15-Jun-07 7:02 
HappyFunBall wrote:
but how do I change the bits in it?


The CImage::GetPitch() and CImage::GetBits() methods provide direct access to the image's pixel
data.

CImage::GetBits() gets you a pointer to the image pixel data.

CImage::GetPitch() is the bytes-per-row, and if it's negative, CImage::GetBits() returns a pointer
to the LAST row of the image, so you can use the signed value returned by CImage::GetPitch()
to iterate through the rows of pixel data.

The layout of the pixel data varies depending on the format of the bitmap.
For a 32bit-per-pixel ARGB image, the pixel data bytes are layed out RGBARGBARGBA... so if you
take each pixel as a DWORD, the high order byte is the alpha channel byte.

Hope this helped!
Mark


"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder

QuestionMenu Problem again Pin
Karismatic14-Jun-07 21:23
Karismatic14-Jun-07 21:23 
AnswerRe: Menu Problem again Pin
Hamid_RT14-Jun-07 21:52
Hamid_RT14-Jun-07 21:52 
GeneralRe: Menu Problem again Pin
Karismatic14-Jun-07 22:52
Karismatic14-Jun-07 22:52 
GeneralRe: Menu Problem again Pin
Hamid_RT14-Jun-07 23:03
Hamid_RT14-Jun-07 23:03 
GeneralRe: Menu Problem again Pin
Karismatic14-Jun-07 23:14
Karismatic14-Jun-07 23:14 
GeneralRe: Menu Problem again Pin
Roger Allen15-Jun-07 16:04
Roger Allen15-Jun-07 16:04 
QuestionPost messages to theApp Pin
kcynic14-Jun-07 20:34
kcynic14-Jun-07 20:34 
AnswerRe: Post messages to theApp Pin
CPallini14-Jun-07 21:45
mveCPallini14-Jun-07 21:45 
GeneralRe: Post messages to theApp Pin
kcynic14-Jun-07 22:38
kcynic14-Jun-07 22:38 
GeneralRe: Post messages to theApp Pin
CPallini14-Jun-07 22:43
mveCPallini14-Jun-07 22:43 
GeneralRe: Post messages to theApp Pin
kcynic15-Jun-07 0:53
kcynic15-Jun-07 0:53 
QuestionQuestion about a global mouse hook?? Pin
Avril-Sun14-Jun-07 19:31
Avril-Sun14-Jun-07 19:31 
AnswerRe: Question about a global mouse hook?? Pin
Sarath C14-Jun-07 20:22
Sarath C14-Jun-07 20:22 
AnswerRe: Question about a global mouse hook?? Pin
Hamid_RT14-Jun-07 22:35
Hamid_RT14-Jun-07 22:35 
QuestionHow to close the running appliaction Pin
john563214-Jun-07 19:26
john563214-Jun-07 19:26 
AnswerRe: How to close the running appliaction Pin
Hamid_RT14-Jun-07 19:33
Hamid_RT14-Jun-07 19:33 
GeneralRe: How to close the running appliaction Pin
john563214-Jun-07 19:34
john563214-Jun-07 19:34 

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.