T
Hier mal die Dateien:
WinMain.cpp
//////////////////////////////////////////////////////////////////////////
#include <windows.h>
#include <commctrl.h>
#pragma comment(lib, "comctl32.lib")
#include "resource.h"
//////////////////////////////////////////////////////////////////////////
BOOL CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
//////////////////////////////////////////////////////////////////////////
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
{
HWND hDlg;
MSG msg;
InitCommonControls();
hDlg = CreateDialog(hInstance, MAKEINTRESOURCE(IDD_DIALOG1), NULL, DlgProc);
while(GetMessage(&msg, 0, NULL, NULL))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
BOOL CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch(uMsg)
{
case WM_INITDIALOG:
return TRUE;
case WM_COMMAND:
if(wParam == IDCANCEL)
{
EndDialog(hDlg, 0);
PostQuitMessage(0);
}
return TRUE;
case WM_CLOSE:
EndDialog(hDlg, 0);
PostQuitMessage(0);
return(TRUE);
default:
return FALSE;
}
}
Merkwürdig, im Ressourcenedition ist das Verzeichnis der Manifest in "" gesetzt. ("RT_MANIFEST")
Die Manifestdatei hat die Bezeichnung 1, wie es verlangt ist.