Taking the plunge with GUI's - and already got a weird bug.

Having messed around with basically doing maths for a long time now, I've finally decided to take the plunge with trying a basic GUI using the examples on this website: http://www.winprog.org/tutorial/start.html

The program compiles in C perfectly happily except the text in the message box is in chinese!!

Any suggestions?




Here's the entirety of my program:

1
2
3
4
5
6
7
8
#include <windows.h>

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, 
    LPSTR lpCmdLine, int nCmdShow)
{
    MessageBox(NULL, "Goodbye, cruel world!", "Note", MB_OK);
    return 0;
}
Last edited on
I personally don't use the windows API, but look in the windows documentation.
There is probably a parameter that changes the language.
hmmm okay I'll have a look for something. Problem is I just copy pasted the code from the website to try and get something working, so I don't really have a clue what any of it does.

Urgghh I hate feeling like a beginner again!

EDIT - actually what would you recommend for creating a GUI? Ideally I would just choose the most simple one to use, I don't require any remotely complex graphics - just buttons and drop down menus.
Last edited on
It really depends, if your using windows then the windows API may be best.. but I personally use GTK
Last edited on
closed account (zb0S216C)
hampshire2012 wrote:
actually what would you recommend for creating a GUI?

C# is perfect for creating GUI programs. I've used it, and it's too easy, to say the least. Try it out. Microsoft have an IDE dedicated to it. It's called Visual C# Express 2010[1].

References:
[1]http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-csharp-express


Wazzak
Last edited on
True, if your going for samall windows apps c# is probably the fastest/easyest. big apps like an FPS, c++ is better ( my opinion)
Put a capitol L right before the first qoute mark, dont ask me why but this will set your string back to ASCII symbols. i recently had the same problem.
Put a capitol L right before the first qoute mark, dont ask me why but this will set your string back to ASCII symbols. i recently had the same problem.


Brilliant! Thanks very much - that's solved the problem perfectly.
Topic archived. No new replies allowed.