Click here to Skip to main content
15,897,704 members
Articles / Programming Languages / C

COM in plain C, Part 7

Rate me:
Please Sign up or sign in to vote.
5.00/5 (15 votes)
8 Aug 2006CPOL13 min read 93.7K   2K   83  
An ActiveX Script Host with custom COM objects. This allows a script to call C functions in your app.
//Microsoft Developer Studio generated resource script.
//
#include "resource.h"

#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"

/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS

/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32

/////////////////////////////////////////////////////////////////////////////
//
// Menu
//

IDR_MAIN_MENU MENU DISCARDABLE 
BEGIN
    POPUP "&File"
    BEGIN
        MENUITEM "&Run script...",              IDM_FILE_RUNSCRIPT
    END
END

/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//

IDD_MAINWINDOW DIALOG DISCARDABLE  0, 0, 250, 198
STYLE DS_NOIDLEMSG | DS_SETFOREGROUND | DS_3DLOOK | DS_CENTER | 
    WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_VISIBLE | WS_CLIPCHILDREN | 
    WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
CAPTION "Example ActiveX Scripting Host"
MENU IDR_MAIN_MENU
FONT 8, "MS Sans Serif"
BEGIN
    EDITTEXT        IDC_TRACE,0,3,249,195,ES_MULTILINE | ES_AUTOVSCROLL | 
                    ES_AUTOHSCROLL | ES_READONLY
END

IDD_ENGINELIST DIALOGEX 0, 0, 186, 95
STYLE DS_MODALFRAME | DS_NOIDLEMSG | DS_SETFOREGROUND | DS_3DLOOK | 
    WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_NOPARENTNOTIFY
CAPTION "Choose engine"
FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
    LISTBOX         IDC_ENGINELIST,0,0,185,94,LBS_NOINTEGRALHEIGHT | 
                    WS_VSCROLL | WS_TABSTOP
END

#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//

1 TEXTINCLUDE DISCARDABLE 
BEGIN
    "resource.h\0"
END

2 TEXTINCLUDE DISCARDABLE 
BEGIN
    "#include ""afxres.h""\r\n"
    "\0"
END

#endif    // APSTUDIO_INVOKED


#endif    // English (U.S.) resources

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions