gfx.h
上传用户:wujian85
上传日期:2010-04-08
资源大小:227k
文件大小:2k
源码类别:

对话框与窗口

开发平台:

Visual C++

  1. #ifndef __GFX_GLOBAL_INCLUDE
  2. #define __GFX_GLOBAL_INCLUDE
  3. // TAB SUPPORT
  4. #define GfxAddTabItem(m_ctlTab, nId, pText)
  5. {
  6. TC_ITEM TabCtrlItem;
  7. TabCtrlItem.mask = TCIF_TEXT;
  8. TabCtrlItem.pszText = pText;
  9. m_ctlTab.InsertItem( nId, &TabCtrlItem );
  10. }
  11. #define GfxTabSupport(numDialog) CDialog * __gfxTabDialog[numDialog];
  12. #define GfxInitTabSupport(numDialog) ZeroMemory(__gfxTabDialog, sizeof(CDialog *) * numDialog);
  13. #define GfxSetTabDialog(numDialog, pDialog) __gfxTabDialog[numDialog] = (CDialog *) pDialog;
  14. #define GfxSwitchTabDialog(numDialog, maxDialog)
  15. {
  16. for (int __gfxT = 0; __gfxT < maxDialog; __gfxT++)
  17. {
  18. if (__gfxT == numDialog) 
  19. __gfxTabDialog[__gfxT]->ShowWindow(SW_SHOW); 
  20. else 
  21. __gfxTabDialog[__gfxT]->ShowWindow(SW_HIDE); 
  22. }
  23. }
  24. #define GfxResizeTabDialog(tab, cx, cy)
  25. {
  26. if (tab.GetSafeHwnd())
  27. {
  28. tab.SetWindowPos(0,2,2,cx-4,cy-4,SWP_NOZORDER);
  29. for (int __gfxT = 0; __gfxT < iNumDialog; __gfxT++)
  30. {
  31. if (__gfxTabDialog[__gfxT] && __gfxTabDialog[__gfxT]->GetSafeHwnd())
  32. __gfxTabDialog[__gfxT]->SetWindowPos(0,2,27,cx-8,cy-34,SWP_NOZORDER);
  33. }
  34. }
  35. }
  36. // RECT SUPPORT
  37. bool RectInRect(CRect &rc1, CRect &rc2);
  38. void GfxRectPerDouble(CRect &rc, const double &db);
  39. bool GfxPumpMessage();
  40. bool GfxParseBiText(CString &cs1, CString &cs2, const int id);
  41. void GfxGlobalFree(HGLOBAL hGlobal);
  42. void GfxFormatKm(CString &cs, long lKm);
  43. int GfxGetColumnSubItem(CListCtrl * pList, const int iSub);
  44. CString Format_CFileException(CFileException * e);
  45. #endif