Exemplo n.º 1
0
  void cImageControl::Create(cWindow& parent, const cBitmap& bitmap)
  {
    // Create the control
    control = ::CreateWindowEx(0, WC_STATIC, NULL, WS_VISIBLE | WS_CHILD | WS_CLIPSIBLINGS | SS_BITMAP, 0, 0, 0, 0, parent.GetWindowHandle(), 0, GetHInstance(), NULL);

    // Set the image
    SetImage(bitmap);

    parent.AddHandler(control, *this);
  }
Exemplo n.º 2
0
  void cLinkControl::Create(cWindow& parent, cLinkControlListener& listener, int idControl, const string_t& sText)
  {
    // Create the SysLink control
    control = ::CreateWindowEx(NULL, WC_LINK, sText.c_str(),
      WS_VISIBLE | WS_CHILD | WS_TABSTOP,
      50, 220, 100, 24,
      parent.GetWindowHandle(),
      (HMENU)NULL,
      ::GetModuleHandle(NULL), NULL
    );

    // Set the default font
    parent.SetControlDefaultFont(control);

    parent.AddHandler(control, *this);

    pListener = &listener;
  }