掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
VC++/CLIのアイドル処理 (ID:67785)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
Form1だけがアイドルイベントを扱うので良いのであれば、 Form1.h int counter; public: System::Void OnIdle(System::Object^ sender, System::EventArgs^ e) { ++this->counter; } private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { MessageBox::Show(this->counter.ToString()); } XXX.cpp [STAThreadAttribute] int main(array<System::String ^> ^args) { // コントロールが作成される前に、Windows XP ビジュアル効果を有効にします Application::EnableVisualStyles(); Application::SetCompatibleTextRenderingDefault(false); // メイン ウィンドウを作成して、実行します Form1 frm; Application::Idle += gcnew EventHandler(%frm, &Form1::OnIdle); Application::Run(%frm); return 0; } とすれば十分でしょう。
←解決時は質問者本人がここをチェックしてください。
更新する
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.