Answer the question
In order to leave comments, you need to log in
Unable to display dialog - CreateDialog = 1406 = ERROR_TLW_WITH_WSCHILD?
Hello.
#pragma comment (lib, "comctl32")
#include <string>
#include <Windows.h>
#include <commctrl.h>
#include "resource.h"
HINSTANCE hInst;
BOOL CALLBACK DlgMain(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch (uMsg)
{
case WM_CLOSE:
{
EndDialog(hwndDlg, 0);
}
return TRUE;
}
return FALSE;
}
int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE, LPWSTR, INT) {
hInst = hInstance;
InitCommonControls();
CreateDialog(hInst, MAKEINTRESOURCE(IDD_DIALOGBAR), 0, DlgMain);
return 0;
}
InitCommonControls();
err = std::to_string(GetLastError());
MessageBoxA(NULL, err.c_str(), "", MB_OK);
CreateDialog(hInst, MAKEINTRESOURCE(IDD_DIALOGBAR), 0, DlgMain);
err = std::to_string(GetLastError());
MessageBoxA(NULL, err.c_str(), "", MB_OK);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question