Solved

How can I use ActiveX in WIN32 SDK programming?

Posted on 2002-03-03
4
646 Views
Last Modified: 2013-12-03
How can I use ActiveX in WIN32 SDK programming?
0
Comment
Question by:luxee
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 23

Accepted Solution

by:
Roshan Davis earned 100 total points
ID: 6838394
MSDN Says in
       HOWTO: Adding ATL Control Containment Support to Any Window

You can now start creating ActiveX controls using the WIN32 CreateWindow() API, specifying "AtlAxWin" as the class name and either a GUID, ProgID, or URL as the title. For example:



      // Create the Calendar control specifying the ProgID.
      // Make sure the module handle you pass to CreateWindow is the same
      // module handle where AtlAxWinInit() was called from.
      HWND hWnd = ::CreateWindow("AtlAxWin", "MSCAL.Calendar",
         WS_CHILD|WS_VISIBLE, 10, 10, 500, 300, hParent, NULL,
         ::GetModuleHandle(NULL), NULL);

      // Same as above except CLSID is specified instead of ProgID
      // corresponds to ProgID "MSCAL.Calendar.7"
      HWND hWnd = ::CreateWindow("AtlAxWin",
         "{8E27C92B-1264-101C-8A2F-040224009C02}",
         WS_CHILD|WS_VISIBLE, 10, 10, 500, 300, hParent, NULL,
         ::GetModuleHandle(NULL), NULL);

      // Creates the Web Browser control & navigates to specified web page.
      HWND hWnd = ::CreateWindow("AtlAxWin", "<LINK TYPE="GENERIC"          VALUE="http://www.microsoft.com",">
         http://www.microsoft.com",</LINK>
         WS_CHILD|WS_VISIBLE, 10, 10, 500, 300, hParent, NULL,
         ::GetModuleHandle(NULL), NULL);

      // Creates an instance of an dynamic HTML document.
      HWND hWnd = ::CreateWindow("AtlAxWin", "mshtml:<H1>Hello World</H1>",
         WS_CHILD|WS_VISIBLE, 10, 10, 500, 300, hParent, NULL,
         ::GetModuleHandle(NULL), NULL);

GOOD LUCK
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question