Autor Beitrag
flowstar
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 123

WinME
D6 Enterprise
BeitragVerfasst: Di 16.12.03 23:39 
Ich hab ei Projekt mit OpenGL und will nun in den Vollbildmodus wechseln, wie mache ich das?
Phobeus
ontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 1280

Linux (FC6), WinXP Pro (Box)
D6 Pers, D7 Pro, FPC 2.x
BeitragVerfasst: Di 16.12.03 23:54 
Es fehlen leider mal wieder die üblichen Angaben wie z.B. ob du VCL, API oder SDL nutzt... daher mal wieder nur eine allgemeine Lösung. Die meisten DGL-Templates haben Lösungen dafür bereits enthalten:

In Vollbild wechseln:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
 ZeroMemory(@dmScreenSettings, SizeOf(dmScreenSettings));
  with dmScreenSettings do begin              // Bildschirm Einstellungen werden festgelegt
    dmSize       := SizeOf(dmScreenSettings);
    dmPelsWidth  := FWidth;                    // Fenster Breite
    dmPelsHeight := FHeight;                   // Fenster Höhe
    dmBitsPerPel := FPixelDepth;               // Farbtiefe (32bit etc)
    dmFields     := DM_PELSWIDTH or DM_PELSHEIGHT or DM_BITSPERPEL;
  end;

  // Bilschirm Modus auf Vollbild setzen
  if (ChangeDisplaySettings(dmScreenSettings, CDS_FULLSCREEN) = DISP_CHANGE_FAILED) then
  begin
    MessageBox(0, 'Konnte Vollbildmodus nicht aktivieren', 'Error', MB_OK or MB_ICONERROR);
    Fullscreen := False;
    Exit
  end;


Vollbild verlassen bzw. die letzte Einstellung wählen:
ausblenden Delphi-Quelltext
1:
ChangeDisplaySettings(devmode(nil^),0);					


Nähre Informationen zu den Funktionen bietet die WinAPI oder PSDK.

Moderiert von user profile iconPeter Lustig: Code- durch Delphi-Tags ersetzt

_________________
"Menschen sterben nicht wenn man sie zu Grabe trägt, sondern wenn sie ihre Träume verlieren..."
flowstar Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 123

WinME
D6 Enterprise
BeitragVerfasst: Mi 17.12.03 00:08 
Ich nuthe die VCL kann aber mit dem Code nichts anfangen
Raphael O.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1596


VS 2013
BeitragVerfasst: Mi 17.12.03 00:21 
wie wärs mal damit den einfach auszuprobieren?