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. Javascript and ActiveX

Javascript and ActiveX

Scheduled Pinned Locked Moved C / C++ / MFC
javascripttutorialcomgraphicsgame-dev
3 Posts 2 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.
  • C Offline
    C Offline
    calebcohoon
    wrote on last edited by
    #1

    Hello everybody, Right now I'm creating an opengl activex control that allows JavaScript to communicate with the control. For example: ********************************************* function begin() { var object = document.SGLworld; object.StartRender(); } function stop() { var object = document.SGLworld; object.StopRender(); } ********************************************* I plan on having the ability to pass class or struct objects back to a JavaScript variable like this: ********************************************* function returnclass() { var box; var object = document.SGLworld; box = object.CreateBox(1.0, 1.0, 1.0); // return the createbox structure to the javascript variable(box) box.SetColor(1.0, 0.0, 0.0); // now the varible(box) should have access to the structers members functions } ********************************************* But the problem is I have no clue how to pass struct(or class) objects back to a js variable! So if anybody has an idea or can redirect to some information I’d be very grateful!!! :) Thanks, Caleb

    L 1 Reply Last reply
    0
    • C calebcohoon

      Hello everybody, Right now I'm creating an opengl activex control that allows JavaScript to communicate with the control. For example: ********************************************* function begin() { var object = document.SGLworld; object.StartRender(); } function stop() { var object = document.SGLworld; object.StopRender(); } ********************************************* I plan on having the ability to pass class or struct objects back to a JavaScript variable like this: ********************************************* function returnclass() { var box; var object = document.SGLworld; box = object.CreateBox(1.0, 1.0, 1.0); // return the createbox structure to the javascript variable(box) box.SetColor(1.0, 0.0, 0.0); // now the varible(box) should have access to the structers members functions } ********************************************* But the problem is I have no clue how to pass struct(or class) objects back to a js variable! So if anybody has an idea or can redirect to some information I’d be very grateful!!! :) Thanks, Caleb

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Have you tried SpiderMonkey? It's the javascript engine of the Mozilla project.

      C 1 Reply Last reply
      0
      • L Lost User

        Have you tried SpiderMonkey? It's the javascript engine of the Mozilla project.

        C Offline
        C Offline
        calebcohoon
        wrote on last edited by
        #3

        Thanks

        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