Hey, I'm getting a errors from Dev-C++ (Windows XP Professional) about IPN_FIELDCHANGED and NMIPADDRESS.. it appears that they are both not recognised
In function `LRESULT WndProc(HWND__*, UINT, WPARAM, LPARAM)':
`IPN_FIELDCHANGED' undeclared (first use this function)
(Each undeclared identifier is reported only once for each function it appears in.)
`NMIPADDRESS' undeclared (first use this function)
I have made sure that I have used "#include <commctl.h>" and I have also checked inside commctl.h for references to this notification definition and structure definition and they are both there..
/* Content of commctl.h ... */
#if (_WIN32_IE >= 0x0400)
#define IPN_FIRST ((UINT)-860)
#define IPN_LAST ((UINT)-879)
#define IPN_FIELDCHANGED (IPN_FIRST-0)
#define SBN_FIRST ((UINT)-880U)
#define SBN_LAST ((UINT)-899U)
#define PGN_FIRST ((UINT)-900U)
#define PGN_LAST ((UINT)-950U)
#define PGN_SCROLL (PGN_FIRST-1)
#define PGN_CALCSIZE (PGN_FIRST-2)
#endif /* _WIN32_IE >= 0x0400 */
/* Content of commctl.h ... */
typedef struct tagNMIPADDRESS{
NMHDR hdr;
int iField;
int iValue;
} NMIPADDRESS, *LPNMIPADDRESS;
This is the code I have used (This is inside WM_NOTIFY handler)..
case IPN_FIELDCHANGED:
{
NMIPADDRESS sIPAddress;
sIPAddress = (NMIPADDRESS) lParam;
if (sIPAddress.iValue > 255 || sIPAddress.iValue < 0 )
{
sIPAddress.iValue = 1;
return sIPAddress;
}
}
break;