Ok trying to create a dialog box. I had to download a third party software to create the RC file.
Here is the code to call the dialog box:
Resource File:Code:tmp = DialogBox ( hInst, TEXT("DLG_0100"), hwnd, LogInProc);
Dialog ProcCode:DLG_0100 DIALOG 118, 44, 180, 180 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Login" FONT 8, "MS Sans Serif" BEGIN EDITTEXT 101, 45, 23, 85, 18 CTEXT "Enter Your Name", 102, 45, 9, 85, 15 CTEXT "Enter the Password", 103, 45, 47, 85, 15 EDITTEXT 104, 45, 58, 85, 15, ES_PASSWORD PUSHBUTTON "Validate", 105, 37, 146, 40, 14, NOT WS_TABSTOP EDITTEXT 106, 45, 103, 85, 15, WS_DISABLED | NOT WS_TABSTOP PUSHBUTTON "OK", 107, 107, 146, 40, 14, NOT WS_VISIBLE END
Ok first off I know the dialog box doesn't do anything, thats because I'm trying to get it up first. I have never worked with RC files before and my book expects that I'm using MV C++ and that it will make my RC files for me.Code:BOOL CALLBACK LogInProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { switch ( message) { case WM_INITDIALOG: MessageBoxPrintf(TEXT("DIALOG"), TEXT("Dialog Started")); return TRUE; case WM_COMMAND: switch ( LOWORD (wParam) ) { case 105: EndDialog (hDlg, 0); return TRUE; } break; } return FALSE; }
The error I'm getting is 1812 "ERROR_RESOURCE_DATA_NOT_FOUND" when calling the CreateDialog
Any help or a link to a good tutorial would be great. Thanks



LinkBack URL
About LinkBacks


