summaryrefslogtreecommitdiff
path: root/alf/alfedit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'alf/alfedit.cpp')
-rw-r--r--alf/alfedit.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/alf/alfedit.cpp b/alf/alfedit.cpp
index fc1d876..bbe36b8 100644
--- a/alf/alfedit.cpp
+++ b/alf/alfedit.cpp
@@ -41,11 +41,12 @@ ALF__EditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT_P
} else if (uMsg == ALF_WM_APPLYSIZE) {
RECT *p = (RECT *)lParam;
+ // SWP_NOCOPYBITS as a bandaid since NT 3.51 doesn't invalidate properly
return (LRESULT)DeferWindowPos((HDWP)wParam,
hwnd, NULL,
p->left, p->top + 1,
p->right - p->left, p->bottom - p->top - 2,
- SWP_NOZORDER|SWP_NOACTIVATE);
+ SWP_NOZORDER|SWP_NOACTIVATE|SWP_NOCOPYBITS);
} else if (uMsg == WM_DESTROY) {
app->compatFn->RemoveWindowSubclass(hwnd, ALF__EditSubclassProc, 0);
}
@@ -56,10 +57,21 @@ ALF__EditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT_P
HWND
ALF_AddEdit(HWND win, WORD id, UINT x, UINT y, const TCHAR *text)
{
- HWND hwndEdit = CreateWindowEx(WS_EX_CLIENTEDGE,
+ DWORD exstyle;
+ DWORD style;
+
+ if (LOBYTE(LOWORD(GetVersion())) >= 4) {
+ exstyle = WS_EX_CLIENTEDGE;
+ style = 0;
+ } else {
+ exstyle = 0;
+ style = WS_BORDER;
+ }
+
+ HWND hwndEdit = CreateWindowEx(exstyle,
TEXT("EDIT"),
text,
- WS_CHILD | WS_VISIBLE | WS_TABSTOP,
+ WS_CHILD | WS_VISIBLE | WS_TABSTOP | style,
0, 0, 100, 100,
win,
(HMENU)(int)id,