C++ Fullscreen ? Geht sowas ?
-
gibt es noch andere möglichkeiten ausser den code da oben ?
-
Also willst du quasi die Konsole in den Vollbildmodus bringen? Sicher, dass das überhaupt geht?
-
sollte eigentlich gehen , oder ?
-
Ich habs mal probiert, ich hab keine Ahnung, wie man eine Konsole auf Fullscreen bekommt. Man kann evtl in einen Bildschirmmodus wechseln (wie beim Starten des Rechners), der DOS-like aussieht. (?)
-
ich habe einen Code gefunden der sowas ähnliches macht FUNKTIONIERT ABER NICHT :
#include "Framework.hpp"
bool CFramework::Init (int ScreenWidth, int ScreenHeight,
int ColorDepth, bool bFullscreen)
{if (SDL_Init (SDL_INIT_VIDEO | SDL_INIT_TIMER) == -1 )
{
cout << "SDL konnte nicht initialisiert werden!" << endl;
cout << "Fehlermeldung: " << SDL_GetError () << endl;Quit ();
return (false);
}if (bFullscreen == true)
{
m_pScreen = SDL_SetVideoMode (ScreenWidth, ScreenHeight, ColorDepth,
SDL_HWSURFACE | SDL_DOUBLEBUF |
SDL_FULLSCREEN);
}
else
{
m_pScreen = SDL_SetVideoMode (ScreenWidth, ScreenHeight, ColorDepth,
SDL_HWSURFACE | SDL_DOUBLEBUF);
}if (m_pScreen == NULL)
{
cout << "Videomodus konnte nicht gesetzt werden!" << endl;
cout << "Fehlermeldung: " << SDL_GetError () << endl;Quit ();
return (false);
}m_pKeystate = SDL_GetKeyState (NULL);
return (true);
}
void CFramework::Quit ()
{SDL_Quit ();
}
void CFramework::Update ()
{
g_pTimer->Update ();SDL_PumpEvents ();
}
bool CFramework::KeyDown (int Key_ID)
{return (m_pKeystate[Key_ID] ? true : false);
}
void CFramework::Clear ()
{SDL_FillRect (m_pScreen, NULL,
SDL_MapRGB (m_pScreen->format, 0, 0, 0));}
void CFramework::Flip ()
{SDL_Flip (m_pScreen);
}
framework.hpp :
#ifndef FRAMEWORK_HPP
#define FRAMEWORK_HPP#include <iostream>
#include "Singleton.hpp"
#include "Timer.hpp"using namespace std;
#define g_pFramework CFramework::Get()
class CFramework : public TSingleton<CFramework>
{
public:
bool Init (int ScreenWidth, int ScreenHeight,
int ColorDepth, bool bFullscreen);
void Quit ();
void Update ();
void Clear ();
void Flip ();
bool KeyDown (int Key_ID);
SDL_Surface *GetScreen () {return m_pScreen;}private:
SDL_Surface *m_pScreen;
Uint8 *m_pKeystate;
};#endif
Die haben aber nich gefunzt und ich weiss nicht wie ich die benutzen soll ?
-
Improved Console könnte das für dich erledigen
http://c-plusplus.net/forum/viewtopic-var-t-is-131915.html => http://web56.hermes.server-pool.de/pages/ic.c-plusplus.net/
-
Hmm, ev. geht es gar nicht. :
http://support.microsoft.com/?scid=kb%3Ben-us%3B192190&x=17&y=20Aber anderseits geht bei mir ATM alt+Enter. Also könntest du einfach mal diese Tasten an Windows schicken als Message.
-
wie soll ich eine Tastenkombi als Message an Windows Senden ???
-
-
Bei mir geht Alt+Enter nicht (Win Vista 64).
-
Badestrand schrieb:
Bei mir geht Alt+Enter nicht (Win Vista 64).
Hätte mich ehrlichgesagt auch gewundert.
Habe XP, aber wie gesagt, möglicherweise geht es nicht bei allen. (auch nicht unter XP)
-
Dieser Thread wurde von Moderator/in HumeSikkins aus dem Forum C++ in das Forum DOS und Win32-Konsole verschoben.
Im Zweifelsfall bitte auch folgende Hinweise beachten:
C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?Dieses Posting wurde automatisch erzeugt.