WIN32 Api in C++ Questions.

Hello and Good afternoon everyone,

Looking at WIN32Api i am most pleased to work on it especially in c++, so today i wanted to look at developing applications with win32 api.

I had a look at Resedit. It looks cool as it develops the resources as well as the .rc file now here is what i wanted to know.

1.in the main.cpp part do i just include the code like this to call in the functions
 
 EDITBOX hButton = SetDlgItem(hInstance,MAKEINTRESOURCE(IDC_SAYHELLO));


To set the editbox.

2. To make the Buttons functional do i also go this way :

1
2
3
4
5
6
7
8
9
10
	WM_COMMAND:
	   case IDC_SAYHELLO:
		switch(MessageBox(NULL,"SAY HELLO","YOU WONNA SAY HELLO?",MB_QUESTIONMARKICON|MB_YESNO));
	if case IDYES:
		MessageBox(NULL,"Yes","YOu Clicked YES",MB_EXCLAMATION|MB_OK);
		break;
	if case IDNO :
		MessageBox(NULL,"NO","You Clicked NO",MB_ERROR| MB_OK);
		break;
	break;
If you have the resource editor, then you probably have MFC too. If you do, you should be using it rather than using the WndProc with the large switch statement.
I have the resource editor. How do u mean MFC? How do I start to include the codes from the ResEdit viewer? I obviously don't see any link to c++ codes from here. Pls help.
How do u mean MFC?
MFC is Microsoft's legacy C++ framework for Windows.

You create an MFC application from the new project wizard, you have to choose an MFC Application explicitly. If you're not sure what kind of application to create, choose an MFC Dialog app.
okay,

i fixed that issue, all buttons are working fine. but i have an issue bugging me, having configured the resedit i imported it into visual studio all the buttons worked good but one trouble i had... it had a scattered GUI

what could be wrong? could it be because i didnt compile the .rc file or something? please help with possible ideas.
Topic archived. No new replies allowed.