Commit 6d7e8205 authored by dewyatt's avatar dewyatt

Added Get_IMM method to Window.

Added focus gain/loss events for IMM.
parent 825ef531
...@@ -31,6 +31,7 @@ public: ...@@ -31,6 +31,7 @@ public:
void Hide_Cursor(); void Hide_Cursor();
HWND Get_Handle(); HWND Get_Handle();
IMM &Get_IMM();
private: private:
static const wchar_t *Window_Class_Name; static const wchar_t *Window_Class_Name;
......
...@@ -89,6 +89,11 @@ HWND Window::Get_Handle() ...@@ -89,6 +89,11 @@ HWND Window::Get_Handle()
return my_Handle; return my_Handle;
} }
IMM & Window::Get_IMM()
{
return my_IMM;
}
void Window::Register_Class() void Window::Register_Class()
{ {
WNDCLASSEXW Window_Class = {0}; WNDCLASSEXW Window_Class = {0};
...@@ -285,6 +290,12 @@ LRESULT Window::Handle_Message(HWND Handle, UINT Message, WPARAM wParam, LPARAM ...@@ -285,6 +290,12 @@ LRESULT Window::Handle_Message(HWND Handle, UINT Message, WPARAM wParam, LPARAM
case WM_CHAR: case WM_CHAR:
Call_Listener(On_Char(wParam)); Call_Listener(On_Char(wParam));
break; break;
case WM_SETFOCUS:
my_IMM.Focus_Gained();
break;
case WM_KILLFOCUS:
my_IMM.Focus_Lost();
break;
default: default:
return DefWindowProcW(Handle, Message, wParam, lParam); return DefWindowProcW(Handle, Message, wParam, lParam);
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment