Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

I use Visual studio 2k5

doanhanamdoanhanam Member Posts: 4
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 .

Comments

  • Malcolm_McLeanMalcolm_McLean Member Posts: 254 ✭✭
    : 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.
  • AsmGuru62AsmGuru62 Member Posts: 6,519
    : : 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.
    :
    [color=Blue]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:[/color]
    [code]AfxMessageBox ([b][color=Red]L[/color][/b]"Hello!");[/code]
  • doanhanamdoanhanam Member Posts: 4

    Yes , I got the right solution . This is thank to your experience . Thank and have good weekend !
Sign In or Register to comment.