設定ウインドウの作成
Posted: 2012年4月28日(土) 09:37
#include "DxLib.h"
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow )
{
int x, add;
// メニューの追加
AddMenuItem_Name( NULL, "list1" ) ;
AddMenuItem_Name( "list1", "終了" ) ;
AddMenuItem_Name( "list1", "設定" ) ;
ChangeWindowMode( TRUE ) ;
if( DxLib_Init() == -1 ) return -1 ;
SetDrawScreen( DX_SCREEN_BACK ) ;
x = 0;
add = 1;
while( ProcessMessage() == 0 && CheckMenuItemSelect_Name( "終了" ) == 0 )
{
x += add;
if( x > 640 || x < 0 ) add = -add;
ClearDrawScreen() ;
DrawBox( x, 100, x + 3, 103, GetColor( 255,255,255 ), FALSE );
ScreenFlip() ;
}
DxLib_End() ;
return 0 ;
}
やりたいことは
設定ボタンを押すと新しくウインドウが開かれ、そこに文字を入力すると入力した文字が最初に開いたウインドウに表示されるようなプログラムを作りたいのですがどのように作ればいいのでしょうか??