diff dwt/widgets/Display.d @ 36:ceb20ad6c0f8

Scrollable
author Frank Benoit <benoit@tionex.de>
date Tue, 29 Jan 2008 00:52:45 +0100
parents 99d8b02576c3
children e3a5d61b33cd
line wrap: on
line diff
--- a/dwt/widgets/Display.d	Tue Jan 29 00:16:12 2008 +0100
+++ b/dwt/widgets/Display.d	Tue Jan 29 00:52:45 2008 +0100
@@ -185,7 +185,7 @@
     //Callback windowCallback;
     //int windowProc_;
     int threadId;
-    TCHAR* windowClass, windowShadowClass;
+    TCHAR* windowClass_, windowShadowClass;
     static int WindowClassCount;
     static const char[] WindowName = "SWT_Window"; //$NON-NLS-1$
     static const char[] WindowShadowName = "SWT_WindowShadow"; //$NON-NLS-1$
@@ -2005,7 +2005,7 @@
     if (embeddedHwnd is null) {
         auto hInstance = OS.GetModuleHandle (null);
         embeddedHwnd = OS.CreateWindowEx (0,
-            windowClass,
+            windowClass_,
             null,
             OS.WS_OVERLAPPED,
             0, 0, 0, 0,
@@ -2502,7 +2502,7 @@
     threadId = OS.GetCurrentThreadId ();
 
     /* Use the character encoding for the default locale */
-    windowClass = StrToTCHARz ( WindowName ~ to!(char[])(WindowClassCount));
+    windowClass_ = StrToTCHARz ( WindowName ~ to!(char[])(WindowClassCount));
     windowShadowClass = StrToTCHARz ( WindowShadowName ~ to!(char[])(WindowClassCount));
     WindowClassCount++;
 
@@ -2514,10 +2514,10 @@
     lpWndClass.lpfnWndProc = &windowProcFunc;
     lpWndClass.style = OS.CS_BYTEALIGNWINDOW | OS.CS_DBLCLKS;
     lpWndClass.hCursor = OS.LoadCursor (null, cast(wchar*)OS.IDC_ARROW);
-    int len = strlenz( windowClass );
+    int len = strlenz( windowClass_ );
     int byteCount = len * TCHAR.sizeof;
     lpWndClass.lpszClassName = cast(wchar*) OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
-    lpWndClass.lpszClassName[ 0 .. len ] = windowClass[ 0 .. len ];
+    lpWndClass.lpszClassName[ 0 .. len ] = windowClass_[ 0 .. len ];
     OS.RegisterClass (&lpWndClass);
     OS.HeapFree (hHeap, 0, lpWndClass.lpszClassName);
 
@@ -2532,7 +2532,7 @@
 
     /* Create the message only HWND */
     hwndMessage = OS.CreateWindowEx (0,
-        windowClass,
+        windowClass_,
         null,
         OS.WS_OVERLAPPED,
         0, 0, 0, 0,
@@ -3505,11 +3505,11 @@
     /* Unregister the DWT window class */
     auto hHeap = OS.GetProcessHeap ();
     auto hInstance = OS.GetModuleHandle (null);
-    OS.UnregisterClass (windowClass, hInstance);
+    OS.UnregisterClass (windowClass_, hInstance);
 
     /* Unregister the DWT drop shadow window class */
     OS.UnregisterClass (windowShadowClass, hInstance);
-    windowClass = windowShadowClass = null;
+    windowClass_ = windowShadowClass = null;
     //windowCallback.dispose ();
     //windowCallback = null;
     //windowProc_ = 0;
@@ -4530,4 +4530,8 @@
     return result.toString ();
 }
 
+char[] windowClass(){
+    return TCHARzToStr( windowClass_ );
 }
+
+}