WGS.h
上传用户:garry_shen
上传日期:2015-04-15
资源大小:45647k
文件大小:1k
源码类别:

游戏引擎

开发平台:

Visual C++

  1. #ifndef __WGS
  2. #define __WGS
  3. #define MAXEDIT MAXPLAYERNAME
  4. #include <Stdio.h>
  5. #include "CEditBar.h"
  6. #include "CMessageList.h"
  7. struct Option
  8. {
  9. BOOL bSaveOption;
  10. TCHAR szName[MAXEDIT];
  11. TCHAR szPassword[MAXEDIT];
  12. };
  13. extern char szUserCount[];
  14. extern char szUserPassword[];
  15. class WGS
  16. {
  17. private:
  18. HWND hwnd;
  19. FILE *hSaveOption;
  20. Option option;
  21. TCHAR szSaveOption[512];
  22. BOOL bOk;
  23. BOOL bCancel;
  24. RECT rcWGS;
  25. RECT rcCheck;
  26. RECT rcOk;
  27. RECT rcCancel;
  28. RECT rcCaret;
  29. RECT rcName;
  30. RECT rcPassword;
  31. RECT rcSaveOption;
  32. RECT rcLine;
  33. RECT rcExit;
  34. RECT rcFont;
  35. RECT rectBulletin;
  36. CEditBar editName;
  37. CEditBar editPassword;
  38. HFONT font;
  39. HFONT font_big;
  40. BOOL bLink;
  41. CMessageList messlistBulletin;
  42. private:
  43. void LoadOption();
  44. void SaveOption();
  45. BOOL InitiateAllEdit();
  46. void DisableAllEdit();
  47. protected:
  48. public:
  49. WGS(){}
  50. ~WGS(){}
  51. BOOL Initiate(HWND hwnd);
  52. void Release();
  53. HRESULT ShowWGS(IDirectDrawSurface *lpdds,IDirectDrawSurface *lpddsWGS);
  54. void LButtonDown(int x,int y);
  55. int LButtonUp(int x,int y);
  56. void DoExit();
  57. int Enter();
  58. void Tab();
  59. void Exit(LPCTSTR lpstr);
  60. void PutCharAllEdit(WPARAM wParam,int iRepeat);
  61. void ControlAllEdit(WPARAM wParam);
  62. void SetUserName(){lstrcpy(szUserCount,editName.GetEdit());}
  63. void SetUserPassword(){lstrcpy(szUserPassword,editPassword.GetEdit());}
  64. void AddMessage(LPTSTR lpstr);
  65. };
  66. extern WGS wgs;
  67. #endif