実行すると、ウィンドウモードなら問題なく動作しますが、
フルスクリーンモードだと何も描写されません。
見た感じ描写されないというより、表裏画面の操作がうまくいっていないように感じられます。
なお、Escキーを押すと一瞬だけ描写がなされます。
原因、解決法のほど、よろしくお願いします。
#include "DxLib.h" #include <math.h> #define PI 3.1415 void message_box(){ int flag; flag=MessageBox( NULL , TEXT("フルスクリーンモードで起動しますか?") , TEXT("スクリーン設定") , MB_YESNO | MB_ICONQUESTION ); if(flag==IDNO) ChangeWindowMode( TRUE ); } int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow ) { SetMainWindowText( "サンプル" );//ウィンドウの名前 message_box();//フルスクリーンにするかどうかの関数 char KeyBuf[256]; int sample_img[10]; int e_x; int e_y; int counter=0; if( DxLib_Init() == -1 ) return -1; SetDrawScreen( DX_SCREEN_BACK ); sample_img[0]=LoadGraph("img/icon.png"); sample_img[1]=LoadGraph("img/moya.png"); e_x=640/2; e_y=480/2; while(!ProcessMessage() && !GetHitKeyStateAll( KeyBuf ) && !KeyBuf[KEY_INPUT_ESCAPE]){ ClearDrawScreen(); double enemydy=sin(PI*2/130*(counter%130))*5; DrawGraph(e_x-55,e_y-55+enemydy,sample_img[0],TRUE); DrawRotaGraph(e_x-70 ,e_y,1 , PI*((double)counter*0.1) , sample_img[1] ,TRUE); DrawRotaGraph(e_x+70 ,e_y,1 , -PI*((double)counter*0.1) , sample_img[1] ,TRUE); counter++; ScreenFlip(); } DxLib_End() ; // DXライブラリ使用の終了処理 return 0 ; // ソフトの終了 }