動作環境
C++ Builder XE4
関連
上記の処理において、ウィンドウの最大化をしていると処理が失敗する。
最大化から通常のサイズへ
下記のコードが有効であるようだ。
Unit1.cpp
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
if (this->WindowState == wsMaximized) {
this->WindowState = wsNormal;
}
}
//---------------------------------------------------------------------------