Created
July 21, 2011 16:52
-
-
Save sim642/1097612 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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() | |
{ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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