ZZB.cpp 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. // ZZB.cpp: implementation of the ZZB class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #include "stdafx.h"
  5. #include "YLGL.h"
  6. #include "ZZB.h"
  7. #ifdef _DEBUG
  8. #undef THIS_FILE
  9. static char THIS_FILE[]=__FILE__;
  10. #define new DEBUG_NEW
  11. #endif
  12. //////////////////////////////////////////////////////////////////////
  13. // Construction/Destruction
  14. //////////////////////////////////////////////////////////////////////
  15. ZZB::ZZB()
  16. {
  17. g_pMainWnd->GetSkin();
  18. }
  19. ZZB::~ZZB()
  20. {
  21. }
  22. void ZZB::OnFSCommand(LPCTSTR command, LPCTSTR args)
  23. {
  24. }
  25. void ZZB::Init()
  26. {
  27. Graphics graph(m_pBk);
  28. Image *img=NULL;
  29. ::LoadImageFromBuf (&img, g_mainpath+"\\ͼƬ\\ÕÆÖб¦.jpg");
  30. if(img)
  31. {
  32. graph.DrawImage(img, 0,0);
  33. delete img;
  34. }
  35. }
  36. void ZZB::Destory()
  37. {
  38. }
  39. void ZZB::BtnClick(WPARAM wParam, LPARAM lParam)
  40. {
  41. int id=lParam;
  42. id-=99;
  43. switch(id)
  44. {
  45. case 1:
  46. CDialog::OnOK ();
  47. break;
  48. case 2:
  49. CDialog::OnCancel ();
  50. break;
  51. }
  52. }
  53. BOOL ZZB::PreTransMsg(MSG* pMsg)
  54. {
  55. if(pMsg->message==WM_KEYDOWN)
  56. {
  57. switch (pMsg->wParam)
  58. {
  59. case VK_RETURN:
  60. CDialog::OnOK ();
  61. return 1;
  62. }
  63. }
  64. else if(pMsg->message==WM_LBUTTONDOWN)
  65. {
  66. g_bNeedDrawParent=1;
  67. }
  68. return CDialog::PreTranslateMessage(pMsg);
  69. }