|
-
Feb 21st, 2002, 11:35 AM
#1
Thread Starter
Fanatic Member
dialog boxes
hah...my question's will never cease
I added a dialog box, added everything I want to it...but I can't get it to show up.
I have my WinMain stuff, and I want the dialog box to show up first thing so the user can select resolution/fullscreen/see the controls.
And if they click 'ok', the dialog box closes (the values are stored in globals, right?), 'exit' well...exits.
The dialog box is called "IDD_OPTIONS"
Thanks Alot
Visit www.fragblast.com
Gaming, forums, and a online RPG/Battle system
(__Flagg) DOT NET? is this a Hindi Dating service?
-
Feb 22nd, 2002, 08:28 AM
#2
If you keep asking, you should remove that large picture from your signation. It's really annoying when every post of yours is two thirds signature, and it makes the threads hard to read.
The values are not automatically saved in globals, you must do that yourself in the command handler routine of your DialogProc.
A modal dialog box (one that hinders other execution) is created with the DialogBox function. A modeless is created with the CreateDialog function.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Feb 22nd, 2002, 07:03 PM
#3
Thread Starter
Fanatic Member
Originally posted by CornedBee
If you keep asking, you should remove that large picture from your signation. It's really annoying when every post of yours is two thirds signature, and it makes the threads hard to read.
The values are not automatically saved in globals, you must do that yourself in the command handler routine of your DialogProc.
A modal dialog box (one that hinders other execution) is created with the DialogBox function. A modeless is created with the CreateDialog function.
sorry i changed it to something smaller
and...
Visit www.fragblast.com
Gaming, forums, and a online RPG/Battle system
(__Flagg) DOT NET? is this a Hindi Dating service?
-
Feb 23rd, 2002, 11:40 AM
#4
If you refer to your OpenGL cube...
Code:
BOOL g_bFullscreen;
BOOL CALLBACK DialogProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam);
int WinMain(HINSTANCE hInst, ...)
{
int dlgresult = DialogBox(hInst, MAKEINTRESOURCE(IDD_OPTIONS), NULL, DialogProc);
if(dlgresult == IDOK)
{//...
}
//...
}
BOOL CALLBACK DialogProc(...)
{
switch(message)
{
case WM_COMMAND:
switch(LOWORD(wParam))
{
case IDOK:
g_bFullscreen = (BST_CHECKED == SendMessage(GetDlgItem(hdlg, IDC_FULLSCREEN), WM_GETCHECK, 0L, 0L));
EndDialog(hdlg, IDOK);
}
}
You get the idea. It may be that NULL is an invalid hwnd parameter to DialogBox, in this case you'd have to create the main window first (don't show it) and pass this hwnd, or pass the desktop hwnd (not a good idea)
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|