Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.2 KiB

  1. //
  2. // mxToolKit (c) 1999 by Mete Ciragan
  3. //
  4. // file: mxLabel.cpp
  5. // implementation: Win32 API
  6. // last modified: Mar 18 1999, Mete Ciragan
  7. // copyright: The programs and associated files contained in this
  8. // distribution were developed by Mete Ciragan. The programs
  9. // are not in the public domain, but they are freely
  10. // distributable without licensing fees. These programs are
  11. // provided without guarantee or warrantee expressed or
  12. // implied.
  13. //
  14. #include "mxtk/mxLabel.h"
  15. #include <windows.h>
  16. class mxLabel_i
  17. {
  18. public:
  19. int dummy;
  20. };
  21. mxLabel::mxLabel (mxWindow *parent, int x, int y, int w, int h, const char *label)
  22. : mxWidget (parent, x, y, w, h, label)
  23. {
  24. if (!parent)
  25. return;
  26. HWND hwndParent = (HWND) ((mxWidget *) parent)->getHandle ();
  27. void *handle = (void *) CreateWindowEx (0, "STATIC", label, WS_VISIBLE | WS_CHILD,
  28. x, y, w, h, hwndParent,
  29. (HMENU) NULL, (HINSTANCE) GetModuleHandle (NULL), NULL);
  30. SendMessage ((HWND) handle, WM_SETFONT, (WPARAM) (HFONT) GetStockObject (ANSI_VAR_FONT), MAKELPARAM (TRUE, 0));
  31. setHandle (handle);
  32. setType (MX_LABEL);
  33. setParent (parent);
  34. }
  35. mxLabel::~mxLabel ()
  36. {
  37. }