1

ビルドして実行すると、開いた直後に閉じる MFC アプリケーションがあります。アプリケーションをデバッグすると、C:...\MFC\SRC\viewform.cpp から ASSERT がトリガーされます。

ERROR: Dialog with IDD 0x008A must have the child style.

プログラムのデバッグを続けると、ポップアップ エラーが表示さFailed to create empty documentれ、出力ターミナルに次のように表示されます。

Warning: couldn't create client pane for splitter.
Failed to create client pane/view for frame.
Warning: Window creation failed: GetLastError returns 0x00000000
Warning: failed to create CFrameWnd.
Warning: CDocTemplate couldn't create a frame.
The thread 0xFD8 has exited with code 0 (0x0).

これは、継承したばかりのコード プロジェクトであるため、コードに慣れていません。アプリケーションのメイン ダイアログは、4 つのウィンドウを表示する分割ダイアログであると言えます。

しかし、私はこれらのエラーが何を意味するのか困惑しています。誰でも助けることができますか?前もって感謝します。

間違ったクラスが呼び出されていることを示すコールスタック:

CFormView::Create(const char * 0x00000000, const char * 0x00000000, unsigned long 1342177280, const tagRECT & {top=0 bottom=10 left=0 right=10}, CWnd * 0x003d5198 {CSplitterWnd hWnd=0x0006058e}, unsigned int 59648, CCreateContext * 0x0012fa7c) line 69 + 25 bytes
CSplitterWnd::CreateView(int 0, int 0, CRuntimeClass * 0x0049d020 struct CRuntimeClass const CAgentsView::classCAgentsView, tagSIZE {...}, CCreateContext * 0x0012fa7c) line 311 + 48 bytes
4

1 に答える 1

1
ERROR: Dialog with IDD 0x008A must have the child style.

resource.h を調べて、0x008A のダイアログ テンプレート ID を見つけます。リソース ビューで、そのダイアログ テンプレートを開いて編集します。ダイアログを右クリックし、[プロパティ] を選択します。スタイルを子に設定します。

于 2014-08-13T12:40:45.670 に答える