Mercurial > dwindows
changeset 1757:7b049aaca615
Fixes for building on OS/2 in ANSI mode.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sun, 17 Jun 2012 17:04:53 +0000 |
parents | 873960d28f01 |
children | 517d6e3f4b88 |
files | os2/dw.c |
diffstat | 1 files changed, 12 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/os2/dw.c Sun Jun 17 05:06:11 2012 +0000 +++ b/os2/dw.c Sun Jun 17 17:04:53 2012 +0000 @@ -2332,6 +2332,12 @@ WinSetFocus(HWND_DESKTOP, handle); } +#define ENTRY_CUT 60901 +#define ENTRY_COPY 60902 +#define ENTRY_PASTE 60903 +#define ENTRY_UNDO 60904 +#define ENTRY_SALL 60905 + #ifdef UNICODE void _combine_text(HWND handle, USHORT pos1, char *text, char *pastetext) { @@ -2352,13 +2358,6 @@ /* Free temporary memory */ free(combined); } -#endif - -#define ENTRY_CUT 60901 -#define ENTRY_COPY 60902 -#define ENTRY_PASTE 60903 -#define ENTRY_UNDO 60904 -#define ENTRY_SALL 60905 /* Internal function to handle Unicode enabled MLE cut, copy and paste */ void _MleCopyPaste(HWND hWnd, int command) @@ -2434,6 +2433,7 @@ if(text) free(text); } +#endif /* Originally just intended for entryfields, it now serves as a generic * procedure for handling TAB presses to change input focus on controls. @@ -2627,7 +2627,7 @@ { char *text = dw_window_get_text(handle); ULONG sel = (ULONG)WinSendMsg(hWnd, EM_QUERYSEL, 0, 0); - SHORT pos1 = SHORT1FROMMP(sel), pos2 = SHORT2FROMMP(sel); + SHORT pos1 = SHORT1FROMMP(sel); WinSendMsg(handle, EM_CLEAR, 0, 0); _combine_text(handle, pos1, text, utf8); @@ -2684,9 +2684,11 @@ break; case WM_CONTEXTMENU: case WM_COMMAND: +#ifdef UNICODE case EM_PASTE: case EM_CUT: case EM_COPY: +#endif return _entryproc(hWnd, msg, mp1, mp2); case WM_SETFOCUS: _run_event(hWnd, msg, mp1, mp2); @@ -2743,9 +2745,11 @@ break; case WM_CONTEXTMENU: case WM_COMMAND: +#ifdef UNICODE case EM_PASTE: case EM_CUT: case EM_COPY: +#endif return _entryproc(hWnd, msg, mp1, mp2); }