J
JDT
NM_UPDOWN
With UDN_DELTAPOS notification handler, MS passes a pointer to NMHDR
which yo can cast to NM_UPDOWN*. With NMHDR (shown below) , you can use
"iDelta" to know the amount it spins while with NMHDR you can use "code"
to know the event type. What I don't understand is why the same storage
(the overlap of the last int and unsigned int) can provide two different
values by casting. Is it not union, is it? This is a C++ (or even a C)
question. If I underhand it, I may exploit the same tech for my own.
Your advise is appreciated. JD
typedef struct _NM_UPDOWN
{
NMHDR hdr;
int iPos;
int iDelta;
} NMUPDOWN, *LPNMUPDOWN;
typedef struct tagNMHDR
{
HWND hwndFrom;
UINT_PTR idFrom;
UINT code; // NM_ code
} NMHDR;
With UDN_DELTAPOS notification handler, MS passes a pointer to NMHDR
which yo can cast to NM_UPDOWN*. With NMHDR (shown below) , you can use
"iDelta" to know the amount it spins while with NMHDR you can use "code"
to know the event type. What I don't understand is why the same storage
(the overlap of the last int and unsigned int) can provide two different
values by casting. Is it not union, is it? This is a C++ (or even a C)
question. If I underhand it, I may exploit the same tech for my own.
Your advise is appreciated. JD
typedef struct _NM_UPDOWN
{
NMHDR hdr;
int iPos;
int iDelta;
} NMUPDOWN, *LPNMUPDOWN;
typedef struct tagNMHDR
{
HWND hwndFrom;
UINT_PTR idFrom;
UINT code; // NM_ code
} NMHDR;