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

C / C++ / MFC

 
GeneralRe: Modeless Propertysheet Pin
lisoft27-Dec-04 13:40
lisoft27-Dec-04 13:40 
QuestionHow to display a specifique layer from a photoshop file ? Pin
Dani10000126-Dec-04 15:26
Dani10000126-Dec-04 15:26 
Questionwhat's the unit of the return value of GetTextExtent()? Pin
Fei Xu26-Dec-04 15:14
Fei Xu26-Dec-04 15:14 
QuestionHow to change the button's text color? Pin
chenbuaa26-Dec-04 14:02
chenbuaa26-Dec-04 14:02 
GeneralEnums alignment Pin
TheSharkOfDil26-Dec-04 8:57
sussTheSharkOfDil26-Dec-04 8:57 
GeneralRe: Enums alignment Pin
John R. Shaw26-Dec-04 12:04
John R. Shaw26-Dec-04 12:04 
GeneralProblem with changing color of a pixel in a bitmap! Pin
Dani10000126-Dec-04 7:29
Dani10000126-Dec-04 7:29 
GeneralRe: Problem with changing color of a pixel in a bitmap! Pin
John R. Shaw26-Dec-04 12:35
John R. Shaw26-Dec-04 12:35 
This should work for for 24-bit bitmaps.
DWORD dwBitsPerPixel = bmInfo.bmiHeader.biPlanes * bmInfo.bmiHeader.biBitCount;
DWORD dwByteWidth = (((bmInfo.bmiHeader.biWidth * dwBitsPerPixel + 31) & ~31) >> 3);

DWORD *data, *pLine=lpBits;
RGBTRIPLE color = {0,0,0xFF};
for( y=0; y<bmInfo.bmiHeader.biHeight; ++y, pLine += dwByteWidth )
{
    data = pLine;
    for( x=0; x<bmInfo.bmiHeader.biWidth; ++x, data += sizeof(RGBTRIPLE) )
    {
        *(RGBTRIPLE*)data = color;
    }
}


INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
GeneralRe: Problem with changing color of a pixel in a bitmap! Pin
Dani10000126-Dec-04 15:16
Dani10000126-Dec-04 15:16 
GeneralRe: Problem with changing color of a pixel in a bitmap! Pin
John R. Shaw27-Dec-04 6:04
John R. Shaw27-Dec-04 6:04 
GeneralRe: Problem with changing color of a pixel in a bitmap! Pin
PJ Arends26-Dec-04 22:06
professionalPJ Arends26-Dec-04 22:06 
GeneralRe: Problem with changing color of a pixel in a bitmap! Pin
John R. Shaw27-Dec-04 6:16
John R. Shaw27-Dec-04 6:16 
Generalquestion Pin
gamitech26-Dec-04 6:14
gamitech26-Dec-04 6:14 
GeneralRe: question Pin
Yulianto.26-Dec-04 13:54
Yulianto.26-Dec-04 13:54 
GeneralRe: question Pin
PJ Arends26-Dec-04 22:27
professionalPJ Arends26-Dec-04 22:27 
GeneralReplacing the mmemory allocator for &quot;CoGetMalloc&quot; function Pin
impeham26-Dec-04 5:34
impeham26-Dec-04 5:34 
GeneralHelp in Editing Icon Pin
Azghar Hussain26-Dec-04 4:07
professionalAzghar Hussain26-Dec-04 4:07 
GeneralNeed a fancy name for a 'combined' variable Pin
TrueTom26-Dec-04 2:42
TrueTom26-Dec-04 2:42 
GeneralRe: Need a fancy name for a 'combined' variable Pin
User 665826-Dec-04 7:52
User 665826-Dec-04 7:52 
GeneralRe: Need a fancy name for a 'combined' variable Pin
TrueTom27-Dec-04 1:35
TrueTom27-Dec-04 1:35 
GeneralRe: Need a fancy name for a 'combined' variable Pin
TrueTom27-Dec-04 2:16
TrueTom27-Dec-04 2:16 
Generalupload files Pin
StoreErin26-Dec-04 1:26
StoreErin26-Dec-04 1:26 
GeneralRe: upload files Pin
Neville Franks26-Dec-04 9:56
Neville Franks26-Dec-04 9:56 
GeneralRe: upload files Pin
StoreErin26-Dec-04 13:26
StoreErin26-Dec-04 13:26 
GeneralpictureBox question. Pin
Link260025-Dec-04 22:31
Link260025-Dec-04 22:31 

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.