Click here to Skip to main content
16,011,542 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to: GDI Flicker Free ?? Pin
cleathley6-Nov-02 22:14
cleathley6-Nov-02 22:14 
AnswerRe: How to: GDI Flicker Free ?? Pin
Christian Graus6-Nov-02 22:24
protectorChristian Graus6-Nov-02 22:24 
AnswerRe: How to: GDI Flicker Free ?? Pin
KarstenK7-Nov-02 0:13
mveKarstenK7-Nov-02 0:13 
GeneralIE reuse Pin
rrrado6-Nov-02 22:10
rrrado6-Nov-02 22:10 
GeneralRe: IE reuse Pin
Stephane Rodriguez.6-Nov-02 23:03
Stephane Rodriguez.6-Nov-02 23:03 
GeneralRe: IE reuse Pin
rrrado7-Nov-02 2:29
rrrado7-Nov-02 2:29 
GeneralColor representation Pin
ISIS556-Nov-02 20:08
ISIS556-Nov-02 20:08 
GeneralRe: Color representation Pin
Stephane Rodriguez.6-Nov-02 20:45
Stephane Rodriguez.6-Nov-02 20:45 
Surfaces use bit masking to express how the color components are stored. When you lock a surface in order to access it, you can pass a DDSURFACEDESC structure along and ask it be filled with the color masks, which is done with code like this :
DDSURFACEDESC	ddsd;
ddsd.dwSize = sizeof(ddsd);
ddsd.dwFlags= DDSD_LPSURFACE | DDSD_PIXELFORMAT;
HRESULT hr = pDDSurface->Lock(NULL,&ddsd,DDLOCK_SURFACEMEMORYPTR|DDLOCK_WAIT,NULL);
if (SUCCEEDED(hr))
{

  DWORD redmask = ddsd.ddpfPixelFormat.dwRBitMask;
  ...

  // remember to unlck the surface
  ...
}


Now that you've got the bit masking, you can use logical shifts to break the actual bits into what you want. The point here is to know you can't hardcode the shifts, you must execute code according to the bit masking.

All of this should be obvious to anyone reading the DirectDraw reference doc.


Back to real work : D-23.
GeneralRe: Color representation Pin
Christian Graus6-Nov-02 20:46
protectorChristian Graus6-Nov-02 20:46 
GeneralRe: Color representation Pin
ISIS556-Nov-02 21:04
ISIS556-Nov-02 21:04 
GeneralRe: Color representation Pin
Christian Graus6-Nov-02 21:07
protectorChristian Graus6-Nov-02 21:07 
GeneralPLZ Help me :) Pin
SUPER_PROG6-Nov-02 19:02
SUPER_PROG6-Nov-02 19:02 
GeneralRe: PLZ Help me :) Pin
Christian Graus6-Nov-02 19:28
protectorChristian Graus6-Nov-02 19:28 
GeneralRe: PLZ Help me :) Pin
Stephane Rodriguez.6-Nov-02 19:41
Stephane Rodriguez.6-Nov-02 19:41 
GeneralRe: PLZ Help me :) Pin
Christian Graus6-Nov-02 19:44
protectorChristian Graus6-Nov-02 19:44 
GeneralRe: PLZ Help me :) Pin
Stephane Rodriguez.6-Nov-02 19:51
Stephane Rodriguez.6-Nov-02 19:51 
GeneralRe: PLZ Help me :) Pin
benjymous6-Nov-02 23:21
benjymous6-Nov-02 23:21 
GeneralRe: PLZ Help me :) Pin
Christian Graus6-Nov-02 23:31
protectorChristian Graus6-Nov-02 23:31 
GeneralRe: PLZ Help me :) Pin
benjymous7-Nov-02 0:13
benjymous7-Nov-02 0:13 
GeneralRe: PLZ Help me :) Pin
Roger Allen7-Nov-02 7:19
Roger Allen7-Nov-02 7:19 
GeneralCompletion Port and Multithreads :: MFC Pin
valikac6-Nov-02 18:40
valikac6-Nov-02 18:40 
GeneralRe: Completion Port and Multithreads :: MFC Pin
rrrado6-Nov-02 22:16
rrrado6-Nov-02 22:16 
GeneralRe: Completion Port and Multithreads :: MFC Pin
Daniel Lohmann6-Nov-02 22:52
Daniel Lohmann6-Nov-02 22:52 
GeneralRe: Completion Port and Multithreads :: MFC Pin
valikac7-Nov-02 10:00
valikac7-Nov-02 10:00 
GeneralDereferencing iterators Pin
daniel jurnove6-Nov-02 16:27
sussdaniel jurnove6-Nov-02 16:27 

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.