messagebox

What's wrong with this

MessageBox("Hallo. Dit is mijn eerste Visual C++ programma!");



Answer this question

messagebox

  • LookitsPuck

    Now he says this:

    1>------ Build started: Project: Hello, Configuration: Debug Win32 ------
    1>Compiling...
    1>stdafx.cpp
    1>Compiling...
    1>HelloDlg.cpp
    1>idHallo.cpp
    1>Generating Code...
    1>Compiling resources...
    1>Linking...
    1>HelloDlg.obj : error LNK2001: unresolved external symbol "public: void __thiscall CAboutDlg::OnBnClickedHallo(void)" ( OnBnClickedHallo@CAboutDlg@@QAEXXZ)
    1>C:\Documents and Settings\ikke\Mijn documenten\Visual Studio 2005\Projects\Hello\Debug\Hello.exe : fatal error LNK1120: 1 unresolved externals
    1>Build log was saved at "file://c:\Documents and Settings\ikke\Mijn documenten\Visual Studio 2005\Projects\Hello\Hello\Debug\BuildLog.htm"
    1>Hello - 2 error(s), 0 warning(s)
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


  • Buda56

    What am I doing wrong Is this an old command that doesn't work anymore

  • xna_dev

    Maybe you accidentally removed or commented the OnBnClickedHallo function Try to restore it in .cpp file:

     

    void CAboutDlg::OnBnClickedHallo()

    {

    }

     

    Otherwise re-start your experiments from a new project.

     


  • tcarff

    1>------ Build started: Project: Hello, Configuration: Debug Win32 ------
    1>Compiling...
    1>HelloDlg.cpp
    1>c:\documents and settings\ikke\mijn documenten\visual studio 2005\projects\hello\hello\hellodlg.cpp(166) : error C2664: 'CWnd::MessageBoxW' : cannot convert parameter 1 from 'const char [3]' to 'LPCTSTR'
    1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
    1>Build log was saved at "file://c:\Documents and Settings\ikke\Mijn documenten\Visual Studio 2005\Projects\Hello\Hello\Debug\BuildLog.htm"
    1>Hello - 1 error(s), 0 warning(s)
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

    and my meaning is to do this, but than with (version 8.0 or 2005)
    http://poincare.matf.bg.ac.yu/~filip/nm/Seminarski/VC-21days-short/ch01/ch01.htm#Heading10

  • RMan54

    What is the error you are getting

    Thanks,
    Ayman Shoukry
    VC++ Team


  • RayPowers

    Hey, I remade the application and now it's working

    thanks for you help.

  • Maxhec

    You should use the MessageBox command like this:

    MessageBox::Show("Hallo. Dit is mijn eerste Visual C++ programma!");

    Notice the ::Show command


  • Jehan Badshah

    I think you should try this:

    MessageBox(_T("Hallo. Dit is mijn eerste Visual C++ programma!"));

    I hope it helps.


  • messagebox