Making a Dialog appear..
So I made this dialog in vc++ with the editor.
How do I make it appear somewhere? hehe
And where do I define what the buttons do?
Wow, it seems you need to learn all the MFC basis !!
Take a look at this site it will help you a lot :
http://www.codeguru.com/dialog/index.shtml
__________________________
Bruno Wieckowski
Lead Programmer
Exood4 Studios
[edited by - brunow on August 17, 2002 1:24:30 PM]
Take a look at this site it will help you a lot :
http://www.codeguru.com/dialog/index.shtml
__________________________
Bruno Wieckowski
Lead Programmer
Exood4 Studios
[edited by - brunow on August 17, 2002 1:24:30 PM]
I heard MFC was the devil and you shouldn''t go near it...
Is there a way to do it without learning MFC?
Is there a way to do it without learning MFC?
I don''t know who told you such a silly thing !! But all I can say is that you will avoid a lot of useless work, you could have to do without MFC !
Building dialogs/menu/icons... using the VC++ resources editor is usually (if not always) done for MFC developments !
Try it and make your own opinion about MFC, I''m not sure the guy who adviced you, has really tried anything with them...
__________________________
Bruno Wieckowski
Lead Programmer
Exood4 Studios
Building dialogs/menu/icons... using the VC++ resources editor is usually (if not always) done for MFC developments !
Try it and make your own opinion about MFC, I''m not sure the guy who adviced you, has really tried anything with them...
__________________________
Bruno Wieckowski
Lead Programmer
Exood4 Studios
Well im trying to make a game actually,
I already have an OpenGL window I am working with but I wanted another little window on the side that would have buttons like New Game / Save Game / etc
Rather than trying to do all the coding for that in the OpenGL window.
It was easy to do that with VB before but would it be easier to do it a different way in this case?
I already have an OpenGL window I am working with but I wanted another little window on the side that would have buttons like New Game / Save Game / etc
Rather than trying to do all the coding for that in the OpenGL window.
It was easy to do that with VB before but would it be easier to do it a different way in this case?
In WIN32 API (which I presume you''re using). To make a dialogue appear, you need to add your menu item to the procedure.
IE:
Then you need a dialogue procedure matching X above.(change X for the name of the procedure)
IE:
If you don''t know the WINAPI this is very confusing to you. I don''t know OPEN-GL so I don''t have a clue how it operates but this is how its done in the WINAPI.
IE:
case WM_COMMAND: switch(LOWORD(wParam)) { case ID_GAME_LOAD: //Or whatever the ID for the menu item is int aboutint = DialogBox(GetModuleHandle(NULL), MAKEINTRESOURCE(THE_DIALOG_YOU_WANT), hwnd, X); break; // Other menu commands... }break;
Then you need a dialogue procedure matching X above.(change X for the name of the procedure)
IE:
BOOL CALLBACK X(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam){ switch(message) { case WM_INITDIALOG: return true; case WM_COMMAND: switch(LOWORD(wparam)) { //THE BUTTONS/OTHER DEVICES IN YOUR DIALOGUE''S ACTIONS } break; default: return false; } return true;}
If you don''t know the WINAPI this is very confusing to you. I don''t know OPEN-GL so I don''t have a clue how it operates but this is how its done in the WINAPI.
And the Dark Lord shall DESTROY Middle Earth
But Ilthigore will save you
hrmm
I am trying to get the dialog box i made to pop up as one window, and the NeHe OpenGL window to pop up next to it
I am trying to use win32 api but the window handles are already used by the gl window
so I tried making new window handles and a new class and everything to try to get the dialog to be seperate but its getting all crazy
ive probably stopped making sense but lets just say if anyone can give me some example code where it will pop up one window using a dialog and the nehegl window next to it, that would be great
or even have the dialog window appear and then pressing a button on it would close it and make the gl window appear
I am trying to get the dialog box i made to pop up as one window, and the NeHe OpenGL window to pop up next to it
I am trying to use win32 api but the window handles are already used by the gl window
so I tried making new window handles and a new class and everything to try to get the dialog to be seperate but its getting all crazy
ive probably stopped making sense but lets just say if anyone can give me some example code where it will pop up one window using a dialog and the nehegl window next to it, that would be great
or even have the dialog window appear and then pressing a button on it would close it and make the gl window appear
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement