wParam, lParam and lResult are used in Windows message handling, sometimes they contain a number, sometimes a pointer to something. To be able to hold a pointer they have pointer size, so on 64bit they are 64bit wide.

When they represent numbers a wParam is represented as a unsigned number whereas lParam and lResult are represented as signed numbers. This means that it is a bit "tricky" to convert from a 32 bit number to a 64 bit version of these domains.

To make sure that it is done correctly, you should use the predicates mkW, mkL and mkR in gui_api.