[comctl32] implement header callback support (HDN_GETDISPINFO notification)

Vitaliy Margolen wine-devel at kievinfo.com
Mon Nov 14 20:02:34 CST 2005


Monday, November 14, 2005, 6:31:29 PM, Raphael wrote:
> Changelog:
>  - implement implement header callback support (HDN_GETDISPINFO notification):

Patch comments:
Please use the commonly accepted coding style in wine:
- Indents are 4 spaces (and spaces, not tabs)
- Curly brackets go to their own line:
  if (somethin)
  {
      do_this;
  }
  else
  {
      do_something_else;
  }

> @@ -601,6 +601,40 @@
Please add "-p" to diff so we can see what function this changes are to.

> +HEADER_SendHeaderDispInfoNotify(HWND hwnd, INT iItem, INT mask, NMHDDISPINFOW* pDispInfo)
You can't do this. Please respect unicodiness of the control. See other controls
(listvew, treeview for examples).

> +    /*FIXME("HEADER_SendHeaderDispInfoNotify\n");*/
Don't comment, delete.

> +    FIXME("SendMessage returns(mask:0x%x,str:%s,lParam:%p)\n",
> +         pDispInfo->mask,
> +         debugstr_w(pDispInfo->pszText),
> +         (void*) pDispInfo->lParam
> +         );
Why is this a FIXME? Don't add fixmes for no good reason. Use TRACE instead.

> +       HEADER_SendHeaderDispInfoNotify(hwnd, nItem, HDI_IMAGE, &dispInfo);
> +       if (dispInfo.mask & HDI_DI_SETITEM) {
> +         FIXME("NMHDDISPINFO returns with flags HDI_DI_SETITEM\n");
> +           lpItem->>iImage = dispInfo.iImage;
> +       }
There is no reason to print same fixme two times (once in
HEADER_SendHeaderDispInfoNotify an second time here).

> -        else if (lpItem->pszText == LPSTR_TEXTCALLBACKW) /* covers == TEXTCALLBACKA too */
> -            phdi->>pszText = LPSTR_TEXTCALLBACKW;
> +        else if (lpItem->pszText == LPSTR_TEXTCALLBACKW) { /* covers == TEXTCALLBACKA too */
> +         /*phdi->>pszText = LPSTR_TEXTCALLBACKW;*/
> +       NMHDDISPINFOW dispInfo; 
> +       HEADER_SendHeaderDispInfoNotify(hwnd, nItem, HDI_TEXT, &dispInfo);
This requires a test. I don't think native sends notify to the app for
HDM_GETITEM.

Vitaliy




More information about the wine-devel mailing list