>> pszFileText = LPSTR(GlobalAlloc(GPTR, dwFileSize + 1));
typecast is wrong: pszFileText = (LPSTR)GlobalAlloc(GPTR, dwFileSize + 1);
Add this to the top of the *.rc file #include <winuser.h>
You have to add comctl32.lib to the list of libraries. For your compiler it probably has *.a extension instead of *.lib.