: : in the book that I read in the first lesson teaching how to
: : write a simple MFC program showing the dialogue , they use
: : AfxMessageBox("htl"); but when i type in code it generates error
: : "none of the 2 overloads could convert all the argument types " I
: : know that require 2 parameters . But how to do it correctly . In my
: : university , we study C sharp but i like MFC than and I learn it by
: : my self and with your help .
: : Thank you .
: :
: Are you sure the error is for this call?
: It might be that you have set strings to Unicode or vice-versa. The
: function takes 3 parameters but two have defaults.
:
By default any new project you create with VC 2005 has an option to use UNICODE text. Simply use L modifier for your strings in quotes:
AfxMessageBox (L"Hello!");