⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 comctl32_ros.diff

📁 winNT技术操作系统,国外开放的原代码和LIUX一样
💻 DIFF
字号:
Index: listview.c
===================================================================
--- listview.c	(revision 23123)
+++ listview.c	(working copy)
@@ -3777,9 +3777,8 @@
     if (himl && lvItem.iImage >= 0 && !IsRectEmpty(&rcIcon))
     {
         TRACE("iImage=%d\n", lvItem.iImage);
+        ImageList_Draw(himl, lvItem.iImage, hdc, rcIcon.left, rcIcon.top,
+                       (lvItem.state & LVIS_SELECTED) && (infoPtr->bFocus) ? ILD_SELECTED : ILD_NORMAL);
-        ImageList_DrawEx(himl, lvItem.iImage, hdc, rcIcon.left, rcIcon.top,
-                         rcIcon.right - rcIcon.left, rcIcon.bottom - rcIcon.top, infoPtr->clrBk, CLR_DEFAULT,
-                         (lvItem.state & LVIS_SELECTED) && (infoPtr->bFocus) ? ILD_SELECTED : ILD_NORMAL);
     }
 
     /* Don't bother painting item being edited */
Index: propsheet.c
===================================================================
--- propsheet.c	(revision 25766)
+++ propsheet.c	(working copy)
@@ -2422,6 +2422,28 @@
   return FALSE;
 }
 
+BOOL CALLBACK
+EnumChildProc(HWND hwnd, LPARAM lParam)
+{
+    WCHAR szType[20];
+    RealGetWindowClassW(hwnd, szType, 20);
+
+    if (strcmpW(szType, WC_EDITW) == 0)
+    {
+        if (IsWindowEnabled(hwnd) && IsWindowVisible(hwnd))
+        {
+            SetFocus(hwnd);
+            return FALSE;
+        }
+    } 
+    else
+    {
+        EnumChildWindows(hwnd, EnumChildProc, 0);
+    }
+
+    return TRUE;
+}
+
 /******************************************************************************
  *            PROPSHEET_SetWizButtons
  *
@@ -2444,17 +2466,6 @@
   EnableWindow(hwndNext, FALSE);
   EnableWindow(hwndFinish, FALSE);
 
-  /* set the default pushbutton to an enabled button */
-  if (((dwFlags & PSWIZB_FINISH) || psInfo->hasFinish) && !(dwFlags & PSWIZB_DISABLEDFINISH))
-    SendMessageW(hwndDlg, DM_SETDEFID, IDC_FINISH_BUTTON, 0);
-  else if (dwFlags & PSWIZB_NEXT)
-    SendMessageW(hwndDlg, DM_SETDEFID, IDC_NEXT_BUTTON, 0);
-  else if (dwFlags & PSWIZB_BACK)
-    SendMessageW(hwndDlg, DM_SETDEFID, IDC_BACK_BUTTON, 0);
-  else
-    SendMessageW(hwndDlg, DM_SETDEFID, IDCANCEL, 0);
-
-
   if (dwFlags & PSWIZB_BACK)
     EnableWindow(hwndBack, TRUE);
 
@@ -2484,6 +2495,32 @@
   }
   else if (!(dwFlags & PSWIZB_DISABLEDFINISH))
     EnableWindow(hwndFinish, TRUE);
+
+  /* set the default pushbutton to an enabled button and give it focus */
+  if (((dwFlags & PSWIZB_FINISH) || psInfo->hasFinish) && !(dwFlags & PSWIZB_DISABLEDFINISH))
+  {
+    SendMessageW(hwndDlg, DM_SETDEFID, IDC_FINISH_BUTTON, 0);
+    SetFocus(hwndFinish);
+  }
+  else if (dwFlags & PSWIZB_NEXT)
+  {
+    SendMessageW(hwndDlg, DM_SETDEFID, IDC_NEXT_BUTTON, 0);
+    SetFocus(hwndNext);
+  }
+  else if (dwFlags & PSWIZB_BACK)
+  {
+    SendMessageW(hwndDlg, DM_SETDEFID, IDC_BACK_BUTTON, 0);
+    SetFocus(hwndBack);
+  }
+  else
+  {
+    SendMessageW(hwndDlg, DM_SETDEFID, IDCANCEL, 0);
+    SetFocus(GetDlgItem(hwndDlg, IDCANCEL));
+  }
+
+  /* Now try to find an edit control that deserves focus */
+  EnumChildWindows(PropSheet_GetCurrentPageHwnd(hwndDlg), EnumChildProc, 0);
+  
 }
 
 /******************************************************************************
@@ -3548,7 +3585,7 @@
 
       return FALSE;
     }
-  
+
     case WM_SYSCOLORCHANGE:
       COMCTL32_RefreshSysColors();
       return FALSE;

Index: tooltips.c
===================================================================
--- tooltips.c	(revision 25790)
+++ tooltips.c	(working copy)
@@ -2450,7 +2450,34 @@
 TOOLTIPS_NotifyFormat (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
     FIXME ("hwnd=%p wParam=%x lParam=%lx\n", hwnd, wParam, lParam);
+    TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
+    TTTOOL_INFO *toolPtr = infoPtr->tools;
+    INT nResult;
 
+    if (lParam == NF_QUERY)
+    {
+        if (toolPtr->bNotifyUnicode)
+        {
+            return NFR_UNICODE;
+        } else {
+            return NFR_ANSI;
+        }
+    }
+    else if (lParam == NF_REQUERY)
+    {
+        nResult = (INT) SendMessageW (toolPtr->hwnd, WM_NOTIFYFORMAT,
+                    (WPARAM)hwnd, (LPARAM)NF_QUERY);
+        if (nResult == NFR_ANSI) {
+            toolPtr->bNotifyUnicode = FALSE;
+        TRACE(" -- WM_NOTIFYFORMAT returns: NFR_ANSI\n");
+        } else if (nResult == NFR_UNICODE) {
+            toolPtr->bNotifyUnicode = TRUE;
+        TRACE(" -- WM_NOTIFYFORMAT returns: NFR_UNICODE\n");
+        } else {
+            TRACE (" -- WM_NOTIFYFORMAT returns: error!\n");
+        }
+        return nResult;
+    }
     return 0;
 }
 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -