41 #include "wine/unicode.h" 64 {
'C',
'C',
'I',
'P',
'3',
'2',
'S',
'u',
'b',
'c',
'l',
'a',
's',
's',
'I',
'n',
'f',
'o', 0 };
77 static const WCHAR dot[] = {
'.', 0};
84 for (
i = 0;
i < 4;
i++) {
122 TRACE(
"<-- %d\n", nmip.iValue);
134 for (
i = 0;
i < 4;
i++)
137 ERR(
"We subclassed the wrong window! (hwnd=%p)\n",
hwnd);
188 for (
i = 0;
i < 3;
i++) {
191 rect.left = rcPart.right;
194 rect.right = rcPart.left;
222 infoPtr = heap_alloc_zero (
sizeof(*infoPtr));
223 if (!infoPtr)
return -1;
228 fieldsize = (rcClient.
right - rcClient.
left) / 4;
230 edit.
top = rcClient.
top + 2;
233 infoPtr->Self =
hwnd;
234 infoPtr->Enabled =
TRUE;
243 for (
i = 0;
i < 4;
i++) {
248 edit.
left = rcClient.
left +
i*fieldsize + 6;
249 edit.
right = rcClient.
left + (
i+1)*fieldsize - 2;
275 for (
i = 0;
i < 4;
i++) {
292 for (
i = 0;
i < 4;
i++)
321 for (
i = 0;
i < 4;
i++)
336 for (
i = 0;
i < 4;
i++) {
369 for (
i = 0;
i < 4;
i++)
377 static const WCHAR fmt[] = {
'%',
'd', 0 };
382 for (
i = 3;
i >= 0;
i--) {
384 int value = ip_address & 0xff;
409 static const WCHAR fmt[] = {
'%',
'd', 0 };
411 int curValue, newValue;
414 TRACE(
"(currentfield=%d)\n", currentfield);
416 if (currentfield < 0 || currentfield > 3)
return FALSE;
418 part = &infoPtr->
Part[currentfield];
422 TRACE(
" curValue=%d\n", curValue);
425 TRACE(
" newValue=%d\n", newValue);
427 if (newValue < part->LowerLimit) newValue = part->
LowerLimit;
430 if (newValue == curValue)
return FALSE;
442 if(
cur >= -1 &&
cur < 4) {
519 if(
len == 2 && startsel==endsel && endsel==
len) {
528 }
else if (
len == 3 && startsel==endsel && endsel==
len)
530 else if (
len < 3 || startsel != endsel)
break;
531 }
else if(
c ==
'.' ||
c ==
' ') {
532 if(
len && startsel==endsel && startsel != 0) {
541 if(startsel==endsel && startsel==
len) {
547 if(startsel==0 && startsel==endsel &&
index > 0) {
553 if(startsel==endsel && startsel==0 &&
index > 0) {
HGDIOBJ WINAPI GetStockObject(_In_ int)
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
static const WCHAR invalid[]
static BOOL IPADDRESS_IsBlank(const IPADDRESS_INFO *infoPtr)
#define WM_SYSCOLORCHANGE
static int IPADDRESS_GetAddress(const IPADDRESS_INFO *infoPtr, LPDWORD ip_address)
static LRESULT IPADDRESS_Enable(IPADDRESS_INFO *infoPtr, BOOL enabled)
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
static LRESULT IPADDRESS_Notify(const IPADDRESS_INFO *infoPtr, UINT command)
BOOL WINAPI UnregisterClassW(_In_ LPCWSTR, HINSTANCE)
static BOOL IPADDRESS_GotoNextField(const IPADDRESS_INFO *infoPtr, int cur, int sel)
static HTHEME(WINAPI *pOpenThemeDataEx)(HWND
HWND WINAPI SetFocus(_In_opt_ HWND)
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
#define GetWindowLongPtrW
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
static LRESULT WINAPI IPADDRESS_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
HRESULT WINAPI DrawThemeBackground(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pRect, const RECT *pClipRect)
#define CreateWindowW(a, b, c, d, e, f, g, h, i, j, k)
GLenum GLenum GLsizei const GLuint GLboolean enabled
void IPADDRESS_Register(void)
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
COLORREF WINAPI SetBkColor(_In_ HDC, _In_ COLORREF)
GLenum GLuint GLenum GLsizei const GLchar * buf
BOOL WINAPI IsThemeBackgroundPartiallyTransparent(HTHEME hTheme, int iPartId, int iStateId)
ATOM WINAPI RegisterClassW(_In_ CONST WNDCLASSW *)
static LRESULT IPADDRESS_SetAddress(const IPADDRESS_INFO *infoPtr, DWORD ip_address)
LONG WINAPI SetWindowLongW(_In_ HWND, _In_ int, _In_ LONG)
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
BOOL WINAPI DrawEdge(_In_ HDC, _Inout_ LPRECT, _In_ UINT, _In_ UINT)
static LRESULT IPADDRESS_Paint(const IPADDRESS_INFO *infoPtr, HDC hdc)
static BOOL IPADDRESS_SetRange(IPADDRESS_INFO *infoPtr, int index, WORD range)
LONG WINAPI GetWindowLongW(_In_ HWND, _In_ int)
static INT IPADDRESS_IPNotify(const IPADDRESS_INFO *infoPtr, INT field, INT value)
HFONT WINAPI CreateFontIndirectW(_In_ const LOGFONTW *)
WINE_UNICODE_INLINE long int atolW(const WCHAR *str)
static void IPADDRESS_SetFocusToField(const IPADDRESS_INFO *infoPtr, INT index)
BOOL WINAPI InvalidateRgn(_In_ HWND, _In_opt_ HRGN, _In_ BOOL)
static void IPADDRESS_ClearAddress(const IPADDRESS_INFO *infoPtr)
HRESULT WINAPI DrawThemeParentBackground(HWND hwnd, HDC hdc, RECT *prc)
BOOL WINAPI SystemParametersInfoW(_In_ UINT, _In_ UINT, _Inout_opt_ PVOID, _In_ UINT)
static LRESULT CALLBACK IPADDRESS_SubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
BOOL WINAPI SetPropW(_In_ HWND, _In_ LPCWSTR, _In_opt_ HANDLE)
int WINAPI GetWindowTextLengthW(_In_ HWND)
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
static LRESULT IPADDRESS_Create(HWND hwnd, const CREATESTRUCTA *lpCreate)
HTHEME WINAPI OpenThemeData(HWND hwnd, LPCWSTR classlist)
WINE_DEFAULT_DEBUG_CHANNEL(ipaddress)
COMCTL32_SysColor comctl32_color
void IPADDRESS_Unregister(void)
static void IPADDRESS_UpdateText(const IPADDRESS_INFO *infoPtr)
GLsizei const GLfloat * value
HRESULT WINAPI GetThemeColor(HTHEME hTheme, int iPartId, int iStateId, int iPropId, COLORREF *pColor)
static LRESULT IPADDRESS_Draw(const IPADDRESS_INFO *infoPtr, HDC hdc)
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
COLORREF WINAPI SetTextColor(_In_ HDC, _In_ COLORREF)
static const WCHAR IP_SUBCLASS_PROP[]
int WINAPI GetObjectW(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
WINE_UNICODE_INLINE WCHAR * strcpyW(WCHAR *dst, const WCHAR *src)
static unsigned __int64 next
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
int WINAPI GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
WINE_UNICODE_INLINE WCHAR * strcatW(WCHAR *dst, const WCHAR *src)
static int IPADDRESS_GetPartIndex(const IPADDRESS_INFO *infoPtr, HWND hwnd)
HANDLE WINAPI GetPropW(_In_ HWND, _In_ LPCWSTR)
#define SPI_GETICONTITLELOGFONT
static LRESULT IPADDRESS_Destroy(IPADDRESS_INFO *infoPtr)
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
HWND WINAPI GetFocus(void)
LRESULT WINAPI CallWindowProcW(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
WCHAR lfFaceName[LF_FACESIZE]
BOOL COMCTL32_IsReflectedMessage(UINT uMsg) DECLSPEC_HIDDEN
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
#define SetWindowLongPtrW
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
VOID COMCTL32_RefreshSysColors(void) DECLSPEC_HIDDEN
static const WCHAR dotW[]
static BOOL IPADDRESS_ConstrainField(const IPADDRESS_INFO *infoPtr, int currentfield)
HRESULT WINAPI CloseThemeData(HTHEME hTheme)
HRESULT WINAPI DrawThemeText(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, LPCWSTR pszText, int iCharCount, DWORD dwTextFlags, DWORD dwTextFlags2, const RECT *pRect)
WINE_UNICODE_INLINE int atoiW(const WCHAR *str)
INT WINAPI DrawTextW(HDC hdc, LPCWSTR str, INT count, LPRECT rect, UINT flags)
static BOOL heap_free(void *mem)