comctl32/syslink: Implement LWS_IGNORERETURN.

oldstable
Nikolay Sivov 2009-10-20 21:55:12 +04:00 committed by Alexandre Julliard
parent b853de8038
commit e98687f425
2 changed files with 5 additions and 2 deletions

View File

@ -96,6 +96,7 @@ typedef struct
COLORREF VisitedColor; /* Color of visited links */
COLORREF BackColor; /* Background color, set on creation */
WCHAR BreakChar; /* Break Character for the current font */
BOOL IgnoreReturn; /* (infoPtr->Style & LWS_IGNORERETURN) on creation */
} SYSLINK_INFO;
static const WCHAR SL_LINKOPEN[] = { '<','a', 0 };
@ -1451,13 +1452,13 @@ static LRESULT SYSLINK_LButtonUp (SYSLINK_INFO *infoPtr, const POINT *pt)
*/
static BOOL SYSLINK_OnEnter (const SYSLINK_INFO *infoPtr)
{
if(infoPtr->HasFocus)
if(infoPtr->HasFocus && !infoPtr->IgnoreReturn)
{
PDOC_ITEM Focus;
int id;
Focus = SYSLINK_GetFocusLink(infoPtr, &id);
if(Focus != NULL)
if(Focus)
{
SYSLINK_SendParentNotify(infoPtr, NM_RETURN, Focus, id);
return TRUE;
@ -1753,6 +1754,7 @@ static LRESULT WINAPI SysLinkWindowProc(HWND hwnd, UINT message,
infoPtr->BackColor = infoPtr->Style & LWS_TRANSPARENT ?
comctl32_color.clrWindow : comctl32_color.clrBtnFace;
infoPtr->BreakChar = ' ';
infoPtr->IgnoreReturn = infoPtr->Style & LWS_IGNORERETURN;
TRACE("SysLink Ctrl creation, hwnd=%p\n", hwnd);
SYSLINK_SetText(infoPtr, ((LPCREATESTRUCTW)lParam)->lpszName);
return 0;

View File

@ -5054,6 +5054,7 @@ static const WCHAR WC_LINK[] = { 'S','y','s','L','i','n','k',0 };
/* SysLink styles */
#define LWS_TRANSPARENT 0x0001
#define LWS_IGNORERETURN 0x0002
/* SysLink messages */
#define LM_HITTEST (WM_USER + 768)