Click here to Skip to main content
15,900,378 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generaledit boxs in userdrawn list box control Pin
Chanda.com26-Aug-03 2:16
Chanda.com26-Aug-03 2:16 
QuestionIs is possible to make TransparentBlt without flickering ? Pin
vgrigor26-Aug-03 2:11
vgrigor26-Aug-03 2:11 
AnswerRe: Is is possible to make TransparentBlt without flickering ? Pin
roel_26-Aug-03 3:57
roel_26-Aug-03 3:57 
GeneralRe: Is is possible to make TransparentBlt without flickering ? Pin
vgrigor26-Aug-03 4:42
vgrigor26-Aug-03 4:42 
GeneralRe: Is is possible to make TransparentBlt without flickering ? Pin
l a u r e n26-Aug-03 14:20
l a u r e n26-Aug-03 14:20 
GeneralHelp Saving a drawing piece by piece in XML Pin
lxxrya00126-Aug-03 1:40
lxxrya00126-Aug-03 1:40 
GeneralRe: Help Saving a drawing piece by piece in XML Pin
roel_26-Aug-03 4:00
roel_26-Aug-03 4:00 
QuestionWhat is order of colors in bitmap pixel array? Pin
vgrigor26-Aug-03 1:03
vgrigor26-Aug-03 1:03 
I created red bimap,(0000FF)
get it's pixels by following code,

but method showes pixels is blue (FF0000):

How order of colors and bytes myst be read to make getting color
and place of pixel correct?



<br />
         BITMAP     bm ;<br />
           DWORD* pBits;<br />
<br />
        GetObject(hBitmap, sizeof(BITMAP), &bm);<br />
<br />
           pBits= new DWORD[bm.bmHeight*bm.bmWidth];<br />
        <br />
        memset(pBits, bm.bmHeight*bm.bmWidth ,0);<br />
<br />
<br />
       GetBitmapBits(  hBitmap,  (bm.bmHeight*bm.bmWidth*4), pBits );<br />
<br />
        COLORREF* pCr;<br />
        int bt_cr = bm.bmBitsPixel/8; //bytes per color        <br />
<br />
<br />
        for(int h =0; h < bm.bmHeight; h++)<br />
        for(int w =0; w < bm.bmWidth; w++)<br />
        {<br />
<br />
<br />
            pCr = (COLORREF*) & ((BYTE*)/*bm.bmBits*/pBits)[ w* bt_cr + h*bm.bmWidthBytes ];<br />
                            // =FF0000<br />
<br />
               <br />
            BYTE pureR,pureG,pureB;<br />
            pureR =GetRValue(*pCr); // =0 - result<br />
            pureG =GetGValue(*pCr); // =0<br />
            pureB =GetBValue(*pCr); // =255<br />
<br />

AnswerRe: What is order of colors in bitmap pixel array? Pin
Babayan Hovhannes26-Aug-03 2:06
Babayan Hovhannes26-Aug-03 2:06 
GeneralRe: What is order of colors in bitmap pixel array? Pin
vgrigor26-Aug-03 2:12
vgrigor26-Aug-03 2:12 
GeneralRe: What is order of colors in bitmap pixel array? Pin
Babayan Hovhannes26-Aug-03 2:45
Babayan Hovhannes26-Aug-03 2:45 
GeneralRe: What is order of colors in bitmap pixel array? Pin
roel_26-Aug-03 3:59
roel_26-Aug-03 3:59 
GeneralRe: What is order of colors in bitmap pixel array? Pin
vgrigor26-Aug-03 5:04
vgrigor26-Aug-03 5:04 
GeneralRe: What is order of colors in bitmap pixel array? Pin
roel_26-Aug-03 6:12
roel_26-Aug-03 6:12 
GeneralSimple questions for the experts Pin
NewHSKid26-Aug-03 1:00
NewHSKid26-Aug-03 1:00 
GeneralRe: Simple questions for the experts Pin
Babayan Hovhannes26-Aug-03 1:05
Babayan Hovhannes26-Aug-03 1:05 
GeneralRe: Simple questions for the experts Pin
NewHSKid26-Aug-03 1:19
NewHSKid26-Aug-03 1:19 
GeneralRe: Simple questions for the experts Pin
Babayan Hovhannes26-Aug-03 2:37
Babayan Hovhannes26-Aug-03 2:37 
GeneralRe: Simple questions for the experts Pin
Bob Stanneveld26-Aug-03 5:43
Bob Stanneveld26-Aug-03 5:43 
GeneralProblem using Pred to sort a List of _bstr_t using STL Pin
Braulio Dez26-Aug-03 0:52
Braulio Dez26-Aug-03 0:52 
GeneralRe: Problem using Pred to sort a List of _bstr_t using STL Pin
Johnny ²26-Aug-03 1:07
Johnny ²26-Aug-03 1:07 
GeneralRe: Problem using Pred to sort a List of _bstr_t using STL Pin
Braulio Dez26-Aug-03 1:19
Braulio Dez26-Aug-03 1:19 
GeneralRe: Problem using Pred to sort a List of _bstr_t using STL Pin
ZoogieZork26-Aug-03 2:46
ZoogieZork26-Aug-03 2:46 
GeneralRe: Problem using Pred to sort a List of _bstr_t using STL Pin
Nemanja Trifunovic26-Aug-03 5:15
Nemanja Trifunovic26-Aug-03 5:15 
QuestionHow to rename the &quot;OK&quot; and &quot;Cancel&quot; in a property sheet Pin
julych26-Aug-03 0:17
julych26-Aug-03 0:17 

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.