Results 1 to 12 of 12

Thread: activex programming and usage!

  1. #1

    Thread Starter
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827

    activex programming and usage!

    I have read some tutorials on the web and also some books on programming windows but I still have not found any article that shows me how to use activex controls like winsock or any 3rd party controls in my C++ program. And also I want to know how to make my own activex control using pure C++
    (NO MFC!)
    Baaaaaaaaah

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Firstly, you don't need the Winsock control

    Secondly, ActiveX controls in pure API would send the most determined coder scurrying to the drinks cabinet

    In VC++, you can autogenerate the interface classes required by going Insert->Components and Controls->ActiveX Controls and choosing the one you want.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3

    Thread Starter
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    Originally posted by parksie
    Firstly, you don't need the Winsock control

    Secondly, ActiveX controls in pure API would send the most determined coder scurrying to the drinks cabinet

    In VC++, you can autogenerate the interface classes required by going Insert->Components and Controls->ActiveX Controls and choosing the one you want.
    Sorry, I did not understand that! So I cannot write or use activex controls without using VC++?
    Baaaaaaaaah

  4. #4
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    No. But you have to mess around with interface pointers. ActiveX is a subset of COM so don't even bother thinking about it until you know how to use COM from the API.

    VC++ just simplifies it (using #import)
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  5. #5

    Thread Starter
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    So, Is it better to use VC++ to develop activex controls? Will I be sure that vC++ does not use MFC when I am developing activex controls (COM)?
    Baaaaaaaaah

  6. #6
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    ATL is very useful for building ActiveX controls, and there's very little reason not to use it. It's incredibly small (template based), and although it looks like MFC it's a lot nicer. Basically, you're a lot closer to the API but it helps simplify some of the really nasty stuff.

    The ATL samples are fairly comprehensive
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  7. #7

    Thread Starter
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    Then where can I learn ATL from. Is there any web site where I can get the informations about ATL?
    Baaaaaaaaah

  8. #8
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    *cough* MSDN *cough*
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  9. #9

    Thread Starter
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    Does it have any documentation or tutorials on ATL or it just a *refrence*?
    Baaaaaaaaah

  10. #10
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Reference, samples, tutorials - check it out. I think it's the Polygon sample you want.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  11. #11

    Thread Starter
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    I want to write my own textbox activex control. It should have highlighting, line numbering, and some other stuff...
    I am not going to write it in vb (which is easier) because it is really slow for highlighting purpose!
    Baaaaaaaaah

  12. #12
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Sounds pretty nice! If you want to do that I suggest basing it around the RTB control. Unfortunately I don't have time to show you a basic one
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width