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. CreateControl Failed problem [modified]

CreateControl Failed problem [modified]

Scheduled Pinned Locked Moved C / C++ / MFC
csharpvisual-studiotestingbeta-testingjson
6 Posts 4 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.
  • S Offline
    S Offline
    sharda bhagwatkar
    wrote on last edited by
    #1

    Hi, In my application, I am creating an MSChart control dynamically like this:- CMSChart *m_pChart = new CMSChart(); m_pChart->CreateControl(m_pChart->GetClsid(),EMPTY_STRING, WS_TABSTOP, CRect(0,0,0,0), pParent, nCtrlID); On development environment( in which Visual Studio 6.0 is installed), the MSChart control is creating successfully(CreateControl() returns true). But on testing environment( in which Visual Studio 6.0 is not installed), the CreateControl API returns FALSE. Please let me know what must be the problem. Thanks.

    modified on Thursday, May 22, 2008 12:12 AM

    C R C 3 Replies Last reply
    0
    • S sharda bhagwatkar

      Hi, In my application, I am creating an MSChart control dynamically like this:- CMSChart *m_pChart = new CMSChart(); m_pChart->CreateControl(m_pChart->GetClsid(),EMPTY_STRING, WS_TABSTOP, CRect(0,0,0,0), pParent, nCtrlID); On development environment( in which Visual Studio 6.0 is installed), the MSChart control is creating successfully(CreateControl() returns true). But on testing environment( in which Visual Studio 6.0 is not installed), the CreateControl API returns FALSE. Please let me know what must be the problem. Thanks.

      modified on Thursday, May 22, 2008 12:12 AM

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      I moved this to the C++ forum for you, please never ask programming questions in the lounge again.

      Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

      1 Reply Last reply
      0
      • S sharda bhagwatkar

        Hi, In my application, I am creating an MSChart control dynamically like this:- CMSChart *m_pChart = new CMSChart(); m_pChart->CreateControl(m_pChart->GetClsid(),EMPTY_STRING, WS_TABSTOP, CRect(0,0,0,0), pParent, nCtrlID); On development environment( in which Visual Studio 6.0 is installed), the MSChart control is creating successfully(CreateControl() returns true). But on testing environment( in which Visual Studio 6.0 is not installed), the CreateControl API returns FALSE. Please let me know what must be the problem. Thanks.

        modified on Thursday, May 22, 2008 12:12 AM

        R Offline
        R Offline
        Rajesh R Subramanian
        wrote on last edited by
        #3

        You probably need to install VCRedist.exe on your testing environment. You can ship it with your installer as well.

        Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

        C 1 Reply Last reply
        0
        • S sharda bhagwatkar

          Hi, In my application, I am creating an MSChart control dynamically like this:- CMSChart *m_pChart = new CMSChart(); m_pChart->CreateControl(m_pChart->GetClsid(),EMPTY_STRING, WS_TABSTOP, CRect(0,0,0,0), pParent, nCtrlID); On development environment( in which Visual Studio 6.0 is installed), the MSChart control is creating successfully(CreateControl() returns true). But on testing environment( in which Visual Studio 6.0 is not installed), the CreateControl API returns FALSE. Please let me know what must be the problem. Thanks.

          modified on Thursday, May 22, 2008 12:12 AM

          C Offline
          C Offline
          Cedric Moonen
          wrote on last edited by
          #4

          You will also need to copy and register the chart activeX control on the target platform (I guess it is distributed as an ocx right ?)

          Cédric Moonen Software developer
          Charting control [v1.4]

          1 Reply Last reply
          0
          • R Rajesh R Subramanian

            You probably need to install VCRedist.exe on your testing environment. You can ship it with your installer as well.

            Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

            C Offline
            C Offline
            Cedric Moonen
            wrote on last edited by
            #5

            Rajesh R Subramanian wrote:

            You probably need to install VCRedist.exe on your testing environment.

            For VC6 ? :~ It seems also that the problem is somewhere else because the CreateControl function fails, which implicitely means that he is able to start the application successfully.

            Cédric Moonen Software developer
            Charting control [v1.4]

            R 1 Reply Last reply
            0
            • C Cedric Moonen

              Rajesh R Subramanian wrote:

              You probably need to install VCRedist.exe on your testing environment.

              For VC6 ? :~ It seems also that the problem is somewhere else because the CreateControl function fails, which implicitely means that he is able to start the application successfully.

              Cédric Moonen Software developer
              Charting control [v1.4]

              R Offline
              R Offline
              Rajesh R Subramanian
              wrote on last edited by
              #6

              OK 5 - I overlooked this one. :) [add] Probably because vcredist is the first thing I suggest, when someone says my Visual C++ program works on my machine, but not on the client's. [/add]

              Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

              modified on Thursday, May 22, 2008 2:38 AM

              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