Ignore:
Timestamp:
07/02/08 19:10:39 (12 years ago)
Author:
Eoin
Message:

Freedom from automatic ATL and/or WTL namespaces.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/WTLx/NTray.cpp

    r395 r493  
    460460 
    461461#ifdef _AFX 
    462   CMenu* pSubMenu = m_Menu.GetSubMenu(0); 
     462  WTL::CMenu* pSubMenu = m_Menu.GetSubMenu(0); 
    463463  ATLASSERT(pSubMenu); //Your menu resource has been designed incorrectly 
    464464 
     
    466466  pSubMenu->SetDefaultItem(m_nDefaultMenuItem, m_bDefaultMenuItemByPos); 
    467467#else 
    468   CMenuHandle subMenu = m_Menu.GetSubMenu(0); 
     468  WTL::CMenuHandle subMenu = m_Menu.GetSubMenu(0); 
    469469  ATLASSERT(subMenu.IsMenu()); //Your menu resource has been designed incorrectly 
    470470 
     
    474474} 
    475475 
    476 CMenu& CTrayNotifyIcon::GetMenu() 
     476WTL::CMenu& CTrayNotifyIcon::GetMenu() 
    477477{ 
    478478  return m_Menu; 
     
    488488  { 
    489489  #ifdef _AFX 
    490     CMenu* pSubMenu = m_Menu.GetSubMenu(0); 
     490    WTL::CMenu* pSubMenu = m_Menu.GetSubMenu(0); 
    491491    ATLASSERT(pSubMenu); //Your menu resource has been designed incorrectly 
    492492 
    493493    pSubMenu->SetDefaultItem(m_nDefaultMenuItem, m_bDefaultMenuItemByPos); 
    494494  #else 
    495     CMenuHandle subMenu = m_Menu.GetSubMenu(0); 
     495    WTL::CMenuHandle subMenu = m_Menu.GetSubMenu(0); 
    496496    ATLASSERT(subMenu.IsMenu()); //Your menu resource has been designed incorrectly 
    497497 
     
    504504BOOL CTrayNotifyIcon::Create(CWnd* pNotifyWnd, UINT uID, LPCTSTR pszTooltipText, HICON hIcon, UINT nNotifyMessage, UINT uMenuID) 
    505505#else 
    506 BOOL CTrayNotifyIcon::Create(CWindow* pNotifyWnd, UINT uID, LPCTSTR pszTooltipText, HICON hIcon, UINT nNotifyMessage, UINT uMenuID) 
     506BOOL CTrayNotifyIcon::Create(ATL::CWindow* pNotifyWnd, UINT uID, LPCTSTR pszTooltipText, HICON hIcon, UINT nNotifyMessage, UINT uMenuID) 
    507507#endif 
    508508{ 
     
    533533  } 
    534534#ifdef _AFX 
    535   CMenu* pSubMenu = m_Menu.GetSubMenu(0); 
     535  WTL::CMenu* pSubMenu = m_Menu.GetSubMenu(0); 
    536536  if (!pSubMenu) 
    537537  { 
     
    542542  pSubMenu->SetDefaultItem(m_nDefaultMenuItem, m_bDefaultMenuItemByPos); 
    543543#else 
    544   CMenuHandle subMenu = m_Menu.GetSubMenu(0); 
     544  WTL::CMenuHandle subMenu = m_Menu.GetSubMenu(0); 
    545545  if (!subMenu.IsMenu()) 
    546546  { 
     
    586586} 
    587587 
    588 HICON CTrayNotifyIcon::BitmapToIcon(CBitmap* pBitmap) 
     588HICON CTrayNotifyIcon::BitmapToIcon(WTL::CBitmap* pBitmap) 
    589589{ 
    590590  //Validate our parameters 
     
    601601 
    602602  //Create a mask bitmap 
    603   CBitmap maskBitmap; 
     603  WTL::CBitmap maskBitmap; 
    604604#ifdef _AFX 
    605605  BOOL bSuccess = maskBitmap.CreateBitmap(w, h, 1, 1, pMask); 
     
    629629BOOL CTrayNotifyIcon::Create(CWnd* pNotifyWnd, UINT uID, LPCTSTR pszTooltipText, CBitmap* pBitmap, UINT nNotifyMessage, UINT uMenuID) 
    630630#else 
    631 BOOL CTrayNotifyIcon::Create(CWindow* pNotifyWnd, UINT uID, LPCTSTR pszTooltipText, CBitmap* pBitmap, UINT nNotifyMessage, UINT uMenuID) 
     631BOOL CTrayNotifyIcon::Create(ATL::CWindow* pNotifyWnd, UINT uID, LPCTSTR pszTooltipText, WTL::CBitmap* pBitmap, UINT nNotifyMessage, UINT uMenuID) 
    632632#endif 
    633633{ 
     
    644644BOOL CTrayNotifyIcon::Create(CWnd* pNotifyWnd, UINT uID, LPCTSTR pszTooltipText, HICON* phIcons, int nNumIcons, DWORD dwDelay, UINT nNotifyMessage, UINT uMenuID) 
    645645#else 
    646 BOOL CTrayNotifyIcon::Create(CWindow* pNotifyWnd, UINT uID, LPCTSTR pszTooltipText, HICON* phIcons, int nNumIcons, DWORD dwDelay, UINT nNotifyMessage, UINT uMenuID) 
     646BOOL CTrayNotifyIcon::Create(ATL::CWindow* pNotifyWnd, UINT uID, LPCTSTR pszTooltipText, HICON* phIcons, int nNumIcons, DWORD dwDelay, UINT nNotifyMessage, UINT uMenuID) 
    647647#endif 
    648648{ 
     
    664664BOOL CTrayNotifyIcon::Create(CWnd* pNotifyWnd, UINT uID, LPCTSTR pszTooltipText, LPCTSTR pszBalloonText, LPCTSTR pszBalloonCaption, UINT nTimeout, BalloonStyle style, HICON hIcon, UINT nNotifyMessage, UINT uMenuID, BOOL bNoSound) 
    665665#else 
    666 BOOL CTrayNotifyIcon::Create(CWindow* pNotifyWnd, UINT uID, LPCTSTR pszTooltipText, LPCTSTR pszBalloonText, LPCTSTR pszBalloonCaption, UINT nTimeout, BalloonStyle style, HICON hIcon, UINT nNotifyMessage, UINT uMenuID, BOOL bNoSound) 
     666BOOL CTrayNotifyIcon::Create(ATL::CWindow* pNotifyWnd, UINT uID, LPCTSTR pszTooltipText, LPCTSTR pszBalloonText, LPCTSTR pszBalloonCaption, UINT nTimeout, BalloonStyle style, HICON hIcon, UINT nNotifyMessage, UINT uMenuID, BOOL bNoSound) 
    667667#endif 
    668668{ 
     
    687687  } 
    688688#ifdef _AFX 
    689   CMenu* pSubMenu = m_Menu.GetSubMenu(0); 
     689  WTL::CMenu* pSubMenu = m_Menu.GetSubMenu(0); 
    690690  if (!pSubMenu) 
    691691  { 
     
    696696  pSubMenu->SetDefaultItem(m_nDefaultMenuItem, m_bDefaultMenuItemByPos); 
    697697#else 
    698   CMenuHandle subMenu = m_Menu.GetSubMenu(0); 
     698  WTL::CMenuHandle subMenu = m_Menu.GetSubMenu(0); 
    699699  if (!subMenu.IsMenu()) 
    700700  { 
     
    773773 
    774774#ifdef _AFX 
    775 BOOL CTrayNotifyIcon::Create(CWnd* pNotifyWnd, UINT uID, LPCTSTR pszTooltipText, LPCTSTR pszBalloonText, LPCTSTR pszBalloonCaption, UINT nTimeout, BalloonStyle style, CBitmap* pBitmap, UINT nNotifyMessage, UINT uMenuID, BOOL bNoSound) 
    776 #else 
    777 BOOL CTrayNotifyIcon::Create(CWindow* pNotifyWnd, UINT uID, LPCTSTR pszTooltipText, LPCTSTR pszBalloonText, LPCTSTR pszBalloonCaption, UINT nTimeout, BalloonStyle style, CBitmap* pBitmap, UINT nNotifyMessage, UINT uMenuID, BOOL bNoSound) 
     775BOOL CTrayNotifyIcon::Create(CWnd* pNotifyWnd, UINT uID, LPCTSTR pszTooltipText, LPCTSTR pszBalloonText, LPCTSTR pszBalloonCaption, UINT nTimeout, BalloonStyle style, WTL::CBitmap* pBitmap, UINT nNotifyMessage, UINT uMenuID, BOOL bNoSound) 
     776#else 
     777BOOL CTrayNotifyIcon::Create(ATL::CWindow* pNotifyWnd, UINT uID, LPCTSTR pszTooltipText, LPCTSTR pszBalloonText, LPCTSTR pszBalloonCaption, UINT nTimeout, BalloonStyle style, WTL::CBitmap* pBitmap, UINT nNotifyMessage, UINT uMenuID, BOOL bNoSound) 
    778778#endif 
    779779{ 
     
    790790BOOL CTrayNotifyIcon::Create(CWnd* pNotifyWnd, UINT uID, LPCTSTR pszTooltipText, LPCTSTR pszBalloonText, LPCTSTR pszBalloonCaption, UINT nTimeout, BalloonStyle style, HICON* phIcons, int nNumIcons, DWORD dwDelay, UINT nNotifyMessage, UINT uMenuID, BOOL bNoSound) 
    791791#else 
    792 BOOL CTrayNotifyIcon::Create(CWindow* pNotifyWnd, UINT uID, LPCTSTR pszTooltipText, LPCTSTR pszBalloonText, LPCTSTR pszBalloonCaption, UINT nTimeout, BalloonStyle style, HICON* phIcons, int nNumIcons, DWORD dwDelay, UINT nNotifyMessage, UINT uMenuID, BOOL bNoSound) 
     792BOOL CTrayNotifyIcon::Create(ATL::CWindow* pNotifyWnd, UINT uID, LPCTSTR pszTooltipText, LPCTSTR pszBalloonText, LPCTSTR pszBalloonCaption, UINT nTimeout, BalloonStyle style, HICON* phIcons, int nNumIcons, DWORD dwDelay, UINT nNotifyMessage, UINT uMenuID, BOOL bNoSound) 
    793793#endif 
    794794{ 
     
    949949} 
    950950 
    951 BOOL CTrayNotifyIcon::SetIcon(CBitmap* pBitmap) 
     951BOOL CTrayNotifyIcon::SetIcon(WTL::CBitmap* pBitmap) 
    952952{ 
    953953  //Convert the bitmap to an ICON 
     
    10421042BOOL CTrayNotifyIcon::SetNotificationWnd(CWnd* pNotifyWnd) 
    10431043#else 
    1044 BOOL CTrayNotifyIcon::SetNotificationWnd(CWindow* pNotifyWnd) 
     1044BOOL CTrayNotifyIcon::SetNotificationWnd(ATL::CWindow* pNotifyWnd) 
    10451045#endif 
    10461046{ 
     
    10891089CWnd* CTrayNotifyIcon::GetNotificationWnd() const 
    10901090#else 
    1091 CWindow* CTrayNotifyIcon::GetNotificationWnd() const 
     1091ATL::CWindow* CTrayNotifyIcon::GetNotificationWnd() const 
    10921092#endif 
    10931093{ 
     
    11131113  ATLASSERT(pSubMenu); //Your menu resource has been designed incorrectly 
    11141114#else 
    1115   CMenuHandle subMenu = m_Menu.GetSubMenu(0); 
     1115  WTL::CMenuHandle subMenu = m_Menu.GetSubMenu(0); 
    11161116  ATLASSERT(subMenu.IsMenu()); 
    11171117#endif 
     
    11191119  if (lEvent == WM_RBUTTONUP) 
    11201120  { 
    1121     CPoint ptCursor; 
     1121    WTL::CPoint ptCursor; 
    11221122    GetCursorPos(&ptCursor); 
    11231123    ::SetForegroundWindow(m_NotifyIconData.hWnd); 
     
    11441144} 
    11451145 
    1146 BOOL CTrayNotifyIcon::GetDynamicDCAndBitmap(CDC* pDC, CBitmap* pBitmap) 
     1146BOOL CTrayNotifyIcon::GetDynamicDCAndBitmap(WTL::CDC* pDC, WTL::CBitmap* pBitmap) 
    11471147{ 
    11481148  //Validate our parameters 
     
    11561156    return FALSE; 
    11571157#else 
    1158   CWindow WndScreen(::GetDesktopWindow()); 
     1158  ATL::CWindow WndScreen(::GetDesktopWindow()); 
    11591159  if (!WndScreen.IsWindow()) 
    11601160    return FALSE; 
     
    11671167    return FALSE; 
    11681168#else 
    1169   CDC DCScreen(WndScreen.GetDC()); 
     1169  WTL::CDC DCScreen(WndScreen.GetDC()); 
    11701170  if (DCScreen.IsNull()) 
    11711171    return FALSE; 
Note: See TracChangeset for help on using the changeset viewer.