diff options
Diffstat (limited to 'alf/alf.cpp')
| -rw-r--r-- | alf/alf.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/alf/alf.cpp b/alf/alf.cpp index 7c0fa2a..0ab1901 100644 --- a/alf/alf.cpp +++ b/alf/alf.cpp @@ -442,7 +442,7 @@ ALF_ShouldMessageBubble(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) || msg == WM_MEASUREITEM || msg == WM_DRAWITEM || msg == WM_CTLCOLORBTN || msg == WM_CTLCOLOREDIT || msg == WM_CTLCOLORLISTBOX || msg == WM_CTLCOLORSCROLLBAR - || msg == WM_CTLCOLORSTATIC; + || msg == WM_CTLCOLORSTATIC || msg == ALF_WM_SETFOCUS; } void @@ -503,3 +503,12 @@ ALF_SetTextColor(HWND win, ALFColor color) { SendMessage(win, ALF_WM_SETTEXTCOLOR, 0, (LPARAM)color); } + +void +ALF_SetFocus(HWND target) +{ + if (GetWindowStyle(target) & WS_CHILD) + PostMessage(GetParent(target), ALF_WM_SETFOCUS, 0, (LPARAM)target); + else + PostMessage(target, ALF_WM_SETFOCUS, 0, (LPARAM)target); +} |
