[idd] helper: add simple static widget implementation

This commit is contained in:
Quantum
2025-09-15 03:56:26 -04:00
committed by Geoffrey McRae
parent 042450a708
commit 85e728b59e
7 changed files with 75 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
#include "CWidget.h"
HWND CWidget::createWindowSimple(LPCWSTR cls, LPCWSTR title, DWORD style, HWND parent)
{
return CreateWindow(cls, title, style, 0, 0, 0, 0, parent,
NULL, (HINSTANCE)GetModuleHandle(NULL), NULL);
}
CWidget::~CWidget()
{
destroy();
}
void CWidget::destroy()
{
if (m_hwnd)
{
DestroyWindow(m_hwnd);
m_hwnd = NULL;
}
}