There should be at least 2 versions of DrawDialog one for Ansi strings and one for WideStrings. Have a look at which one FPC's DrawDialog is pointing to. It should be either DialogBoxA() or DialogBoxW().