{\r
STATUSWINDOWPART *part=NULL;\r
BOOL changed = FALSE;\r
- WORD oldStyle;\r
+ INT oldStyle;\r
\r
if (style & SBT_OWNERDRAW) {\r
TRACE("part %d, text %p\n",nPart,text);\r
oldStyle = part->style;\r
part->style = style;\r
if (style & SBT_OWNERDRAW) {\r
- if (part->text == text)\r
- return TRUE;\r
- part->text = (LPWSTR)text;\r
+ if (!(oldStyle & SBT_OWNERDRAW)) {\r
+ if (part->text)\r
+ Free (part->text);\r
+ } else if (part->text == text)\r
+ return TRUE;\r
+ part->text = (LPWSTR)text;\r
} else {\r
LPWSTR ntext;\r
\r