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

C / C++ / MFC

 
AnswerRe: MFC or Win32? Pin
willempipi2-Feb-03 21:24
willempipi2-Feb-03 21:24 
General.NET runtime environments Pin
Anonymous2-Feb-03 9:48
Anonymous2-Feb-03 9:48 
GeneralRe: .NET runtime environments Pin
Michael Dunn2-Feb-03 10:20
sitebuilderMichael Dunn2-Feb-03 10:20 
GeneralRe: .NET runtime environments Pin
Joaquín M López Muñoz2-Feb-03 10:17
Joaquín M López Muñoz2-Feb-03 10:17 
GeneralOpenGL and VS.NET Pin
Michael A. Barnhart2-Feb-03 9:21
Michael A. Barnhart2-Feb-03 9:21 
GeneralRe: OpenGL and VS.NET Pin
Ben Burnett3-Feb-03 10:41
Ben Burnett3-Feb-03 10:41 
GeneralRe: OpenGL and VS.NET Pin
Michael A. Barnhart3-Feb-03 15:10
Michael A. Barnhart3-Feb-03 15:10 
GeneralDirectDraw Surface with Back Buffer Pin
Compuholic2-Feb-03 9:17
Compuholic2-Feb-03 9:17 
Hi,

i've tried to initialize DirectDraw and to create a Primary Surface with an attached Back Buffer. The initialisation-function fails and I've no idea why. The CreateSurface-Function fails. I've tried to retrieve the error code returned by it but I've found no matching error defined in ddraw.h)

I've removed DDSCL_EXCLUSIVE for debugging purposes. It's hard to debug a program with exclusive access to video memory and input-devices Smile | :)

Thanks for you help.

[code]
BOOL DXGraph::InitGraphicsSystem(HWND hWnd)
{
DDSURFACEDESC2 ddPriSurf;
DDSCAPS2 ddCaps;
BOOL bSuccess = FALSE;

//Globales DirectDraw Objekt erzeugen
if (FAILED(DirectDrawCreateEx(NULL, (LPVOID*)&lpDD7, IID_IDirectDraw7, NULL)))
{
return FALSE;
}

//Kooperationsebene festlegen
if (FAILED(lpDD7->SetCooperativeLevel(hWnd, DDSCL_NORMAL | DDSCL_FULLSCREEN | /*DDSCL_EXCLUSIVE | */DDSCL_ALLOWREBOOT)))
{
lpDD7->Release();
return FALSE;
}

/* if (FAILED(lpDD7->SetDisplayMode(1024, 768, 16, NULL, NULL)))
{
lpDD7->Release();
return FALSE;
}
*/

//Primäre Oberfläche erzeugen
ZeroMemory(&ddPriSurf, sizeof(ddPriSurf));
ddPriSurf.dwSize = sizeof(ddPriSurf);
ddPriSurf.dwFlags = DDSD_CAPS | DDSD_BACKBUFFERCOUNT;
ddPriSurf.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_FLIP | DDSCAPS_COMPLEX;

ddPriSurf.dwBackBufferCount = 1;
if (FAILED(lpDD7->CreateSurface(&ddPriSurf, &lpDDSPrimary, NULL)))
{
lpDD7->Release();
return FALSE;
}

//BackBuffer-Adresse abfragen
ddCaps.dwCaps = DDSCAPS_BACKBUFFER;
if (FAILED(lpDDSPrimary->GetAttachedSurface(&ddCaps, &lpDDSBackBuffer)))
{
lpDDSPrimary->Release();
lpDD7->Release();
return FALSE;
}

return TRUE;
}
[/code]
GeneralRe: DirectDraw Surface with Back Buffer Pin
Paul M Watt2-Feb-03 9:52
mentorPaul M Watt2-Feb-03 9:52 
GeneralRe: DirectDraw Surface with Back Buffer Pin
Compuholic2-Feb-03 10:30
Compuholic2-Feb-03 10:30 
GeneralRe: DirectDraw Surface with Back Buffer Pin
Paul M Watt2-Feb-03 12:36
mentorPaul M Watt2-Feb-03 12:36 
GeneralAuto sorting list control Pin
autekre2-Feb-03 8:41
autekre2-Feb-03 8:41 
Generalbrain-teaser (?) 'cloaked' pointers Pin
Anonymous2-Feb-03 6:59
Anonymous2-Feb-03 6:59 
GeneralRe: brain-teaser (?) 'cloaked' pointers Pin
Joaquín M López Muñoz2-Feb-03 7:09
Joaquín M López Muñoz2-Feb-03 7:09 
GeneralRe: brain-teaser (?) 'cloaked' pointers Pin
Joel Lucsy3-Feb-03 2:43
Joel Lucsy3-Feb-03 2:43 
QuestionComboBox and mousebutton? Pin
Stefan Dahlin2-Feb-03 4:52
Stefan Dahlin2-Feb-03 4:52 
AnswerRe: ComboBox and mousebutton? Pin
Michael Dunn2-Feb-03 6:11
sitebuilderMichael Dunn2-Feb-03 6:11 
GeneralRe: ComboBox and mousebutton? Pin
Stefan Dahlin2-Feb-03 6:20
Stefan Dahlin2-Feb-03 6:20 
AnswerRe: ComboBox and mousebutton? Pin
Gary R. Wheeler2-Feb-03 6:22
Gary R. Wheeler2-Feb-03 6:22 
Generalsplit Wnd Pin
smallcoder2-Feb-03 4:18
smallcoder2-Feb-03 4:18 
QuestionPreSubClassWindow() has no valid font on recreate? Pin
Moak2-Feb-03 2:05
Moak2-Feb-03 2:05 
AnswerRe: PreSubClassWindow() has no valid font on recreate? Pin
Moak3-Feb-03 0:48
Moak3-Feb-03 0:48 
QuestionHow can I load file.x from Listbox? Pin
poomred2-Feb-03 1:43
poomred2-Feb-03 1:43 
AnswerRe: How can I load file.x from Listbox? Pin
Gero Gerber2-Feb-03 2:01
Gero Gerber2-Feb-03 2:01 
AnswerRe: How can I load file.x from Listbox? Pin
Dominik Reichl2-Feb-03 2:39
Dominik Reichl2-Feb-03 2:39 

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.