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. C / C++ / MFC
  4. Trouble with List Control and Dialog

Trouble with List Control and Dialog

Scheduled Pinned Locked Moved C / C++ / MFC
c++helplearning
5 Posts 3 Posters 0 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.
  • A Offline
    A Offline
    Archer282
    wrote on last edited by
    #1

    Ok, i have a dialog which i made with the resource editor. all the code is done with pure win32, no MFC. Now when i have list control on the dialog, the CreateDialog function fails and the dialog is not created. When i set the "No Fail Create" (or something like that) prop on the dialog, the function succeeds the window is made but the list control doesnt show up. when i take the list control off, it doesnt matter whether the "no fail create" prop is set or not, the function succeeds and everything works fine. i also have the same problem when i add a progress bar. extra info: a while back, i made a MFC project that used a list control and a progress bar, the list control caused no problem, but when the progress bar was put on the dialog, the program crashed.

    M 1 Reply Last reply
    0
    • A Archer282

      Ok, i have a dialog which i made with the resource editor. all the code is done with pure win32, no MFC. Now when i have list control on the dialog, the CreateDialog function fails and the dialog is not created. When i set the "No Fail Create" (or something like that) prop on the dialog, the function succeeds the window is made but the list control doesnt show up. when i take the list control off, it doesnt matter whether the "no fail create" prop is set or not, the function succeeds and everything works fine. i also have the same problem when i add a progress bar. extra info: a while back, i made a MFC project that used a list control and a progress bar, the list control caused no problem, but when the progress bar was put on the dialog, the program crashed.

      M Offline
      M Offline
      Michael Dunn
      wrote on last edited by
      #2

      The dialog creation is failing because the list control window class isn't registered. Add a call to InitCommonControls() in your app's init code. --Mike-- LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ | You Are Dumb Magnae clunes mihi placent, nec possum de hac re mentiri.

      A 1 Reply Last reply
      0
      • M Michael Dunn

        The dialog creation is failing because the list control window class isn't registered. Add a call to InitCommonControls() in your app's init code. --Mike-- LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ | You Are Dumb Magnae clunes mihi placent, nec possum de hac re mentiri.

        A Offline
        A Offline
        Archer282
        wrote on last edited by
        #3

        that didnt seem to make a difference keep in mind im not using MFC, and i dont plan on it. i suspect that function is for MFC? seems to be alot of trouble to get access to it.

        PJ ArendsP 1 Reply Last reply
        0
        • A Archer282

          that didnt seem to make a difference keep in mind im not using MFC, and i dont plan on it. i suspect that function is for MFC? seems to be alot of trouble to get access to it.

          PJ ArendsP Offline
          PJ ArendsP Offline
          PJ Arends
          wrote on last edited by
          #4

          http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcresed/html/vctbsaddingcontrolstoadialogcausesthedialogtonolongerfunction.asp[^] It's amazing what one can find in MSDN.


          "You're obviously a superstar." - Christian Graus about me - 12 Feb '03 "Obviously ???  You're definitely a superstar!!!" mYkel - 21 Jun '04 Within you lies the power for good - Use it!

          Within you lies the power for good; Use it!

          A 1 Reply Last reply
          0
          • PJ ArendsP PJ Arends

            http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcresed/html/vctbsaddingcontrolstoadialogcausesthedialogtonolongerfunction.asp[^] It's amazing what one can find in MSDN.


            "You're obviously a superstar." - Christian Graus about me - 12 Feb '03 "Obviously ???  You're definitely a superstar!!!" mYkel - 21 Jun '04 Within you lies the power for good - Use it!

            A Offline
            A Offline
            Archer282
            wrote on last edited by
            #5

            some people are just better at finding things on msdn than others, guess you are one of them. thanx to both of you

            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