Added Get_IMM method to Window.
authordewyatt
Sun, 04 Jul 2010 06:07:38 -0400
changeset 4742 59b0750575b1
parent 4741 bb189d44af16
child 4743 f25518de3ee5
Added Get_IMM method to Window. Added focus gain/loss events for IMM.
EXCLUDE/GLIMM/include/Window.hpp
EXCLUDE/GLIMM/src/Window.cpp
--- a/EXCLUDE/GLIMM/include/Window.hpp	Wed Jun 30 17:29:20 2010 -0400
+++ b/EXCLUDE/GLIMM/include/Window.hpp	Sun Jul 04 06:07:38 2010 -0400
@@ -31,6 +31,7 @@
 	void Hide_Cursor();
 
 	HWND Get_Handle();
+	IMM &Get_IMM();
 
 private:
 	static const wchar_t *Window_Class_Name;
--- a/EXCLUDE/GLIMM/src/Window.cpp	Wed Jun 30 17:29:20 2010 -0400
+++ b/EXCLUDE/GLIMM/src/Window.cpp	Sun Jul 04 06:07:38 2010 -0400
@@ -89,6 +89,11 @@
 	return my_Handle;
 }
 
+IMM & Window::Get_IMM()
+{
+	return my_IMM;
+}
+
 void Window::Register_Class()
 {
 	WNDCLASSEXW Window_Class = {0};
@@ -285,6 +290,12 @@
 	case WM_CHAR:
 		Call_Listener(On_Char(wParam));
 		break;
+	case WM_SETFOCUS:
+			my_IMM.Focus_Gained();
+		break;
+	case WM_KILLFOCUS:
+			my_IMM.Focus_Lost();
+		break;
 	default:
 		return DefWindowProcW(Handle, Message, wParam, lParam);
 		break;