Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6023609
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:01:50+00:00 2026-05-23T04:01:50+00:00

Started looking at the win32 API on this site: http://www.winprog.org/tutorial/start.html I’ve literally just compiled

  • 0

Started looking at the win32 API on this site: http://www.winprog.org/tutorial/start.html

I’ve literally just compiled the first example and it’s given me a message prompt in chinese/japanese, or something along those lines.

Question: Why?

Obviously as far as my understanding goes, I should be getting “Goodbye, cruel world!” in a message box (Presumably titled ‘Note’).

#include <windows.h>

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, 
LPSTR lpCmdLine, int nCmdShow)
{
MessageBox(NULL, "Goodbye, cruel world!", "Note", MB_OK);
return 0;
}

Foreign...

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T04:01:51+00:00Added an answer on May 23, 2026 at 4:01 am

    Try to change the code like this:

    #include <windows.h>
    
    int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, 
    LPSTR lpCmdLine, int nCmdShow)
    {
    MessageBox(NULL, L"Goodbye, cruel world!", L"Note", MB_OK);
    return 0;
    }
    

    If it works is because you are missing some header that point the correct API, you seem calling MessageBoxW ( the unicode version ) with an ANSI string. If this is not just a test but you are beginning to write a real world program, consider to ensure what kind of caracter you want to use ( this is a precompiler flag usually ). Then use the macro _T( to have your literals compatible both to unicode/ansi.

    Edit from @Benoit comment:
    Starting a new project with VS 2008/10 sets unicode character set by default.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just started looking into jQuery yesterday, before this I programmed in only PHP.
Just started looking into Entity Framework and the new Code-First features. My question is
I started looking at wpf recently and am having a hard time wrapping my
I have just started looking at JqueryMobile and want to know if the following
I was getting bored so I started looking a little into Cryptography. I got
I need a cheat sheet for Java and started looking around, but could not
I have good experience in sybase and have started looking into oracle in free
So, I've started looking into using AspectJ to handle processing events when the state
So Qt is compiled with /Zc:wchar_t- on windows. What this means is that instead
I am trying to build a very simple driver. Its sole purpose will be

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.