Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. problem with MessageBox!!! [modified]

problem with MessageBox!!! [modified]

Scheduled Pinned Locked Moved C / C++ / MFC
helpcsharpvisual-studiotutorialquestion
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lord_Vader
    wrote on last edited by
    #1

    Hello everybody,I have just purchased Visual Studio 2005 and I have problem with the MessageBox funtion!!! when I write for example MessageBoc("Hello") an error occurs: cannot convert parameter 1 from 'const char [6]' to 'LPCTSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast There is no problem with other functions like MessageBeep why???? In Visual Studio 6 there is no such problem please help -- modified at 20:27 Tuesday 23rd May, 2006

    L PJ ArendsP Z 3 Replies Last reply
    0
    • L Lord_Vader

      Hello everybody,I have just purchased Visual Studio 2005 and I have problem with the MessageBox funtion!!! when I write for example MessageBoc("Hello") an error occurs: cannot convert parameter 1 from 'const char [6]' to 'LPCTSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast There is no problem with other functions like MessageBeep why???? In Visual Studio 6 there is no such problem please help -- modified at 20:27 Tuesday 23rd May, 2006

      L Offline
      L Offline
      Lord_Vader
      wrote on last edited by
      #2

      I am sorry for the inconvenience but I figured out that the cause was the unicode libraries...

      1 Reply Last reply
      0
      • L Lord_Vader

        Hello everybody,I have just purchased Visual Studio 2005 and I have problem with the MessageBox funtion!!! when I write for example MessageBoc("Hello") an error occurs: cannot convert parameter 1 from 'const char [6]' to 'LPCTSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast There is no problem with other functions like MessageBeep why???? In Visual Studio 6 there is no such problem please help -- modified at 20:27 Tuesday 23rd May, 2006

        PJ ArendsP Offline
        PJ ArendsP Offline
        PJ Arends
        wrote on last edited by
        #3

        VC2005 defaults to UNICODE builds. Either turn off the UNICODE option, or use the TCHAR functions and macros

        MessageBox(_T("Hello"));


        You may be right I may be crazy -- Billy Joel -- Within you lies the power for good - Use it!

        Within you lies the power for good; Use it!

        1 Reply Last reply
        0
        • L Lord_Vader

          Hello everybody,I have just purchased Visual Studio 2005 and I have problem with the MessageBox funtion!!! when I write for example MessageBoc("Hello") an error occurs: cannot convert parameter 1 from 'const char [6]' to 'LPCTSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast There is no problem with other functions like MessageBeep why???? In Visual Studio 6 there is no such problem please help -- modified at 20:27 Tuesday 23rd May, 2006

          Z Offline
          Z Offline
          zt9788
          wrote on last edited by
          #4

          MessageBox(_T("Hello")) hi

          T 1 Reply Last reply
          0
          • Z zt9788

            MessageBox(_T("Hello")) hi

            T Offline
            T Offline
            toxcct
            wrote on last edited by
            #5

            there's no need to plagiarize what has been answered twice already :suss:


            TOXCCT >>> GEII power

            [VisualCalc 3.0  updated ][Flags Beginner's Guide  new! ]

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups