Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Windows API
  4. DialogBox - ProgressBar Problem

DialogBox - ProgressBar Problem

Scheduled Pinned Locked Moved Windows API
helpc++
4 Posts 3 Posters 9 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    bsaidus
    wrote on last edited by
    #1

    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....

    A 1 Reply Last reply
    0
    • B bsaidus

      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....

      A Offline
      A Offline
      Albert Holguin
      wrote on last edited by
      #2

      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.

      B 1 Reply Last reply
      0
      • A Albert Holguin

        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.

        B Offline
        B Offline
        bsaidus
        wrote on last edited by
        #3

        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;
        
        R 1 Reply Last reply
        0
        • B bsaidus

          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;
          
          R Offline
          R Offline
          Ravi Bhavnani
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups