home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / winfe / tooltip.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.0 KB  |  84 lines

  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * The contents of this file are subject to the Netscape Public License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  *
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  *
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18. #include "stdafx.h"
  19. #include "prtypes.h"
  20. #include "tooltip.h"
  21.  
  22. #ifndef XP_WIN32
  23. #ifdef FEATURE_TOOLTIPS
  24. #include "tooltip.i01"
  25. #endif
  26. #else
  27.  
  28. CNSToolTip2::CNSToolTip2()
  29. {
  30. }
  31.  
  32.  
  33. CNSToolTip2::~CNSToolTip2()
  34. {
  35. }
  36.  
  37.  
  38. LRESULT CNSToolTip2::WindowProc( UINT message, WPARAM wParam, LPARAM lParam )
  39. {
  40.  
  41.     if(sysInfo.m_bOverrideWin95Tooltips)
  42.     {
  43.         switch(message)
  44.         {
  45.             case TTM_ADDTOOL:
  46.             case TTM_DELTOOL:
  47.             case TTM_ENUMTOOLS:
  48.             case TTM_GETCURRENTTOOL:
  49.             case TTM_GETTEXT:
  50.             case TTM_GETTOOLINFO:
  51.             case TTM_NEWTOOLRECT:
  52.             case TTM_SETTOOLINFO:
  53.             case TTM_UPDATETIPTEXT:
  54.                 ((LPTOOLINFO)lParam)->cbSize = (3 * sizeof(UINT)) + sizeof(HWND) + sizeof(RECT) + sizeof(HINSTANCE)
  55.                     + sizeof(LPSTR);
  56.                 break;
  57.  
  58.             case TTM_HITTEST:
  59.                 ((LPHITTESTINFO)lParam)->ti.cbSize = (3 * sizeof(UINT)) + sizeof(HWND) + sizeof(RECT) + sizeof(HINSTANCE)
  60.                     + sizeof(LPSTR);
  61.                 break;
  62.         }
  63.     }
  64.     return CToolTipCtrl::WindowProc(message, wParam, lParam);
  65.  
  66.  
  67. }
  68.  
  69. BEGIN_MESSAGE_MAP(CNSToolTip2, CToolTipCtrl)
  70.     //{{AFX_MSG_MAP(CNSToolTip2)
  71.     //}}AFX_MSG_MAP
  72. END_MESSAGE_MAP()
  73.  
  74. void CNSToolTip2::SetCSID(int csid)
  75. {
  76. }
  77.  
  78. void CNSToolTip2::SetBounding(int *coord, int num, int x, int y)
  79. {
  80. }
  81.  
  82. #endif
  83.  
  84.