Conversion macros\inline functions
sometimes you might need to convert (safely) between different Windows data types. for example, consider this: you have a dialog window procedure and you want to handle WM_CTLCOLOREDIT message to change the background color of the edit control. BOOL CALLBACK DialogProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam ) { switch(uMsg) { case WM_CTLCOLOREDIT: return (BOOL)(GetStockObject(DKGRAY_BRUSH)); } } I followed the instructions from MSDN for WM_CTLCOLOREDIT: "If a dialog box procedure handles this message, it should cast the desired return value to a BOOL and return the value directly." the problem is it works but it gives a warning: Compiler Warning (level 1) C4311. "This warning detects 64-bit portability issues. For example, if code is compiled on a 64-bit platform, the value of a pointer (64 bits) will be truncated if it is assigned to an int (32 bits). This warning is only issued when /Wp64 is used. " I am using VisualC++ 2003 compiler so it seems /w...