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;

what's the value of _WIN32_IE ? Most likely your program did not define it.

Oh, do I need to define that before I can use those?

like..

#define _WIN32_IE 1000

yes, but use the hex form that's used in the code you originally posted. If you want to compile for versions of IE above IE5 then use 0x0500.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.