[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,15 @@
#include "CStaticWidget.h"
#include <commctrl.h>
#include <CDebug.h>
CStaticWidget::CStaticWidget(LPCWSTR title, DWORD style, HWND parent)
{
m_hwnd = createWindowSimple(WC_STATIC, title, style, parent);
if (!m_hwnd)
DEBUG_ERROR_HR(GetLastError(), "Failed to create static widget");
}
void CStaticWidget::setText(LPCWSTR text)
{
SetWindowText(m_hwnd, text);
}