Ignore:
Timestamp:
Mar 30, 2000, 5:39:10 PM (25 years ago)
Author:
cbratschi
Message:

treeview info tip

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/comctl32/CCBase.cpp

    r3182 r3280  
    1 /* $Id: CCBase.cpp,v 1.5 2000-03-21 17:30:40 cbratschi Exp $ */
     1/* $Id: CCBase.cpp,v 1.6 2000-03-30 15:39:08 cbratschi Exp $ */
    22/*
    33 * COMCTL32 Base Functions and Macros for all Controls
     
    180180}
    181181
     182LRESULT sendNotify(HWND hwndFrom,HWND hwndTo,UINT code)
     183{
     184  NMHDR nmhdr;
     185
     186  nmhdr.hwndFrom = hwndFrom;
     187  nmhdr.idFrom   = GetWindowLongA(hwndFrom,GWL_ID);
     188  nmhdr.code     = code;
     189
     190  return SendMessageA(hwndTo,WM_NOTIFY,nmhdr.idFrom,(LPARAM)&nmhdr);
     191}
     192
    182193LRESULT sendNotify(HWND hwnd,UINT code,LPNMHDR nmhdr)
    183194{
     
    189200
    190201  return SendMessageA(getNotifyWindow(hwnd),WM_NOTIFY,nmhdr->idFrom,(LPARAM)nmhdr);
     202}
     203
     204LRESULT sendNotify(HWND hwndFrom,HWND hwndTo,UINT code,LPNMHDR nmhdr)
     205{
     206  if (!nmhdr) return 0;
     207
     208  nmhdr->hwndFrom = hwndFrom;
     209  nmhdr->idFrom   = GetWindowLongA(hwndFrom,GWL_ID);
     210  nmhdr->code     = code;
     211
     212  return SendMessageA(hwndTo,WM_NOTIFY,nmhdr->idFrom,(LPARAM)nmhdr);
    191213}
    192214
     
    276298  DeleteObject(pen);
    277299}
     300
     301//string functions
     302
     303//compare ANSI with UNICODE string
     304INT lstrcmpAtoW(CHAR* textA,WCHAR* textW)
     305{
     306  INT len,res;
     307  WCHAR* tmp;
     308
     309  len = lstrlenA(textA);
     310  if (len > 0)
     311  {
     312    len++;
     313    tmp = (WCHAR*)COMCTL32_Alloc(len*sizeof(WCHAR));
     314    lstrcpyAtoW(tmp,textA);
     315  } else tmp = NULL;
     316
     317  res = lstrcmpW(tmp,textW);
     318
     319  if (tmp) COMCTL32_Free(tmp);
     320  return res;
     321}
Note: See TracChangeset for help on using the changeset viewer.