Changeset 40
- Timestamp:
- 08/20/04 01:01:57 (4 years ago)
- Files:
-
- trunk/src/SConstruct (modified) (3 diffs)
- trunk/src/dwt/events/armevent.d (modified) (2 diffs)
- trunk/src/dwt/events/helplistener.d (modified) (2 diffs)
- trunk/src/dwt/events/mouselistener.d (modified) (2 diffs)
- trunk/src/dwt/events/verifyevent.d (modified) (2 diffs)
- trunk/src/dwt/graphics/cursor.d (modified) (7 diffs)
- trunk/src/dwt/internal/win32/func.d (modified) (24 diffs)
- trunk/src/dwt/internal/win32/os.d (modified) (14 diffs)
- trunk/src/dwt/internal/win32/types.d (modified) (5 diffs)
- trunk/src/dwt/util/runnable.d (modified) (3 diffs)
- trunk/src/dwt/widgets/caret.d (modified) (1 diff)
- trunk/src/dwt/widgets/composite.d (modified) (2 diffs)
- trunk/src/dwt/widgets/control.d (modified) (9 diffs)
- trunk/src/dwt/widgets/decorations.d (modified) (2 diffs)
- trunk/src/dwt/widgets/display.d (modified) (112 diffs)
- trunk/src/dwt/widgets/menu.d (modified) (4 diffs)
- trunk/src/dwt/widgets/menuitem.d (modified) (2 diffs)
- trunk/src/dwt/widgets/shell.d (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/SConstruct
r36 r40 7 7 8 8 SRC = ( 9 glob('dwt/*.d') + 9 glob('dwt/*.d') + 10 10 glob('dwt/accessibility/*.d') + 11 11 glob('dwt/internal/win32/*.d') + … … 13 13 glob('dwt/util/*.d') + 14 14 glob('dwt/graphics/*.d') + 15 glob('dwt/widgets/*.d') 15 glob('dwt/events/*.d') + 16 glob('dwt/widgets/*.d') 16 17 ) 17 18 … … 19 20 20 21 if 'win32' in sys.platform: 22 env.Append(LIBS=['gdi32', 'imm32', 'msimg32', 'Advapi32', 'comctl32']) 21 23 env.Append(DVERSIONS=['Win32','Unicode']) 24 #env.Append(DLINKFLAGS='-L/exet:nt/su:windows:4.0') 22 25 SRC += glob('dwt/*/win32/*.d') # ooo 23 26 24 27 25 28 elif 'linux' in sys.platform: 26 env.Append(DVERSIONS=['unix', 'linux']) 29 env.Append(DVERSIONS=['unix', 'linux']) 27 30 SRC += glob('dwt/*/gtk/*.d') 28 31 29 env.Program( SRC)32 env.Program('HelloDWT', SRC) trunk/src/dwt/events/armevent.d
r38 r40 12 12 13 13 private import dwt.events.typedevent; 14 private import dwt.widgets.event; 14 15 15 16 /** … … 22 23 public final class ArmEvent : TypedEvent { 23 24 24 private import dwt.widgets.event;25 25 26 26 /** trunk/src/dwt/events/helplistener.d
r38 r40 12 12 13 13 private import dwt.internal.dwteventlistener; 14 private import dwt.events.helpevent; 14 15 15 16 /** … … 30 31 public interface HelpListener : DWTEventListener { 31 32 32 private import dwt.events.helpevent;33 33 34 34 /** trunk/src/dwt/events/mouselistener.d
r38 r40 11 11 module dwt.events.mouselistener; 12 12 13 private import dwt.internal.dwteventlistener; 13 private { 14 import dwt.internal.dwteventlistener; 15 import dwt.events.mouseevent; 16 } 14 17 15 18 /** … … 30 33 */ 31 34 public interface MouseListener : DWTEventListener { 32 33 private import dwt.events.mouseevent;34 35 35 36 /** trunk/src/dwt/events/verifyevent.d
r38 r40 12 12 13 13 private import dwt.events.keyevent; 14 private import dwt.widgets.event; 15 private import dwt.util.util; 14 16 15 17 /** … … 20 22 */ 21 23 public final class VerifyEvent : KeyEvent { 22 23 private import dwt.widgets.event;24 private import dwt.util.util;25 24 26 25 /** trunk/src/dwt/graphics/cursor.d
r33 r40 66 66 private import dwt.internal.win32.os; 67 67 private import dwt.internal.win32.types; 68 68 69 69 /** 70 70 * the handle to the OS cursor resource … … 205 205 * @see SWT#CURSOR_HAND 206 206 */ 207 207 208 public this(Device device, int style) { 208 209 if (device == null) device = Device.getDevice(); … … 247 248 int hInst = OS.GetModuleHandle(null); 248 249 if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); 249 handle = OS.CreateCursor(hInst, 5, 0, 32, 32, &HAND_SOURCE, &HAND_MASK);250 handle = OS.CreateCursor(hInst, 5, 0, 32, 32, HAND_SOURCE, HAND_MASK); 250 251 251 252 } … … 313 314 int hInst = OS.GetModuleHandle(null); 314 315 if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); 315 handle = OS.CreateCursor(hInst, hotspotX, hotspotY, source.width, source.height, &source.data, &mask.data);316 handle = OS.CreateCursor(hInst, hotspotX, hotspotY, source.width, source.height, source.data, mask.data); 316 317 if (handle == 0) DWT.error(DWT.ERROR_NO_HANDLES); 317 318 if (device.tracking) device.new_Object(this); … … 346 347 */ 347 348 public this(Device device, ImageData source, int hotspotX, int hotspotY) { 348 if (device == null) device = Device.getDevice();349 /+if (device == null) device = Device.getDevice(); 349 350 if (device == null) DWT.error(DWT.ERROR_NULL_ARGUMENT); 350 351 this.device = device; … … 360 361 int hMask = result[1]; 361 362 /* Create the icon */ 363 +/ 362 364 ICONINFO info; 363 365 info.fIcon = true; 364 info.hbmColor = hBitmap;366 /+info.hbmColor = hBitmap; 365 367 info.hbmMask = hMask; 366 368 handle = OS.CreateIconIndirect(&info); … … 369 371 OS.DeleteObject(hMask); 370 372 isIcon = true; 371 if (device.tracking) device.new_Object(this); 373 if (device.tracking) device.new_Object(this);+/ 372 374 } 373 375 trunk/src/dwt/internal/win32/func.d
r38 r40 45 45 46 46 int CreateCompatibleDC (int hdc); 47 int CreateCursor (int hInst, int xHotSpot, int yHotSpot, int nWidth, int nHeight, byte []* pvANDPlane, byte[]* pvXORPlane);47 int CreateCursor (int hInst, int xHotSpot, int yHotSpot, int nWidth, int nHeight, byte* pvANDPlane, byte* pvXORPlane); 48 48 int CreateDCW (wchar* lpszDriver, wchar* lpszDevice, int lpszOutput, int lpInitData); 49 49 int CreateDCA (char* lpszDriver, char* lpszDevice, int lpszOutput, int lpInitData); … … 53 53 int CreateIconIndirect (ICONINFO* lplf); 54 54 int CreateMenu (); 55 int CreatePalette (byte []logPalette);55 int CreatePalette (byte* logPalette); 56 56 int CreatePatternBrush (int colorRef); 57 57 int CreatePen (int fnPenStyle, int nWidth, int crColor); 58 int CreatePolygonRgn(int []lppt, int cPoints, int fnPolyFillMode);58 int CreatePolygonRgn(int* lppt, int cPoints, int fnPolyFillMode); 59 59 int CreatePopupMenu (); 60 60 int CreateRectRgn (int left, int top, int right, int bottom); 61 61 int CreateSolidBrush (int colorRef); 62 int CreateStreamOnHGlobal(int hGlobal, BOOL fDeleteOnRelease, int []ppstm);62 int CreateStreamOnHGlobal(int hGlobal, BOOL fDeleteOnRelease, int* ppstm); 63 63 int CreateWindowExW (int dwExStyle, wchar* lpClassName, wchar* lpWindowName, int dwStyle, int X, int Y, int nWidth, int nHeight, int hWndParent, int hMenu, int hInstance, CREATESTRUCT* lpParam); 64 64 int CreateWindowExA (int dwExStyle, char* lpClassName, char* lpWindowName, int dwStyle, int X, int Y, int nWidth, int nHeight, int hWndParent, int hMenu, int hInstance, CREATESTRUCT* lpParam); … … 113 113 int ExpandEnvironmentStringsW (wchar* lpSrc, wchar* lsDst, int nSize); 114 114 int ExpandEnvironmentStringsA (char* lpSrc, char* lsDst, int nSize); 115 BOOL ExtTextOutW(int hdc, int X, int Y, int fuOptions, RECT* lprc, wchar* lpString, int cbCount, int []lpDx);116 BOOL ExtTextOutA(int hdc, int X, int Y, int fuOptions, RECT* lprc, char* lpString, int cbCount, int []lpDx);117 int ExtractIconExW (wchar* lpszFile, int nIconIndex, int [] phiconLarge, int []phiconSmall, int nIcons);118 int ExtractIconExA (char* lpszFile, int nIconIndex, int [] phiconLarge, int []phiconSmall, int nIcons);115 BOOL ExtTextOutW(int hdc, int X, int Y, int fuOptions, RECT* lprc, wchar* lpString, int cbCount, int* lpDx); 116 BOOL ExtTextOutA(int hdc, int X, int Y, int fuOptions, RECT* lprc, char* lpString, int cbCount, int* lpDx); 117 int ExtractIconExW (wchar* lpszFile, int nIconIndex, int* phiconLarge, int* phiconSmall, int nIcons); 118 int ExtractIconExA (char* lpszFile, int nIconIndex, int* phiconLarge, int* phiconSmall, int nIcons); 119 119 int FillRect(int hDC, RECT* lprc, int hbr); 120 120 int FindWindowA (char* lpClassName, char* lpWindowName); … … 126 126 int GetCapture (); 127 127 BOOL GetCaretPos (POINT* lpPoint); 128 BOOL GetCharABCWidthsA (int hdc, int iFirstChar, int iLastChar, int []lpabc);129 BOOL GetCharABCWidthsW (int hdc, int iFirstChar, int iLastChar, int []lpabc);128 BOOL GetCharABCWidthsA (int hdc, int iFirstChar, int iLastChar, int* lpabc); 129 BOOL GetCharABCWidthsW (int hdc, int iFirstChar, int iLastChar, int* lpabc); 130 130 int GetCharacterPlacementW(int hdc, wchar* lpString, int nCount, int nMaxExtent, GCP_RESULTS* lpResults, int dwFlags); 131 131 int GetCharacterPlacementA(int hdc, char* lpString, int nCount, int nMaxExtent, GCP_RESULTS* lpResults, int dwFlags); 132 BOOL GetCharWidthA (int hdc, int iFirstChar, int iLastChar, int []lpBuffer);133 BOOL GetCharWidthW (int hdc, int iFirstChar, int iLastChar, int []lpBuffer);132 BOOL GetCharWidthA (int hdc, int iFirstChar, int iLastChar, int* lpBuffer); 133 BOOL GetCharWidthW (int hdc, int iFirstChar, int iLastChar, int* lpBuffer); 134 134 BOOL GetClassInfoW (int hInstance, wchar* lpClassName, WNDCLASS* lpWndClass); 135 135 BOOL GetClassInfoA (int hInstance, char* lpClassName, WNDCLASS* lpWndClass); … … 158 158 int GetFontLanguageInfo(int hdc); 159 159 BOOL GetIconInfo (int hIcon, ICONINFO* piconinfo); 160 int GetKeyboardLayoutList(int nBuff, int []lpList);160 int GetKeyboardLayoutList(int nBuff, int* lpList); 161 161 int GetKeyboardLayout(int idThread);short GetKeyState (int nVirtKey); 162 162 BOOL GetKeyboardState (char* lpKeyState); … … 167 167 int GetLayout (int hdc); 168 168 /* returns the instance handle to the swt library */ 169 int GetLibraryHandle ();169 //int GetLibraryHandle (); 170 170 int GetLocaleInfoW (int Locale, int LCType, wchar* lpLCData, int cchData); 171 171 int GetLocaleInfoA (int Locale, int LCType, char* lpLCData, int cchData); … … 202 202 BOOL GetOpenFileNameW (OPENFILENAME* lpofn); 203 203 BOOL GetOpenFileNameA (OPENFILENAME* lpofn); 204 int GetPaletteEntries (int hPalette, int iStartIndex, int nEntries, byte []logPalette);204 int GetPaletteEntries (int hPalette, int iStartIndex, int nEntries, byte* logPalette); 205 205 int GetParent (int hWnd); 206 206 int GetPixel (int hdc, int x, int y); 207 int GetProcAddress (int hModule, char []* lpProcName);207 int GetProcAddress (int hModule, char* lpProcName); 208 208 int GetProcessHeap (); 209 209 int GetProfileStringW (wchar* lpAppName, wchar* lpKeyName, wchar* lpDefault, wchar* lpReturnedString, int nSize); 210 210 int GetProfileStringA (char* lpAppName, char* lpKeyName, char* lpDefault, char* lpReturnedString, int nSize); 211 int GetRegionData (int hRgn, int dwCount, int []lpRgnData);211 int GetRegionData (int hRgn, int dwCount, int* lpRgnData); 212 212 int GetRgnBox (int hrgn, RECT* lprc); 213 213 int GetROP2 (int hdc); … … 220 220 int GetSystemMenu (int hWnd, BOOL bRevert); 221 221 int GetSystemMetrics (int nIndex); 222 int GetSystemPaletteEntries(int hdc, int iStartIndex, int nEntries, byte []lppe);222 int GetSystemPaletteEntries(int hdc, int iStartIndex, int nEntries, byte* lppe); 223 223 int GetTextColor (int hDC); 224 224 BOOL GetTextExtentPoint32W (int hdc, wchar* lpString, int cbString, SIZE* lpSize); … … 240 240 int GetWindowTextLengthW (int hWnd); 241 241 int GetWindowTextLengthA (int hWnd); 242 int GetWindowThreadProcessId (int hWnd, int []lpdwProcessId);242 int GetWindowThreadProcessId (int hWnd, int* lpdwProcessId); 243 243 int GlobalAlloc (int uFlags, int dwBytes); 244 244 int GlobalFree (int hMem); … … 255 255 BOOL ImageList_Destroy (int himl); 256 256 int ImageList_GetIcon (int himl, int i, int flags); 257 BOOL ImageList_GetIconSize (int himl, int [] cx, int []cy);257 BOOL ImageList_GetIconSize (int himl, int* cx, int* cy); 258 258 int ImageList_GetImageCount (int himl); 259 259 BOOL ImageList_Remove (int himl, int i); … … 262 262 BOOL ImageList_SetIconSize (int himl, int cx, int cy); 263 263 int ImmAssociateContext (int hWnd, int hIMC); 264 int ImmCreateContext () ;264 int ImmCreateContext () { assert(false); return 0; } 265 265 BOOL ImmDestroyContext (int hIMC); 266 BOOL ImmGetCompositionFontW (int hIMC, LOGFONTW* lplf) ;267 BOOL ImmGetCompositionFontA (int hIMC, LOGFONTA* lplf) ;268 int ImmGetCompositionStringW (int hIMC, int dwIndex, wchar* lpBuf, int dwBufLen) ;269 int ImmGetCompositionStringA (int hIMC, int dwIndex, char* lpBuf, int dwBufLen) ;266 BOOL ImmGetCompositionFontW (int hIMC, LOGFONTW* lplf) { assert(false); return 0; } 267 BOOL ImmGetCompositionFontA (int hIMC, LOGFONTA* lplf) { assert(false); return 0; } 268 int ImmGetCompositionStringW (int hIMC, int dwIndex, wchar* lpBuf, int dwBufLen) { assert(false); return 0; } 269 int ImmGetCompositionStringA (int hIMC, int dwIndex, char* lpBuf, int dwBufLen) { assert(false); return 0; } 270 270 int ImmGetContext (int hWnd); 271 BOOL ImmGetConversionStatus (int hIMC, int [] lpfdwConversion, int []lpfdwSentence);271 BOOL ImmGetConversionStatus (int hIMC, int* lpfdwConversion, int* lpfdwSentence); 272 272 int ImmGetDefaultIMEWnd (int hWnd); 273 273 BOOL ImmGetOpenStatus (int hIMC); 274 BOOL ImmReleaseContext (int hWnd, int hIMC) ;274 BOOL ImmReleaseContext (int hWnd, int hIMC) { assert(false); return 0; } 275 275 BOOL ImmSetCompositionFontW (int hIMC, LOGFONTW* lplf); 276 276 BOOL ImmSetCompositionFontA (int hIMC, LOGFONTA* lplf); 277 BOOL ImmSetCompositionWindow (int hIMC, COMPOSITIONFORM lpCompForm);277 BOOL ImmSetCompositionWindow (int hIMC, COMPOSITIONFORM* lpCompForm); 278 278 BOOL ImmSetConversionStatus (int hIMC, int fdwConversion, int dwSentence); 279 279 BOOL ImmSetOpenStatus (int hIMC, BOOL fOpen); … … 319 319 +/ 320 320 321 // :P 322 //void MoveMemory(void* destination, void* source, int length); 323 324 void MoveMemory (char[] Destination, int SourcePtr, int Length); 321 /* 322 void MoveMemory (void* destination, void* source, int length); 323 void MoveMemory (char* Destination, int SourcePtr, int Length); 325 324 void MoveMemory (char* Destination, int Source, int Length); 326 325 void MoveMemory (char* Destination, ACCEL Source, int Length); 327 326 void MoveMemory (char* Destination, BITMAPINFOHEADER Source, int Length); 328 void MoveMemory (int []Destination, int Source, int Length);329 void MoveMemory (int Destination, byte []Source, int Length);327 void MoveMemory (int* Destination, int Source, int Length); 328 void MoveMemory (int Destination, byte* Source, int Length); 330 329 // void MoveMemory (int Destination, char* Source, int Length); 331 330 void MoveMemory (int Destination, wchar* Source, int Length); 332 void MoveMemory (int Destination, int []Source, int Length);331 void MoveMemory (int Destination, int* Source, int Length); 333 332 void MoveMemory (int Destination, GRADIENT_RECT Source, int Length); 334 333 void MoveMemory (int Destination, LOGFONTW Source, int Length); … … 367 366 void MoveMemory (MSG Destination, int Source, int Length); 368 367 //void MoveMemory(int Destination, DROPFILES Source, int Length); 369 void MoveMemory(double []Destination, int SourcePtr, int Length);370 void MoveMemory(float []Destination, int SourcePtr, int Length);371 void MoveMemory(short []Destination, int SourcePtr, int Length);372 void MoveMemory(int DestinationPtr, double []Source, int Length);373 void MoveMemory(int DestinationPtr, float []Source, int Length);374 void MoveMemory(int DestinationPtr, short []Source, int Length);375 368 void MoveMemory(double* Destination, int SourcePtr, int Length); 369 void MoveMemory(float* Destination, int SourcePtr, int Length); 370 void MoveMemory(short* Destination, int SourcePtr, int Length); 371 void MoveMemory(int DestinationPtr, double* Source, int Length); 372 void MoveMemory(int DestinationPtr, float* Source, int Length); 373 void MoveMemory(int DestinationPtr, short* Source, int Length); 374 */ 376 375 377 376 BOOL MoveToEx (int hdc,int x1, int x2, int lPoint); … … 386 385 BOOL PeekMessageA (MSG* lpMsg, int hWnd, int wMsgFilterMin, int wMsgFilterMax, int wRemoveMsg); 387 386 BOOL Pie (int hdc, int nLeftRect, int nTopRect, int nRightRect, int nBottomRect, int nXStartArc, int nYStartArc, int nXEndArc, int nYEndArc); 388 BOOL Polygon (int hdc, int []points, int nPoints);389 BOOL Polyline (int hdc,int []points, int nPoints);387 BOOL Polygon (int hdc, int* points, int nPoints); 388 BOOL Polyline (int hdc,int* points, int nPoints); 390 389 BOOL PostMessageW (int hWnd, int Msg, int wParam, int lParam); 391 390 BOOL PostMessageA (int hWnd, int Msg, int wParam, int lParam); … … 394 393 BOOL PrintDlgW (PRINTDLG lppd); 395 394 BOOL PrintDlgA (PRINTDLG lppd); 396 BOOL PtInRect (RECT* rect, POINT *pt);395 BOOL PtInRect (RECT* rect, POINT pt); 397 396 BOOL PtInRegion (int hrgn, int X, int Y); 398 397 int RealizePalette(int hDC); … … 403 402 int RegisterClassW (WNDCLASS* lpWndClass); 404 403 int RegisterClassA (WNDCLASS* lpWndClass); 405 int RegEnumKeyExW (int hKey, int dwIndex, wchar* lpName, int [] lpcName, int [] lpReserved, wchar* lpClass, int []lpcClass, FILETIME* lpftLastWriteTime);404 int RegEnumKeyExW (int hKey, int dwIndex, wchar* lpName, int* lpcName, int* lpReserved, wchar* lpClass, int* lpcClass, FILETIME* lpftLastWriteTime); 406 405 int RegisterClipboardFormatA (char* lpszFormat); 407 406 int RegisterClipboardFormatW (wchar* lpszFormat); 408 int RegOpenKeyExW (int hKey, wchar* lpSubKey, int ulOptions, int samDesired, int []phkResult);409 int RegQueryInfoKeyW (int hKey, int lpClass, int [] lpcbClass, int lpReserved, int[] lpSubKeys, int[] lpcbMaxSubKeyLen, int[] lpcbMaxClassLen, int[] lpcValues, int[] lpcbMaxValueNameLen, int[] lpcbMaxValueLen, int[]lpcbSecurityDescriptor, int lpftLastWriteTime);410 int RegQueryValueExW (int hKey, wchar* lpValueName, int lpReserved, int [] lpType, wchar* lpData, int[]lpcbData);411 int RegEnumKeyExA (int hKey, int dwIndex, char* lpName, int [] lpcName, int [] lpReserved, char* lpClass, int []lpcClass, FILETIME* lpftLastWriteTime);412 int RegOpenKeyExA (int hKey, char* lpSubKey, int ulOptions, int samDesired, int []phkResult);413 int RegQueryInfoKeyA (int hKey, int lpClass, int [] lpcbClass, int lpReserved, int[] lpSubKeys, int[] lpcbMaxSubKeyLen, int[] lpcbMaxClassLen, int[] lpcValues, int[] lpcbMaxValueNameLen, int[] lpcbMaxValueLen, int[]lpcbSecurityDescriptor, int lpftLastWriteTime);414 int RegQueryValueExA (int hKey, char* lpValueName, int lpReserved, int [] lpType, char* lpData, int[]lpcbData);407 int RegOpenKeyExW (int hKey, wchar* lpSubKey, int ulOptions, int samDesired, int* phkResult); 408 int RegQueryInfoKeyW (int hKey, int lpClass, int* lpcbClass, int lpReserved, int* lpSubKeys, int* lpcbMaxSubKeyLen, int* lpcbMaxClassLen, int* lpcValues, int* lpcbMaxValueNameLen, int* lpcbMaxValueLen, int* lpcbSecurityDescriptor, int lpftLastWriteTime); 409 int RegQueryValueExW (int hKey, wchar* lpValueName, int lpReserved, int* lpType, wchar* lpData, int* lpcbData); 410 int RegEnumKeyExA (int hKey, int dwIndex, char* lpName, int* lpcName, int* lpReserved, char* lpClass, int* lpcClass, FILETIME* lpftLastWriteTime); 411 int RegOpenKeyExA (int hKey, char* lpSubKey, int ulOptions, int samDesired, int* phkResult); 412 int RegQueryInfoKeyA (int hKey, int lpClass, int* lpcbClass, int lpReserved, int* lpSubKeys, int* lpcbMaxSubKeyLen, int* lpcbMaxClassLen, int* lpcValues, int* lpcbMaxValueNameLen, int* lpcbMaxValueLen, int* lpcbSecurityDescriptor, int lpftLastWriteTime); 413 int RegQueryValueExA (int hKey, char* lpValueName, int lpReserved, int* lpType, char* lpData, int* lpcbData); 415 414 BOOL ReleaseCapture (); 416 415 int ReleaseDC (int hWnd, int hDC); … … 423 422 int SelectPalette(int hDC, int hpal, BOOL bForceBackground); 424 423 425 //int SendMessageW (int hWnd, int msg, int wparam, int lparam);426 //int SendMessageA (int hWnd, int msg, int wparam, int lparam);424 int SendMessageW (int hWnd, int msg, int wparam, int lparam); 425 int SendMessageA (int hWnd, int msg, int wparam, int lparam); 427 426 428 427 // D doesn't allow extern(Windows) functions to be overloaded in this manner 429 / / /*430 int SendMessageW (int hWnd, int Msg, int [] wParam, int []lParam);431 int SendMessageW (int hWnd, int Msg, int []wParam, int lParam);428 /* 429 int SendMessageW (int hWnd, int Msg, int* wParam, int* lParam); 430 int SendMessageW (int hWnd, int Msg, int* wParam, int lParam); 432 431 int SendMessageW (int hWnd, int Msg, int wParam, wchar* lParam); 433 int SendMessageW (int hWnd, int Msg, int wParam, int []lParam);434 int SendMessageW (int hWnd, int Msg, int wParam, short []lParam);432 int SendMessageW (int hWnd, int Msg, int wParam, int* lParam); 433 int SendMessageW (int hWnd, int Msg, int wParam, short* lParam); 435 434 int SendMessageW (int hWnd, int Msg, int wParam, int lParam); 436 435 int SendMessageW (int hWnd, int Msg, int wParam, LVCOLUMN* lParam); … … 446 445 int SendMessageW (int hWnd, int Msg, int wParam, TVINSERTSTRUCT* lParam); 447 446 int SendMessageW (int hWnd, int Msg, int wParam, TVITEM* lParam); 448 int SendMessageA (int hWnd, int Msg, int [] wParam, int []lParam);449 int SendMessageA (int hWnd, int Msg, int []wParam, int lParam);447 int SendMessageA (int hWnd, int Msg, int* wParam, int* lParam); 448 int SendMessageA (int hWnd, int Msg, int* wParam, int lParam); 450 449 int SendMessageA (int hWnd, int Msg, int wParam, char* lParam); 451 int SendMessageA (int hWnd, int Msg, int wParam, int []lParam);452 int SendMessageA (int hWnd, int Msg, int wParam, short []lParam);450 int SendMessageA (int hWnd, int Msg, int wParam, int* lParam); 451 int SendMessageA (int hWnd, int Msg, int wParam, short* lParam); 453 452 int SendMessageA (int hWnd, int Msg, int wParam, int lParam); 454 453 int SendMessageA (int hWnd, int Msg, int wParam, LVCOLUMN* lParam); … … 464 463 int SendMessageA (int hWnd, int Msg, int wParam, TVINSERTSTRUCT* lParam); 465 464 int SendMessageA (int hWnd, int Msg, int wParam, TVITEM* lParam); 466 //*/465 */ 467 466 468 467 int SetActiveWindow (int hWnd); … … 474 473 int SetCursor (int hCursor); 475 474 BOOL SetCursorPos (int X, int Y); 476 int SetDIBColorTable (int hdc, int uStartIndex, int cEntries, byte []pColors);475 int SetDIBColorTable (int hdc, int uStartIndex, int cEntries, byte* pColors); 477 476 int SetErrorMode (int uMode); 478 477 int SetFocus (int hWnd); … … 484 483 BOOL SetMenuItemInfoW (int hMenu, int uItem, BOOL fByPosition, MENUITEMINFO* lpmii); 485 484 BOOL SetMenuItemInfoA (int hMenu, int uItem, BOOL fByPosition, MENUITEMINFO* lpmii); 486 int SetPaletteEntries (int hPal, int iStart, int cEntries, byte []lppe);485 int SetPaletteEntries (int hPal, int iStart, int cEntries, byte* lppe); 487 486 int SetParent (int hWndChild, int hWndNewParent); 488 487 int SetPixel (int hdc, int X, int Y, int crColor); … … 504 503 int SetWindowsHookExW (int idHook, int lpfn, int hMod, int dwThreadId); 505 504 int SetWindowsHookExA (int idHook, int lpfn, int hMod, int dwThreadId); 505 BOOL ShellExecuteExW (SHELLEXECUTEINFO* lpExecInfo); 506 BOOL ShellExecuteExA (SHELLEXECUTEINFO* lpExecInfo); 507 int SHGetMalloc (int* ppMalloc); 508 BOOL SHGetPathFromIDListW (int pidl, wchar* pszPath); 509 BOOL SHGetPathFromIDListA (int pidl, char* pszPath); 510 BOOL SHSetAppKeyWndAssoc(byte bVk, int hwnd); 506 511 int SHBrowseForFolderW (BROWSEINFO* lpbi); 507 512 int SHBrowseForFolderA (BROWSEINFO* lpbi); 508 BOOL SHCreateMenuBar(SHMENUBARINFO* pmb);513 version (none) BOOL SHCreateMenuBar(SHMENUBARINFO* pmb); 509 514 BOOL SHHandleWMSettingChange (int hwnd, int wParam, int lParam, SHACTIVATEINFO* psai); 510 515 int SHRecognizeGesture(SHRGINFO* shrg); 511 516 void SHSendBackToFocusWindow (int uMsg, int wp, int lp); 512 BOOL SHSipPreference (int hwnd, int st);513 BOOL ShellExecuteExW (SHELLEXECUTEINFO* lpExecInfo);514 BOOL ShellExecuteExA (SHELLEXECUTEINFO* lpExecInfo);515 int SHGetMalloc (int [] ppMalloc);516 BOOL SHGetPathFromIDListW (int pidl, wchar* pszPath);517 BOOL SHGetPathFromIDListA (int pidl, char* pszPath);518 BOOL SHSetAppKeyWndAssoc(byte bVk, int hwnd);519 517 BOOL ShowCaret (int hWnd); 520 518 BOOL ShowOwnedPopups (int hWnd, BOOL fShow); 521 519 BOOL ShowScrollBar (int hWnd, int wBar, BOOL bShow); 522 520 BOOL ShowWindow (int hWnd, int nCmdShow); 523 BOOL SipGetInfo (SIPINFO* pSipInfo); 521 522 version (WindowsCE) { 523 BOOL SHSipPreference (int hwnd, int st); 524 BOOL SipGetInfo (SIPINFO* pSipInfo); 525 } 526 524 527 int StartDocW (int hdc, DOCINFO* lpdi); 525 528 int StartDocA (int hdc, DOCINFO* lpdi); … … 534 537 BOOL SystemParametersInfoW (int uiAction, int uiParam, NONCLIENTMETRICSW* pvParam, int fWinIni); 535 538 BOOL SystemParametersInfoA (int uiAction, int uiParam, NONCLIENTMETRICSA* pvParam, int fWinIni); 536 BOOL SystemParametersInfoW (int uiAction, int uiParam, int []pvParam, int fWinIni);537 BOOL SystemParametersInfoA (int uiAction, int uiParam, int []pvParam, int fWinIni);538 539 int ToAscii(int uVirtKey, int uScanCode, byte []* lpKeyState, char[]* lpChar, int uFlags);540 int ToUnicode(int wVirtKey, int wScanCode, byte []* lpKeyState, wchar* pwszBuff, int cchBuff, int wFlags);539 BOOL SystemParametersInfoW (int uiAction, int uiParam, int* pvParam, int fWinIni); 540 BOOL SystemParametersInfoA (int uiAction, int uiParam, int* pvParam, int fWinIni); 541 542 int ToAscii(int uVirtKey, int uScanCode, byte* lpKeyState, char* lpChar, int uFlags); 543 int ToUnicode(int wVirtKey, int wScanCode, byte* lpKeyState, wchar* pwszBuff, int cchBuff, int wFlags); 541 544 BOOL TrackMouseEvent(TRACKMOUSEEVENT* lpEventTrack); 542 545 BOOL TrackPopupMenu (int hMenu, int uFlags, int x, int y, int nReserved, int hWnd, RECT* prcRect); 543 int TranslateAcceleratorW (int hWnd, int hAccTable, MSG lpMsg);544 int TranslateAcceleratorA (int hWnd, int hAccTable, MSG lpMsg);545 BOOL TranslateCharsetInfo(int lpSrc, int []lpCs, int dwFlags);546 BOOL TranslateMDISysAccel (int hWndClient, MSG lpMsg);546 int TranslateAcceleratorW (int hWnd, int hAccTable, MSG* lpMsg); 547 int TranslateAcceleratorA (int hWnd, int hAccTable, MSG* lpMsg); 548 BOOL TranslateCharsetInfo(int lpSrc, int* lpCs, int dwFlags); 549 BOOL TranslateMDISysAccel (int hWndClient, MSG* lpMsg); 547 550 BOOL TranslateMessage(MSG* lpmsg); 548 551 BOOL TransparentImage (int hdcDest, int DstX, int DstY, int DstCx, int DstCy,int hSrc, int SrcX, int SrcY, int SrcCx, int SrcCy, int TransparentColor);BOOL UnhookWindowsHookEx(int hhk); … … 555 558 int VtblCall (int ppVtbl, int fnNumber, int arg0); 556 559 BOOL WaitMessage (); 557 int WideCharToMultiByte (int CodePage, int dwFlags, wchar* lpWideCharStr, int cchWideChar, char* lpMultiByteStr, int cchMultiByte, char* lpDefaultChar, BOOL []lpUsedDefaultChar);558 int WideCharToMultiByte (int CodePage, int dwFlags, wchar* lpWideCharStr, int cchWideChar, int lpMultiByteStr, int cchMultiByte, char* lpDefaultChar, BOOL []lpUsedDefaultChar);560 int WideCharToMultiByte (int CodePage, int dwFlags, wchar* lpWideCharStr, int cchWideChar, char* lpMultiByteStr, int cchMultiByte, char* lpDefaultChar, BOOL* lpUsedDefaultChar); 561 int WideCharToMultiByte (int CodePage, int dwFlags, wchar* lpWideCharStr, int cchWideChar, int lpMultiByteStr, int cchMultiByte, char* lpDefaultChar, BOOL* lpUsedDefaultChar); 559 562 int WindowFromDC (int lpPoint); 560 563 int WindowFromPoint (POINT lpPoint); trunk/src/dwt/internal/win32/os.d
r38 r40 24 24 import dwt.internal.win32.tchar; 25 25 import dwt.internal.win32.types; 26 }26 } 27 27 28 28 public class OS { … … 36 36 const int IsWinNT = 1; 37 37 const int IsWinCE = 0; 38 static int IsPPC;39 static int IsHPC;40 static int IsSP;41 static int IsDBLocale ;38 const int IsPPC = 0; 39 const int IsHPC = 0; 40 const int IsSP = 0; 41 static int IsDBLocale = 0; 42 42 const int IsUnicode = 1; 43 43 static int WIN32_MAJOR, WIN32_MINOR; … … 54 54 * Initialize the Windows flags 55 55 */ 56 version ( NO)56 version (none) 57 57 { 58 58 static this () { … … 107 107 108 108 this() { 109 IsUnicode = 1; 110 111 IsWin32s = 0; //info.dwPlatformId == VER_PLATFORM_WIN32s; 112 IsWin95 = 0; //info.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS; 113 IsWinNT = 1; //info.dwPlatformId == VER_PLATFORM_WIN32_NT; 114 IsWinCE = 0; //info.dwPlatformId == VER_PLATFORM_WIN32_CE; 115 IsSP = IsSP(); 116 IsPPC = IsPPC(); 117 IsHPC = IsWinCE && !IsPPC && !IsSP; 118 // WIN32_MAJOR = info.dwMajorVersion; 119 // WIN32_MINOR = info.dwMinorVersion; 120 121 /+ 122 // TEMPORARY CODE 123 if (MBCS != null) { 124 IsUnicode = false; 125 System.out.println ("*** DWT - Warning: Unicode disabled"); //$NON-NLS-1$ 126 } else { 127 IsUnicode = !IsWin32s && !IsWin95; 128 } 129 130 /* Get the DBCS flag */ 131 int index = 0; 132 while (index <= 0xFF) { 133 if (OS.IsDBCSLeadByte ((byte) index)) break; 134 index++; 135 } 136 IsDBLocale = index <= 0xFF; 137 138 +/ 139 140 } // end this() ctor 109 IsUnicode = 1; 110 111 IsWin32s = 0; //info.dwPlatformId == VER_PLATFORM_WIN32s; 112 IsWin95 = 0; //info.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS; 113 IsWinNT = 1; //info.dwPlatformId == VER_PLATFORM_WIN32_NT; 114 //IsWinCE = info.dwPlatformId == VER_PLATFORM_WIN32_CE; 115 IsSP = IsSP(); 116 IsPPC = IsPPC(); 117 IsHPC = IsWinCE && !IsPPC && !IsSP; 118 //WIN32_MAJOR = info.dwMajorVersion; 119 //WIN32_MINOR = info.dwMinorVersion; 120 121 /+ 122 123 // TEMPORARY CODE 124 if (MBCS != null) { 125 IsUnicode = false; 126 System.out.println ("*** DWT - Warning: Unicode disabled"); //$NON-NLS-1$ 127 } else { 128 IsUnicode = !IsWin32s && !IsWin95; 129 } 130 131 /* Get the DBCS flag */ 132 int index = 0; 133 while (index <= 0xFF) { 134 if (OS.IsDBCSLeadByte ((byte) index)) break; 135 index++; 136 } 137 IsDBLocale = index <= 0xFF; 138 139 +/ 140 141 } // end this() ctor 141 142 } 142 143 … … 146 147 147 148 /* Flag used on WinCE */ 148 const int SYS_COLOR_INDEX_FLAG = IsWinCE ? 0x40000000 : 0x0; 149 version (WindowsCE) { 150 const int SYS_COLOR_INDEX_FLAG = 0x40000000; 151 } else { 152 const int SYS_COLOR_INDEX_FLAG = 0x0; 153 } 149 154 150 155 /* … … 939 944 public const int SW_MINIMIZE = 0x6; 940 945 public const int SW_PARENTOPENING = 0x3; 941 public const int SW_RESTORE = IsWinCE ? 0xd : 0x9; 946 version (WindowsCE) { 947 public const int SW_RESTORE = 0xD; 948 public const int SW_SHOWMAXIMIZED = 0xb; 949 public const int WS_MAXIMIZEBOX = 0x20000; 950 public const int WS_MINIMIZEBOX = 0x10000; 951 public const int WS_OVERLAPPED = WS_BORDER | WS_CAPTION; 952 } else { 953 public const int SW_RESTORE = 0x9; 954 public const int SW_SHOWMAXIMIZED = 0x3; 955 public const int WS_MAXIMIZEBOX = 0x10000; 956 public const int WS_MINIMIZEBOX = 0x20000; 957 public const int WS_OVERLAPPED = 0x0; 958 } 942 959 public const int SW_SCROLLCHILDREN = 0x1; 943 960 public const int SW_SHOW = 0x5; 944 public const int SW_SHOWMAXIMIZED = IsWinCE ? 0xb : 0x3;945 961 public const int SW_SHOWMINIMIZED = 0x2; 946 962 public const int SW_SHOWMINNOACTIVE = 0x7; … … 1329 1345 public const int WS_EX_TRANSPARENT = 0x20; 1330 1346 public const int WS_HSCROLL = 0x100000; 1331 public const int WS_MAXIMIZEBOX = IsWinCE ? 0x20000 : 0x10000;1332 public const int WS_MINIMIZEBOX = IsWinCE ? 0x10000 : 0x20000;1333 public const int WS_OVERLAPPED = IsWinCE ? WS_BORDER | WS_CAPTION : 0x0;1334 1347 public const int WS_OVERLAPPEDWINDOW = 0xcf0000; 1335 1348 public const int WS_POPUP = cast(int)0x80000000; … … 1800 1813 } 1801 1814 1802 static void MoveMemory (void* Destination, TCHAR Source, int Length) {1803 //static void MoveMemory (int Destination, TCHAR Source, int Length) {1804 if (IsUnicode) { 1805 wchar* Source1 = w_str(Source);1806 (cast(wchar*)Destination)[0..Length] = Source1[0..Length];1807 //MoveMemory(Destination, Source1, Length);1815 static void MoveMemory (void* destination, TCHAR source, int length) { 1816 //static void MoveMemory (int destination, TCHAR source, int length) { 1817 if (IsUnicode) { 1818 wchar* Source1 = w_str(source); 1819 //(cast(wchar*)destination)[0..length] = Source1[0..length]; 1820 MoveMemory(destination, Source1, length); 1808 1821 } else { 1809 char* Source1 = c_str(Source);1810 (cast(char*)Destination)[0..Length] = Source1[0..Length];1811 //MoveMemory(Destination, Source1, Length);1812 } 1813 } 1814 1815 static void MoveMemory (TCHAR Destination, void* Source, int Length) {1816 if (IsUnicode) { 1817 wchar* Destination1 = w_str( Destination);1818 Destination1 = (cast(wchar*) Source)[0..Length];1822 char* Source1 = c_str(source); 1823 //(cast(char*)destination)[0..length] = Source1[0..length]; 1824 MoveMemory(destination, Source1, length); 1825 } 1826 } 1827 1828 static void MoveMemory (TCHAR destination, void* source, int length) { 1829 if (IsUnicode) { 1830 wchar* Destination1 = w_str(destination); 1831 Destination1 = (cast(wchar*)source)[0..length]; 1819 1832 } else { 1820 char* Destination1 = c_str(Destination); 1821 Destination1 = (cast(char*)Source)[0..Length]; 1822 } 1823 } 1824 1825 static void MoveMemory (int Destination, LOGFONT* Source, int Length) { 1826 (cast(byte*)Destination)[0..Length] = (cast(byte*)Source)[0..Length]; 1827 } 1828 1829 static void MoveMemory (LOGFONT* Destination, int Source, int Length) { 1830 (cast(byte*)Destination)[0..Length] = (cast(byte*)Source)[0..Length]; 1831 } 1832 1833 static void MoveMemory (int Destination, NMTTDISPINFO* Source, int Length) { 1834 (cast(byte*)Destination)[0..Length] = (cast(byte*)Source)[0..Length]; 1835 } 1836 1837 static void MoveMemory (NMTTDISPINFO* Destination, int Source, int Length) { 1838 (cast(byte*)Destination)[0..Length] = (cast(byte*)Source)[0..Length]; 1839 } 1833 char* Destination1 = c_str(destination); 1834 Destination1 = (cast(char*)source)[0..length]; 1835 } 1836 } 1837 1838 1839 static void MoveMemory (void* destination, void* source, int length) { 1840 destination[0 .. length] = source[0 .. length]; 1841 } 1842 1843 static void MoveMemory (void* destination, int source, int length) { 1844 MoveMemory(destination, cast(void*)source, length); 1845 } 1846 1847 static void MoveMemory (int destination, void* source, int length) { 1848 MoveMemory(cast(void*)destination, source, length); 1849 } 1850 1851 /*static void MoveMemory (void* destination, LOGFONT* source, int length) { 1852 (cast(void*)destination)[0..length] = (cast(void*)source)[0..length]; 1853 } 1854 1855 static void MoveMemory (LOGFONT* destination, void* source, int length) { 1856 (cast(void*)destination)[0..length] = (cast(void*)source)[0..length]; 1857 } 1858 1859 static void MoveMemory (void* destination, NMTTDISPINFO* source, int length) { 1860 (cast(void*)destination)[0..length] = (cast(void*)source)[0..length]; 1861 } 1862 1863 static void MoveMemory (NMTTDISPINFO* destination, int source, int length) { 1864 (cast(void*)destination)[0..length] = (cast(void*)source)[0..length]; 1865 }*/ 1840 1866 1841 1867 // added to call proper win32 specific functions 1842 1868 1843 static void MoveMemory ( DRAWITEMSTRUCT Destination, int Source, int Length) {1844 dwt.internal.win32.func.MoveMemory(Destination, Source, Length);1845 } 1846 1847 static void MoveMemory (NMHDR* Destination, int Source, int Length) {1848 dwt.internal.win32.func.MoveMemory(Destination, Source, Length);1849 } 1850 1851 static void MoveMemory ( NMTTDISPINFOA Destination, int Source, int Length) {1852 dwt.internal.win32.func.MoveMemory(Destination, Source, Length);1853 } 1854 1855 static void MoveMemory (NMTTDISPINFOW Destination, int Source, int Length) {1856 dwt.internal.win32.func.MoveMemory(Destination, Source, Length);1857 } 1858 1859 static void MoveMemory ( int Destination, NMTTDISPINFOW Source, int Length) {1860 dwt.internal.win32.func.MoveMemory(Destination, Source, Length);1861 } 1862 1863 static void MoveMemory (HELPINFO* Destination, int Source, int Length) {1864 dwt.internal.win32.func.MoveMemory( Destination, Source, Length);1865 } 1866 1867 static void MoveMemory ( MEASUREITEMSTRUCT Destination, int Source, int Length) {1868 dwt.internal.win32.func.MoveMemory(Destination, Source, Length);1869 } 1870 1871 static void MoveMemory (char* Destination, ACCEL Source, int Length) {1872 dwt.internal.win32.func.MoveMemory(Destination, Source, Length);1873 } 1874 1875 static void MoveMemory (WINDOWPOS* Destination, int Source, int Length) {1876 dwt.internal.win32.func.MoveMemory( Destination, Source, Length);1877 } 1878 1879 static void MoveMemory( int Destination, WINDOWPOS* Source, int Length) {1880 dwt.internal.win32.func.MoveMemory( Destination, Source, Length);1881 } 1882 1883 static void MoveMemory( MSG Destination, int Source, int Length) {1884 dwt.internal.win32.func.MoveMemory(Destination, Source, Length);1885 } 1886 1887 static void MoveMemory( int Destination, MEASUREITEMSTRUCT Source, int Length) {1888 dwt.internal.win32.func.MoveMemory(Destination, Source, Length);1889 } 1890 1891 static void MoveMemory(int Destination, byte[] Source, int Length) {1892 dwt.internal.win32.func.MoveMemory(Destination, Source, Length);1893 } 1894 1895 static void MoveMemory( int Destination, wchar* Source, int Length) {1896 dwt.internal.win32.func.MoveMemory( Destination, Source, Length);1897 } 1869 static void MoveMemory (out DRAWITEMSTRUCT destination, int source, int length) { 1870 MoveMemory(&destination, cast(void*)source, length); 1871 } 1872 1873 /*static void MoveMemory (NMHDR* destination, void* source, int length) { 1874 internal.win32.func.MoveMemory(destination, source, length); 1875 }*/ 1876 1877 static void MoveMemory (out NMTTDISPINFOA destination, int source, int length) { 1878 MoveMemory(&destination, cast(void*)source, length); 1879 } 1880 1881 /*static void MoveMemory (NMTTDISPINFOW destination, int source, int length) { 1882 MoveMemory(&destination, cast(void*)source, length); 1883 }*/ 1884 1885 static void MoveMemory (void* destination, NMTTDISPINFOW source, int length) { 1886 MoveMemory(destination, &source, length); 1887 } 1888 1889 /*static void MoveMemory (HELPINFO* destination, void* source, int length) { 1890 dwt.internal.win32.func.MoveMemory(destination, source, length); 1891 }*/ 1892 1893 static void MoveMemory (out MEASUREITEMSTRUCT destination, int source, int length) { 1894 MoveMemory(&destination, source, length); 1895 } 1896 1897 static void MoveMemory (char* destination, ACCEL source, int length) { 1898 MoveMemory(destination, &source, length); 1899 } 1900 1901 /*static void MoveMemory (WINDOWPOS* destination, void* source, int length) { 1902 dwt.internal.win32.func.MoveMemory(destination, source, length); 1903 } 1904 1905 static void MoveMemory(void* destination, WINDOWPOS* source, int length) { 1906 dwt.internal.win32.func.MoveMemory(destination, source, length); 1907 }*/ 1908 1909 static void MoveMemory(out MSG destination, int source, int length) { 1910 MoveMemory(&destination, cast(void*)source, length); 1911 } 1912 1913 static void MoveMemory(void* destination, MEASUREITEMSTRUCT source, int length) { 1914 MoveMemory(destination, &source, length); 1915 } 1916 1917 /*static void MoveMemory(void* destination, byte[] source, int length) { 1918 MoveMemory(destination, source, length); 1919 } 1920 1921 static void MoveMemory(void* destination, wchar* source, int length) { 1922 dwt.internal.win32.func.MoveMemory(destination, source, length); 1923 }*/ 1898 1924 // ----------------------------- 1899 1925 … … 1972 1998 } 1973 1999 2000 static int SendMessage (int hWnd, int Msg, int wParam, int lParam) { 2001 if (IsUnicode) { 2002 return SendMessageW(hWnd, Msg, wParam, lParam); 2003 } else { 2004 return SendMessageA(hWnd, Msg, wParam, lParam); 2005 } 2006 } 2007 2008 static int SendMessage (int hWnd, int Msg, int wParam, void* lParam) { 2009 return SendMessage(hWnd, Msg, wParam, cast(int)lParam); 2010 } 2011 2012 static int SendMessage (int hWnd, int Msg, void* wParam, int lParam) { 2013 return SendMessage(hWnd, Msg, cast(int)wParam, lParam); 2014 } 2015 2016 static int SendMessage (int hWnd, int Msg, void* wParam, void* lParam) { 2017 return SendMessage(hWnd, Msg, cast(int)wParam, cast(int)lParam); 2018 } 2019 1974 2020 static int SendMessage (int hWnd, int Msg, int wParam, TCHAR lParam) { 1975 2021 if (IsUnicode) { 1976 2022 wchar* lParam1 = w_str(lParam); 1977 return SendMessageW (hWnd, Msg, wParam, lParam1);2023 return SendMessageW (hWnd, Msg, wParam, cast(int)lParam1); 1978 2024 } 1979 2025 char* lParam1 = c_str(lParam); 1980 return SendMessageA (hWnd, Msg, wParam, lParam1); 1981 } 1982 2026 return SendMessageA (hWnd, Msg, wParam, cast(int)lParam1); 2027 } 2028 2029 /+ 1983 2030 static int SendMessage (int hWnd, int Msg, int [] wParam, int [] lParam) { 1984 if (IsUnicode) return SendMessageW (hWnd, Msg, wParam, lParam); 1985 return SendMessageA (hWnd, Msg, wParam, lParam); 2031 return SendMessageW (hWnd, Msg, &wParam[0], &lParam[0]); 1986 2032 } 1987 2033 … … 2065 2111 return SendMessageA (hWnd, Msg, wParam, lParam); 2066 2112 } 2113 +/ 2067 2114 2068 2115 static bool SetMenuItemInfo (int hMenu, int uItem, bool fByPosition, MENUITEMINFO* lpmii) { … … 2097 2144 2098 2145 static bool ShellExecuteEx (SHELLEXECUTEINFO* lpExecInfo) { 2099 if (IsUnicode) 2146 if (IsUnicode) { 2100 2147 return (ShellExecuteExW(lpExecInfo) == 0) ? false : true; 2101 return (ShellExecuteExA (lpExecInfo) == 0) ? false : true; 2148 } else { 2149 return (ShellExecuteExA(lpExecInfo) == 0) ? false : true; 2150 } 2102 2151 } 2103 2152 … …
