Welcome to ActiveHome Pro.com

ActiveHome Pro

Introducing myHouse Web Monitoring and Control for ActiveHome Pro
iWatchOut Camera Monitoring
Smart Macros
PC Magazine's Editors' Choice
ActiveHome Pro  myHouse Online for ActiveHome Pro  Introducing iWatchOut  Smart Macros for ActiveHome Pro     

ActiveHome Pro SDK Sample Project

Project: AH C View
ActiveHome Pro
Description

This sample C++ application demonstrates how to receive X10 commands using COM events. It creates a small console window that logs incoming and outgoing X10 commands. The console has two buttons to send the specified X10 commands.

Notes

AhCView consists of an ATL dialog CMessageDlg, and a event sink class, CNotify. On initialization, the CMessageDlg creates the ActiveHome scripting object using CoCreateInstance. It then advises an event sink with a CNotify class being the target.

Thereafter, as ActiveHome scripting events are received by the interface, the events are dispatched to the CNotify object, which in turn directs the CMessageDlg object to add a new event to the list box.

CMessageDlg could receive the events directly, without using a helper class. In that case, it would need to provide an IDispatch interface and implementation for _IActiveHomeEvents. The code was implemented with a separate helper class to keep event reception separate from the dialog logic.

Requirements

Requires CM15A, X10 device service, and ActiveHome Scripting Interface.

Source Package

ahcview.zip

Source Contents List

  • ahcview.cpp
  • ahcview.rc
  • ahcview.sln
  • ahcview.vcproj
  • dirlist.txt
  • MessageDlg.cpp
  • MessageDlg.h
  • Notify.cpp
  • Notify.h
  • readme.txt
  • resource.h
  • StdAfx.cpp
  • StdAfx.h
Help Us Improve Our Code Samples
While this code sample will get you started, we know you will be developing code that is much more exciting and fun. When you do, we would like to post it to inspire and help others build their own automation masterpiece.

Have fun and get recognition for your work. Just send your sample project by e-mail to sdkinfo@activehome.com with a description of the application and a zip file of all related files.


Additional  Information for ActiveHome Pro
Home | Accessories | Video | Comparison | Compatibility | FAQ | Feedback | Forums
Macro Designer | Interface | Timer Designer | Manual | News | SDK | Site Map
Order online or call anytime, 800-675-3044!
 

Suggestion Box

Please help us improve our site! If this page contains incorrect information, missing details, or other problems, please use the form below to let us know. If you need help with an order, please call 800-675-3044 for Customer Service.
Please check any of the following boxes that apply:
This page doesn't fully explain how the product works. This page takes too long to load.
This page has incorrect product information. This page has a software bug in it.
This page contains typographical errors.

Comments or Examples:
Examples: Missing or incorrect information such as prices, component parts, typos, inaccuracies, etc.

If you would like a response, enter your email address: (Optional)

If you would like us to call you, please enter your phone number and a representative will call you as soon as possible: (Optional)

 

*Prices are posted in $US dollars ONLY! Offer for FREE FEDEX Ground shipping for orders $49.99 or more are valid ONLY in the United States of America. Note: Some orders may be shipped via USPS Priority Mail. Orders to Canada have a $10 Shipping & Handling Charge and will have a 5% goods & services tax (GST #10575 8056 RT0001) added to the order. Prices may change without notice. X10 accepts only credit card payment (VISA, MasterCard, Discover and American Express), for both online and telephone orders. If you would like Express Shipping please call 1-800-675-3044. X10 reserves the right to discontinue or change the posted promotional offers at any time. Technical support is available only to customers in the US and Canada.
X10 © 2006 pages are copyrighted and may not be reproduced in any form without the expressed written consent of X10.