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 SBN_FIRST	((UINT)-880U)
#define SBN_LAST	((UINT)-899U)
#define PGN_FIRST	((UINT)-900U)
#define PGN_LAST	((UINT)-950U)
#endif /* _WIN32_IE >= 0x0400 */
/* Content of commctl.h ... */

typedef struct tagNMIPADDRESS{
	NMHDR hdr;
	int iField;
	int iValue;

This is the code I have used (This is inside WM_NOTIFY handler)..

     NMIPADDRESS sIPAddress;
     sIPAddress = (NMIPADDRESS) lParam;
     if (sIPAddress.iValue > 255 || sIPAddress.iValue < 0 )
         sIPAddress.iValue = 1;
         return sIPAddress;                      

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


#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.

This article has been dead for over six months. Start a new discussion instead.