Author: gschneider
Date: Fri Jul 31 19:11:21 2009
New Revision: 42313
URL:
http://svn.reactos.org/svn/reactos?rev=42313&view=rev
Log:
- Use system wide caret width and height if one of those parameters is zero
- Ref:
http://msdn.microsoft.com/en-us/library/ms648399(VS.85).aspx
- Allows to show the caret in riched20a components (Wordpad f.e.)
See issue #1559 for more details.
Modified:
trunk/reactos/subsystems/win32/win32k/ntuser/caret.c
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/caret.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/caret.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/caret.c [iso-8859-1] Fri Jul 31 19:11:21
2009
@@ -355,6 +355,14 @@
}
else
{
+ if (nWidth == 0)
+ {
+ nWidth = UserGetSystemMetrics(SM_CXBORDER);
+ }
+ if (nHeight == 0)
+ {
+ nHeight = UserGetSystemMetrics(SM_CYBORDER);
+ }
ThreadQueue->CaretInfo->Bitmap = (HBITMAP)0;
ThreadQueue->CaretInfo->Size.cx = nWidth;
ThreadQueue->CaretInfo->Size.cy = nHeight;