Ver Fonte

+ added the win16api message box functions and its related constants

git-svn-id: trunk@31794 -
nickysn há 9 anos atrás
pai
commit
228b6b7c5c
3 ficheiros alterados com 34 adições e 2 exclusões
  1. 0 2
      rtl/win16/system.pp
  2. 5 0
      rtl/win16/winprocsh.inc
  3. 29 0
      rtl/win16/wintypes.inc

+ 0 - 2
rtl/win16/system.pp

@@ -97,8 +97,6 @@ const
 {$endif RTLLITE}
 
 
-procedure MessageBox(hWnd: word; lpText, lpCaption: LPSTR; uType: word);external 'USER';
-
 implementation
 
 const

+ 5 - 0
rtl/win16/winprocsh.inc

@@ -1126,3 +1126,8 @@ function CreateIcon(hinst: HINST; nWidth, nHeight: SmallInt; bPlanes, bBitsPerPi
 function DestroyIcon(hicon: HICON): BOOL; external 'USER';
 
 function DrawIcon(hdc: HDC; x, y: SmallInt; hicon: HICON): BOOL; external 'USER';
+
+{ Message Box support }
+
+function MessageBox(hwndParent: HWND; lpszText, lpszTitle: LPCSTR; fuStyle: UINT): SmallInt; external 'USER';
+procedure MessageBeep(uAlert: UINT); external 'USER';

+ 29 - 0
rtl/win16/wintypes.inc

@@ -2107,3 +2107,32 @@ const
   IDI_QUESTION    = MAKEINTRESOURCE(32514);
   IDI_EXCLAMATION = MAKEINTRESOURCE(32515);
   IDI_ASTERISK    = MAKEINTRESOURCE(32516);
+
+{ Message Box support }
+  MB_OK               = $0000;
+  MB_OKCANCEL         = $0001;
+  MB_ABORTRETRYIGNORE = $0002;
+  MB_YESNOCANCEL      = $0003;
+  MB_YESNO            = $0004;
+  MB_RETRYCANCEL      = $0005;
+  MB_TYPEMASK         = $000F;
+
+  MB_ICONHAND         = $0010;
+  MB_ICONQUESTION     = $0020;
+  MB_ICONEXCLAMATION  = $0030;
+  MB_ICONASTERISK     = $0040;
+  MB_ICONMASK         = $00F0;
+
+  MB_ICONINFORMATION  = MB_ICONASTERISK;
+  MB_ICONSTOP         = MB_ICONHAND;
+
+  MB_DEFBUTTON1       = $0000;
+  MB_DEFBUTTON2       = $0100;
+  MB_DEFBUTTON3       = $0200;
+  MB_DEFMASK          = $0F00;
+
+  MB_APPLMODAL        = $0000;
+  MB_SYSTEMMODAL      = $1000;
+  MB_TASKMODAL        = $2000;
+
+  MB_NOFOCUS          = $8000;