Click here to Skip to main content
15,921,941 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Another Design question/comment Pin
Dave Bryant1-Apr-03 9:13
Dave Bryant1-Apr-03 9:13 
GeneralRe: Another Design question/comment Pin
Maximilien1-Apr-03 9:39
Maximilien1-Apr-03 9:39 
QuestionAdd more functions for ListBox control? Pin
chen1-Apr-03 2:51
chen1-Apr-03 2:51 
AnswerRe: Add more functions for ListBox control? Pin
Dave Bryant1-Apr-03 9:07
Dave Bryant1-Apr-03 9:07 
QuestionHow to prevent IE from caching files Pin
sanskypotov1-Apr-03 2:37
sanskypotov1-Apr-03 2:37 
GeneralCollection Classes Needed Pin
#realJSOP1-Apr-03 2:35
professional#realJSOP1-Apr-03 2:35 
GeneralRe: Collection Classes Needed Pin
jhwurmbach1-Apr-03 2:55
jhwurmbach1-Apr-03 2:55 
GeneralRe: Collection Classes Needed Pin
#realJSOP1-Apr-03 3:06
professional#realJSOP1-Apr-03 3:06 
GeneralRe: Collection Classes Needed Pin
#realJSOP1-Apr-03 4:10
professional#realJSOP1-Apr-03 4:10 
GeneralRe: Collection Classes Needed Pin
User 98851-Apr-03 6:53
User 98851-Apr-03 6:53 
GeneralRe: Collection Classes Needed Pin
#realJSOP1-Apr-03 9:03
professional#realJSOP1-Apr-03 9:03 
GeneralRe: Collection Classes Needed Pin
Michael Dunn1-Apr-03 9:32
sitebuilderMichael Dunn1-Apr-03 9:32 
QuestionHow to make a fullscreen window in SDI or Dialogbased application Pin
u990105@giki.edu.pk1-Apr-03 2:28
u990105@giki.edu.pk1-Apr-03 2:28 
AnswerRe: How to make a fullscreen window in SDI or Dialogbased application Pin
Joan M1-Apr-03 2:35
professionalJoan M1-Apr-03 2:35 
GeneralEasy and fast way of detecting if Outlook is installed Pin
Braulio Dez1-Apr-03 2:12
Braulio Dez1-Apr-03 2:12 
GeneralRe: Easy and fast way of detecting if Outlook is installed Pin
Daniel Strigl1-Apr-03 2:58
Daniel Strigl1-Apr-03 2:58 
General(Previously) undocumented Win32 APIs Pin
Ravi Bhavnani1-Apr-03 2:02
professionalRavi Bhavnani1-Apr-03 2:02 
GeneralRe: (Previously) undocumented Win32 APIs Pin
User 98851-Apr-03 6:55
User 98851-Apr-03 6:55 
GeneralRe: (Previously) undocumented Win32 APIs Pin
Ryan Binns1-Apr-03 12:56
Ryan Binns1-Apr-03 12:56 
GeneralTraduce from binary to decimal Pin
calgonit1-Apr-03 2:00
calgonit1-Apr-03 2:00 
GeneralHebrew and ResourceView on VC6 Pin
JolyGod1-Apr-03 1:21
JolyGod1-Apr-03 1:21 
GeneralDirectDraw question : about Overlay Pin
Raphael Kindt1-Apr-03 1:18
Raphael Kindt1-Apr-03 1:18 
GeneralRe: DirectDraw question : about Overlay Pin
Daniel Strigl1-Apr-03 2:46
Daniel Strigl1-Apr-03 2:46 
GeneralRe: DirectDraw question : about Overlay Pin
Raphael Kindt1-Apr-03 4:19
Raphael Kindt1-Apr-03 4:19 
Yes I can.... Smile | :)
It's a little big but here is:
Note that I work in windowed mode (not Fullscreen)...
CString str_err = "";
HRESULT ddrval = DD_OK;
DDSURFACEDESC2 ddsd;
int i = 0;

DDPIXELFORMAT ddpf = { sizeof(DDPIXELFORMAT), DDPF_RGB | DDPF_PALETTEINDEXED8,
    0, 8, 0xFF, 0xFF, 0xFF, 0}; // 8-bit B&W

// The overlay surface
//--------------------

// Try Overlay with double buffered complex overlay surface
ZeroMemory(&ddsd, sizeof(ddsd));
ddsd.dwSize = sizeof(ddsd);

ddsd.ddsCaps.dwCaps     = DDSCAPS_OVERLAY | DDSCAPS_FLIP | DDSCAPS_COMPLEX | DDSCAPS_VIDEOMEMORY;
ddsd.dwFlags            = DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH | DDSD_BACKBUFFERCOUNT | DDSD_PIXELFORMAT;
ddsd.dwWidth            = MAX_DST_OV_WIDTH;
ddsd.dwHeight           = MAX_DST_OV_HEIGHT;
ddsd.dwBackBufferCount  = 1;
ddsd.ddpfPixelFormat    = ddpf;

ddrval = lpDD->CreateSurface(&ddsd, &lpDDS_POVideo, NULL);
if(FAILED(ddrval))
{
    str_err.Format("We couldn't create an overlay flippable surface? Code error %.8xh", ddrval);
    MessageBox(str_err);
    return FALSE;
}

// Get a pointer to the backbuffer that we will later draw to
DDSCAPS2 caps;
caps.dwCaps = DDSCAPS_BACKBUFFER;
caps.dwCaps2 = caps.dwCaps3 = caps.dwCaps4 = 0;
ddrval = lpDDS_POVideo->GetAttachedSurface(&caps, &lpDDS_BOVideo);
if( FAILED(ddrval) )
{
    str_err.Format("lpDDS_POVideo->GetAttachedSurface failed with code %.8xh", ddrval);
    MessageBox(str_err);
    return FALSE;
}


I suppose that's OK... But the 8 BPP pixel format always failed...
I hope that it's what you want.

Hello World!!! Smile | :)
from Raphaël
QuestionHow to maximize a child window in a MDI project Pin
uNsignedINT31-Mar-03 23:23
uNsignedINT31-Mar-03 23:23 

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.