DialogBox - ProgressBar Problem
-
Hello friends I'm newbie to VC++6 so : I have created a new empty Win32 application under VC6, I added a DialogBox with some controls (Static Labels, ComboBox, Buttons) and it works well(Compiles and Runs), but the problem appears once I ADD a PROGRESSBAR to the Form (DialogBox)so the application comiles but dont runs Help me Please :^) thanks you....
-
Hello friends I'm newbie to VC++6 so : I have created a new empty Win32 application under VC6, I added a DialogBox with some controls (Static Labels, ComboBox, Buttons) and it works well(Compiles and Runs), but the problem appears once I ADD a PROGRESSBAR to the Form (DialogBox)so the application comiles but dont runs Help me Please :^) thanks you....
You need to add a little more information... what do you mean doesn't run? does it crash? if so, does it give you any sort of error? how did you add the progress bar? did you use a wizard or make it yourself? Most common problem I've seen with dialog crashes... people trying to access a control of a dialog before it has been created. Remember that external classes/methods shouldn't access controls owned by the dialog box directly.
-
You need to add a little more information... what do you mean doesn't run? does it crash? if so, does it give you any sort of error? how did you add the progress bar? did you use a wizard or make it yourself? Most common problem I've seen with dialog crashes... people trying to access a control of a dialog before it has been created. Remember that external classes/methods shouldn't access controls owned by the dialog box directly.
thank you !! I have resolved the problem . I have just added then API function
InitCommonControls();
case WM\_INITDIALOG: { /\* \* TODO: Add code to initialize the dialog. \*\*/ InitCommonControls(); hIcon = (HICON)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI\_ICON), IMAGE\_ICON, 32, 32, 0); SendMessage(Dlg, WM\_SETICON, ICON\_BIG , (LPARAM)hIcon); hIconSm = (HICON)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI\_ICON), IMAGE\_ICON, 16, 16, 0); SendMessage(Dlg, WM\_SETICON, ICON\_SMALL, (LPARAM)hIconSm); //break; return TRUE;
-
thank you !! I have resolved the problem . I have just added then API function
InitCommonControls();
case WM\_INITDIALOG: { /\* \* TODO: Add code to initialize the dialog. \*\*/ InitCommonControls(); hIcon = (HICON)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI\_ICON), IMAGE\_ICON, 32, 32, 0); SendMessage(Dlg, WM\_SETICON, ICON\_BIG , (LPARAM)hIcon); hIconSm = (HICON)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI\_ICON), IMAGE\_ICON, 16, 16, 0); SendMessage(Dlg, WM\_SETICON, ICON\_SMALL, (LPARAM)hIconSm); //break; return TRUE;
Wow. This code snippet took me back to 1993! /ravi
My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com