<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
<style type="text/css">p, li { white-space: pre-wrap; }
</style>
<p style="margin: 0px; text-indent: 0px;">This edit control change passes on XP and fails in WINE.<br></p><p style="margin: 0px; text-indent: 0px;">---<br></p><p style="margin: 0px; text-indent: 0px;"><br></p><p style="margin: 0px; text-indent: 0px;">&nbsp;dlls/user32/tests/edit.c |   75 ++++++++++++++++++++++++++++++++++++++++++++++
<p style="margin: 0px; text-indent: 0px;"> 1 files changed, 75 insertions(+), 0 deletions(-)</p>
<p style="margin: 0px; text-indent: 0px;"></p>
<p style="margin: 0px; text-indent: 0px;">diff --git a/dlls/user32/tests/edit.c b/dlls/user32/tests/edit.c</p>
<p style="margin: 0px; text-indent: 0px;">index 5ca012e..45f579d 100644</p>
<p style="margin: 0px; text-indent: 0px;">--- a/dlls/user32/tests/edit.c</p>
<p style="margin: 0px; text-indent: 0px;">+++ b/dlls/user32/tests/edit.c</p>
<p style="margin: 0px; text-indent: 0px;">@@ -36,6 +36,7 @@ struct edit_notify {</p>
<p style="margin: 0px; text-indent: 0px;">     int en_change, en_maxtext, en_update;</p>
<p style="margin: 0px; text-indent: 0px;"> };</p>
<p style="margin: 0px; text-indent: 0px;"> </p>
<p style="margin: 0px; text-indent: 0px;">+WNDPROC editWndProc;</p>
<p style="margin: 0px; text-indent: 0px;"> static struct edit_notify notifications;</p>
<p style="margin: 0px; text-indent: 0px;"> </p>
<p style="margin: 0px; text-indent: 0px;"> static INT_PTR CALLBACK multi_edit_dialog_proc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam)</p>
<p style="margin: 0px; text-indent: 0px;">@@ -533,6 +534,63 @@ static INT_PTR CALLBACK edit_wantreturn_dialog_proc(HWND hdlg, UINT msg, WPARAM</p>
<p style="margin: 0px; text-indent: 0px;">     return FALSE;</p>
<p style="margin: 0px; text-indent: 0px;"> }</p>
<p style="margin: 0px; text-indent: 0px;"> </p>
<p style="margin: 0px; text-indent: 0px;">+static INT_PTR CALLBACK edit_control_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)</p>
<p style="margin: 0px; text-indent: 0px;">+{</p>
<p style="margin: 0px; text-indent: 0px;">+    static int timerCount = 0;</p>
<p style="margin: 0px; text-indent: 0px;">+    HGLOBAL cbData;</p>
<p style="margin: 0px; text-indent: 0px;">+    LPTSTR lptStrCopy;</p>
<p style="margin: 0px; text-indent: 0px;">+    LPARAM mousePos;</p>
<p style="margin: 0px; text-indent: 0px;">+    HWND findHwnd;</p>
<p style="margin: 0px; text-indent: 0px;">+    RECT winRect;</p>
<p style="margin: 0px; text-indent: 0px;">+</p>
<p style="margin: 0px; text-indent: 0px;">+    ok(msg != WM_COMMAND, "Should not have received WM_COMMAND\n");</p>
<p style="margin: 0px; text-indent: 0px;">+</p>
<p style="margin: 0px; text-indent: 0px;">+    switch(msg)</p>
<p style="margin: 0px; text-indent: 0px;">+    {</p>
<p style="margin: 0px; text-indent: 0px;">+        case WM_TIMER:</p>
<p style="margin: 0px; text-indent: 0px;">+            switch(timerCount)</p>
<p style="margin: 0px; text-indent: 0px;">+            {</p>
<p style="margin: 0px; text-indent: 0px;">+                case 0:</p>
<p style="margin: 0px; text-indent: 0px;">+                    /* Copy some data to clipboard */</p>
<p style="margin: 0px; text-indent: 0px;">+                    cbData = GlobalAlloc(GMEM_MOVEABLE, 5);</p>
<p style="margin: 0px; text-indent: 0px;">+                    lptStrCopy = (TCHAR*)GlobalLock(cbData);</p>
<p style="margin: 0px; text-indent: 0px;">+                    memcpy(lptStrCopy, "test", 4);</p>
<p style="margin: 0px; text-indent: 0px;">+                    OpenClipboard(hwnd);</p>
<p style="margin: 0px; text-indent: 0px;">+                    SetClipboardData(CF_TEXT, cbData);</p>
<p style="margin: 0px; text-indent: 0px;">+                    CloseClipboard();</p>
<p style="margin: 0px; text-indent: 0px;">+</p>
<p style="margin: 0px; text-indent: 0px;">+                    /* Move mouse to upper left of text control */</p>
<p style="margin: 0px; text-indent: 0px;">+                    GetWindowRect(hwnd, &amp;winRect);</p>
<p style="margin: 0px; text-indent: 0px;">+                    SetCursorPos(winRect.left, winRect.top);</p>
<p style="margin: 0px; text-indent: 0px;">+                    mousePos = MAKELPARAM(winRect.left + 20, winRect.top + 20);</p>
<p style="margin: 0px; text-indent: 0px;">+                    /* Show the Context Menu */</p>
<p style="margin: 0px; text-indent: 0px;">+                    PostMessage(hwnd, WM_CONTEXTMENU, (WPARAM)hwnd, mousePos);</p>
<p style="margin: 0px; text-indent: 0px;">+                    break;</p>
<p style="margin: 0px; text-indent: 0px;">+                case 1:</p>
<p style="margin: 0px; text-indent: 0px;">+                case 2:</p>
<p style="margin: 0px; text-indent: 0px;">+                case 3:</p>
<p style="margin: 0px; text-indent: 0px;">+                case 4:</p>
<p style="margin: 0px; text-indent: 0px;">+                    /* Find the menu window and send keydown */</p>
<p style="margin: 0px; text-indent: 0px;">+                    findHwnd = FindWindowEx(NULL, NULL, MAKEINTATOM(0x8000), NULL);</p>
<p style="margin: 0px; text-indent: 0px;">+                    PostMessage(findHwnd, WM_KEYDOWN, VK_DOWN,0);</p>
<p style="margin: 0px; text-indent: 0px;">+                    break;</p>
<p style="margin: 0px; text-indent: 0px;">+                case 5:</p>
<p style="margin: 0px; text-indent: 0px;">+                    /* Find the menu window and send return, selecting the menu item */</p>
<p style="margin: 0px; text-indent: 0px;">+                    findHwnd = FindWindowEx(NULL, NULL, MAKEINTATOM(0x8000), NULL);</p>
<p style="margin: 0px; text-indent: 0px;">+                    PostMessage(findHwnd, WM_KEYDOWN, VK_RETURN,0);</p>
<p style="margin: 0px; text-indent: 0px;">+                    break;</p>
<p style="margin: 0px; text-indent: 0px;">+                case 6:</p>
<p style="margin: 0px; text-indent: 0px;">+                    KillTimer(hwnd, 1);</p>
<p style="margin: 0px; text-indent: 0px;">+                    PostQuitMessage(0);</p>
<p style="margin: 0px; text-indent: 0px;">+                    break;</p>
<p style="margin: 0px; text-indent: 0px;">+            }</p>
<p style="margin: 0px; text-indent: 0px;">+            timerCount++;</p>
<p style="margin: 0px; text-indent: 0px;">+            break;</p>
<p style="margin: 0px; text-indent: 0px;">+    }</p>
<p style="margin: 0px; text-indent: 0px;">+</p>
<p style="margin: 0px; text-indent: 0px;">+    return CallWindowProc(editWndProc, hwnd, msg, wparam, lparam);</p>
<p style="margin: 0px; text-indent: 0px;">+}</p>
<p style="margin: 0px; text-indent: 0px;">+</p>
<p style="margin: 0px; text-indent: 0px;"> static HINSTANCE hinst;</p>
<p style="margin: 0px; text-indent: 0px;"> static HWND hwndET2;</p>
<p style="margin: 0px; text-indent: 0px;"> static const char szEditTest2Class[] = "EditTest2Class";</p>
<p style="margin: 0px; text-indent: 0px;">@@ -2260,6 +2318,22 @@ static void test_dialogmode(void)</p>
<p style="margin: 0px; text-indent: 0px;">     destroy_child_editcontrol(hwEdit);</p>
<p style="margin: 0px; text-indent: 0px;"> }</p>
<p style="margin: 0px; text-indent: 0px;"> </p>
<p style="margin: 0px; text-indent: 0px;">+static void test_contextmenu(void)</p>
<p style="margin: 0px; text-indent: 0px;">+{</p>
<p style="margin: 0px; text-indent: 0px;">+    HWND hwEdit;</p>
<p style="margin: 0px; text-indent: 0px;">+    LONG Timer1;</p>
<p style="margin: 0px; text-indent: 0px;">+    hwEdit = create_editcontrol(ES_AUTOHSCROLL | ES_AUTOVSCROLL, 0);</p>
<p style="margin: 0px; text-indent: 0px;">+    editWndProc = (WNDPROC)SetWindowLong(hwEdit, GWL_WNDPROC,(LONG)edit_control_wndproc);</p>
<p style="margin: 0px; text-indent: 0px;">+    ShowWindow(hwEdit, 1);</p>
<p style="margin: 0px; text-indent: 0px;">+    Timer1 = SetTimer(hwEdit, 1, 100, NULL);</p>
<p style="margin: 0px; text-indent: 0px;">+    MSG msg;</p>
<p style="margin: 0px; text-indent: 0px;">+    while (GetMessage(&amp;msg, 0, 0, 0) &gt; 0)</p>
<p style="margin: 0px; text-indent: 0px;">+    {</p>
<p style="margin: 0px; text-indent: 0px;">+        TranslateMessage(&amp;msg);</p>
<p style="margin: 0px; text-indent: 0px;">+        DispatchMessage(&amp;msg);</p>
<p style="margin: 0px; text-indent: 0px;">+    }</p>
<p style="margin: 0px; text-indent: 0px;">+}</p>
<p style="margin: 0px; text-indent: 0px;">+</p>
<p style="margin: 0px; text-indent: 0px;"> START_TEST(edit)</p>
<p style="margin: 0px; text-indent: 0px;"> {</p>
<p style="margin: 0px; text-indent: 0px;">     hinst = GetModuleHandleA(NULL);</p>
<p style="margin: 0px; text-indent: 0px;">@@ -2285,6 +2359,7 @@ START_TEST(edit)</p>
<p style="margin: 0px; text-indent: 0px;">     test_child_edit_wmkeydown();</p>
<p style="margin: 0px; text-indent: 0px;">     test_fontsize();</p>
<p style="margin: 0px; text-indent: 0px;">     test_dialogmode();</p>
<p style="margin: 0px; text-indent: 0px;">+    test_contextmenu();</p>
<p style="margin: 0px; text-indent: 0px;"> </p>
<p style="margin: 0px; text-indent: 0px;">     UnregisterWindowClasses();</p>
<p style="margin: 0px; text-indent: 0px;"> }</p>
<p style="margin: 0px; text-indent: 0px;"><!--EndFragment--></p><p style="margin: 0px; text-indent: 0px;"><!--EndFragment--></p></p><p style="margin: 0px; text-indent: 0px;"><!--EndFragment--></p>                                               <br /><hr />Hotmail: Powerful Free email with security by Microsoft. <a href='http://clk.atdmt.com/GBL/go/171222986/direct/01/' target='_new'>Get it now.</a></body>
</html>