2010-03-15 27 views

回答

0

這個問題並沒有做出很大的意義。我所能想象的是,您正在調用MessageBox API。爲了顯示存儲在資源中的對話框,您需要撥打DialogBoxParam。您的main.cpp如下所示:

#include <windows.h> 
#include "resource.h" // this file is automatically made by the resource editor 

int CALLBACK WinMain(HINSTANCE hInstSelf,HINSTANCE,LPSTR,int) 
{ 
    return DialogBoxParam(hInstSelf,MAKEINTRESOURCE(IDD_DIALOG1),NULL,NULL,0); 
} 

您需要將IDD_DIALOG1與您在資源編輯器中給出對話框的資源ID互換。我離開了DialogProc NULL,但這隻適用於帶有IDCLOSE按鈕的簡單對話框。

相關問題