Skip to content

Instantly share code, notes, and snippets.

@sim642
Created July 21, 2011 16:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sim642/1097612 to your computer and use it in GitHub Desktop.
Save sim642/1097612 to your computer and use it in GitHub Desktop.
#include "IpAddressControl.h"
#include <CommCtrl.h>
using namespace Goop;
IpAddressControl::IpAddressControl(Base *parent)
{
HINSTANCE instanceHandle = GetModuleHandle( NULL );
m_handle = (HWND)CreateWindowExW(0, WC_IPADDRESS, L"", WS_CHILD | WS_OVERLAPPED, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, 0, 0, instanceHandle, 0);
InitializeBase();
m_defaultProcess = SetWindowLongPtr(m_handle, GWLP_WNDPROC, (LONG_PTR)Base::Process);
SetParent(parent);
Show();
}
IpAddressControl::~IpAddressControl()
{
}
#ifndef IPADDRESSCONTROL_H
#define IPADDRESSCONTROL_H
#include "Base.h"
namespace Goop
{
class IpAddressControl : public Base
{
public:
GOOP_API IpAddressControl(Base *parent = 0);
GOOP_API ~IpAddressControl();
private:
};
}
#endif
#include "examples.h"
using namespace Goop;
void IpAddressExample(TabContainer *tabContainer)
{
g_outputBox->AppendText(TEXT("Created IpAddress Example tab\n"));
Tab *tab = tabContainer->AddTab(TEXT("IpAddress"));
IpAddressControl *control = new IpAddressControl(tab);
control->SetPosition(Vector2D(320, 10));
control->SetSize(Vector2D(150, 20));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment