- 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.

svn path=/trunk/; revision=42313
This commit is contained in:
Gregor Schneider 2009-07-31 17:11:21 +00:00
parent a180d74579
commit d5ec42ec61

View file

@ -355,6 +355,14 @@ NtUserCreateCaret(
}
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;