#include UINT AddStyle(HWND hwnd, UINT style) { UINT oldstyle = GetWindowLong(hwnd, GWL_STYLE); SetWindowLong(hwnd, GWL_STYLE, oldstyle | style); return oldstyle; } UINT AddDlgItemStyle(HWND hwnd, UINT nCtrlId, UINT style) { return SetStyle(GetDlgItem(hwnd, nCtrlId), style); } UINT DelStyle(HWND hwnd, UINT style) { UINT oldstyle = GetWindowLong(hwnd, GWL_STYLE); SetWindowLong(hwnd, GWL_STYLE, oldstyle & ~style); return oldstyle; } UINT DelDlgItemStyle(HWND hwnd, UINT nCtrlId, UINT style) { return DelStyle(GetDlgItem(hwnd, nCtrlId), style); }