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. MS Flex Grid & Visual C++ 6.0 [modified]

MS Flex Grid & Visual C++ 6.0 [modified]

Scheduled Pinned Locked Moved C / C++ / MFC
c++csscomdesignhelp
8 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.
  • D Offline
    D Offline
    dehseth
    wrote on last edited by
    #1

    Hey everyone, I create an empty dialog and add an activex control names ms flex grid 6.0. I create a class which inherited from CDialog and when I say create it fails and gives no information: class CTry : CDialog { public: CTry (); }; CTry ::CTry () { if (!Create(DialogID)) { //window creation failed! exit(-1); } }; When I remove flex grid from dialog it suceeds... I also know there was a liecense problem in design time with flex grid, but it says nothing when I am using it in design time So any idea why this happens? :confused: (Actually it happens when I try to add rich text box also.. seems like I cannot add an outside activex control) Thanks everyone. :)

    modified on Wednesday, May 7, 2008 1:31 AM

    R T 2 Replies Last reply
    0
    • D dehseth

      Hey everyone, I create an empty dialog and add an activex control names ms flex grid 6.0. I create a class which inherited from CDialog and when I say create it fails and gives no information: class CTry : CDialog { public: CTry (); }; CTry ::CTry () { if (!Create(DialogID)) { //window creation failed! exit(-1); } }; When I remove flex grid from dialog it suceeds... I also know there was a liecense problem in design time with flex grid, but it says nothing when I am using it in design time So any idea why this happens? :confused: (Actually it happens when I try to add rich text box also.. seems like I cannot add an outside activex control) Thanks everyone. :)

      modified on Wednesday, May 7, 2008 1:31 AM

      R Offline
      R Offline
      Rajkumar R
      wrote on last edited by
      #2

      try initializing rich edit control with AfxInitRichEdit once in your application

      BOOL <yourapp>::InitInstance()
      {
      AfxInitRichEdit( );
      ...

      if you are not able to load flex grid, try also, AfxEnableControlContainer() in InitInstance

      D 1 Reply Last reply
      0
      • D dehseth

        Hey everyone, I create an empty dialog and add an activex control names ms flex grid 6.0. I create a class which inherited from CDialog and when I say create it fails and gives no information: class CTry : CDialog { public: CTry (); }; CTry ::CTry () { if (!Create(DialogID)) { //window creation failed! exit(-1); } }; When I remove flex grid from dialog it suceeds... I also know there was a liecense problem in design time with flex grid, but it says nothing when I am using it in design time So any idea why this happens? :confused: (Actually it happens when I try to add rich text box also.. seems like I cannot add an outside activex control) Thanks everyone. :)

        modified on Wednesday, May 7, 2008 1:31 AM

        T Offline
        T Offline
        ThatsAlok
        wrote on last edited by
        #3

        try adding AfxOleInit in your program! i believe in the InitInstance function of the Application!

        "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
        Never mind - my own stupidity is the source of every "problem" - Mixture

        cheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You/codeProject$$>

        D 1 Reply Last reply
        0
        • T ThatsAlok

          try adding AfxOleInit in your program! i believe in the InitInstance function of the Application!

          "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
          Never mind - my own stupidity is the source of every "problem" - Mixture

          cheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You/codeProject$$>

          D Offline
          D Offline
          dehseth
          wrote on last edited by
          #4

          I have added the function but still did not work.. When I press test button on dialog, it works and seems ok. got any idea??? :confused: BOOL Appl::InitInstance() { AfxOleInit(); Works fine using AfxEnableControlContainer Here's what msdn says about it: If you did not enable ActiveX control support when you used AppWizard to generate your application, you will have to add this support manually. This article describes the process for manually adding ActiveX control containment to an existing OLE container application

          modified on Wednesday, May 7, 2008 9:11 AM

          T 1 Reply Last reply
          0
          • R Rajkumar R

            try initializing rich edit control with AfxInitRichEdit once in your application

            BOOL <yourapp>::InitInstance()
            {
            AfxInitRichEdit( );
            ...

            if you are not able to load flex grid, try also, AfxEnableControlContainer() in InitInstance

            D Offline
            D Offline
            dehseth
            wrote on last edited by
            #5

            I need to use Flex Grid, I just tried to use richedit also but didn't work. So do you have any idea why flex grid didn't work?? :confused: here's code: BOOL Appl::InitInstance() { AfxOleInit(); thanks...

            R 1 Reply Last reply
            0
            • D dehseth

              I need to use Flex Grid, I just tried to use richedit also but didn't work. So do you have any idea why flex grid didn't work?? :confused: here's code: BOOL Appl::InitInstance() { AfxOleInit(); thanks...

              R Offline
              R Offline
              Rajkumar R
              wrote on last edited by
              #6

              Have you tried the code which i given, because i tested AfxOleInit did't work but AfxInitRichEdit for richedit control and AfxEnableControlContainer for Flex grid it worked.

              D 1 Reply Last reply
              0
              • R Rajkumar R

                Have you tried the code which i given, because i tested AfxOleInit did't work but AfxInitRichEdit for richedit control and AfxEnableControlContainer for Flex grid it worked.

                D Offline
                D Offline
                dehseth
                wrote on last edited by
                #7

                Hey there, I just tried AfxEnableControlContainer and it did work! :omg: I didn't saw this code in your previous message, sorry for being careless :(( Thank you very much! :-D

                1 Reply Last reply
                0
                • D dehseth

                  I have added the function but still did not work.. When I press test button on dialog, it works and seems ok. got any idea??? :confused: BOOL Appl::InitInstance() { AfxOleInit(); Works fine using AfxEnableControlContainer Here's what msdn says about it: If you did not enable ActiveX control support when you used AppWizard to generate your application, you will have to add this support manually. This article describes the process for manually adding ActiveX control containment to an existing OLE container application

                  modified on Wednesday, May 7, 2008 9:11 AM

                  T Offline
                  T Offline
                  ThatsAlok
                  wrote on last edited by
                  #8

                  sorry i confused between both of function

                  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