tagNMHDR 64-bit alignment bug workaround

Hi everyone,

This is being posted so that anyone in the future can search Xojo with the tagNMHDR structure and will find this solution.

I created an Up-Down API Control in Windows 10 and was able to have the structure work in 32-bit mode, and there were output issues in 64-bit mode. Julian pointed to a similar structure alignment issue in feedback://showreport?report_id=51124.

The workaround has the following two structures, with one for 32-bit applications, and the other for 64-bit applications:

32-bit applications (change gear in structure to include in only 32-bit applications)

Structure tagNMHDR hWndForm as Integer idForm as UInteger code as UInt32 End Structure

64-bit applications (change gear in structure to include in only 64-bit applications)

Structure tagNMHDR hWndForm as Integer idForm as UInteger code as UInt32 _padding As UInt32 End Structure

Thanks for your help Julian, much appreciated!

Sometimes some strange alignmet happens or at least the alignment used by many other compilers does not match with Xojo behaviour.
feedback://showreport?report_id=48449