This Dialog is extreemely important to my program(It's just being created right now, I will change it once it opens).
When I select new, the Dialog Failed Message box appears, showing the dialog returned -1 a failure.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hey all, I'm having trouble with a Dialog Box. Heres the code:
Part of WinMain
[code]
case ID_New:
{
if(!pCurrentLevel)
{
int ret = DialogBox(GetModuleHandle(NULL),
MAKEINTRESOURCE(DB_New), hWnd, NewDlgProc);
[/code]
My Resource File:
[code]
include <windows.h>
include "Dialogs.h"
if !defined (_WINDOWS)
define _WINDOWS
endif
DB_NEW DIALOG DISCARDABLE 50, 50, 700, 560
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Create New.."
FONT 8, "MS Sans Serif"
BEGIN
END
[/code]
And IDs
[code]
ifndef DialogTypes
define DialogTypes
define DB_New 99999
endif
[/code]
This Dialog is extreemely important to my program(It's just being created right now, I will change it once it opens).
When I select new, the Dialog Failed Message box appears, showing the dialog returned -1 a failure.
Lol good point, fixed the (ret = -1), however the dialog still doesn't show, and the messagebox still appears.
This doesn't look good:
if(ret = -1)
:)
A favorite error of mine - Python won't let me do it fortunately
Wayne