Click here to Skip to main content
15,886,110 members
Articles / Mobile Apps / Windows Mobile

Basic Instrumentation and Profiling Framework for C++

Rate me:
Please Sign up or sign in to vote.
5.00/5 (15 votes)
9 Oct 2008CPOL27 min read 76.3K   979   50  
Macro based framework written for C++ applications that will allow basic instrumentation and profiling features
//Microsoft Visual C++ generated resource script.
//
#include "resourceppc.h"

#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#define APSTUDIO_HIDDEN_SYMBOLS
#include "resdefce.h"
#undef APSTUDIO_HIDDEN_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
LANGUAGE 9, 1
#pragma code_page(1252)

/////////////////////////////////////////////////////////////////////////////
//
// Icon
//

// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.

IDI_INSTRUMENT       ICON         "Instrument.ico"

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

IDR_MENU MENU DISCARDABLE 
BEGIN
    POPUP "Help"
    BEGIN
        MENUITEM "About",		IDM_HELP_ABOUT
    END
END

/////////////////////////////////////////////////////////////////////////////
//
// Accelerator
//

IDC_INSTRUMENT ACCELERATORS
BEGIN
    "A",            IDM_HELP_ABOUT,         VIRTKEY, CONTROL, NOINVERT
    "Q",            IDM_OK,          VIRTKEY, CONTROL, NOINVERT
END


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

IDD_ABOUTBOX DIALOG 0, 0, 156, 129
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION
EXSTYLE WS_EX_CAPTIONOKBTN
CAPTION "About Instrument"
FONT 8, "MS Shell Dlg"
BEGIN
    ICON         IDI_INSTRUMENT,IDC_STATIC_1,12,12,21,20,SS_REALSIZEIMAGE
    LTEXT        "Instrument Version 1.0",IDC_STATIC_2,12,36,70,8,SS_NOPREFIX
    LTEXT        "Copyright (C) 2008",IDC_STATIC_3,12,48,66,8
END

IDD_ABOUTBOX_WIDE DIALOG 0, 0, 210, 129
STYLE WS_POPUP | WS_CAPTION 
EXSTYLE WS_EX_CAPTIONOKBTN
CAPTION "About Instrument"
FONT 8, "MS Shell Dlg"
BEGIN
    ICON         IDI_INSTRUMENT,IDC_STATIC_1,12,12,21,20,SS_REALSIZEIMAGE
    LTEXT        "Instrument Version 1.0",IDC_STATIC_2,48,12,66,8,SS_NOPREFIX
    LTEXT        "Copyright (C) 2008",IDC_STATIC_3,48,24,66,8
END

/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//

#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE 
BEGIN
    IDD_ABOUTBOX, DIALOG
    BEGIN
        LEFTMARGIN, 7
        RIGHTMARGIN, 149
        TOPMARGIN, 7
        BOTTOMMARGIN, 122
    END

    IDD_ABOUTBOX_WIDE, DIALOG
    BEGIN
        LEFTMARGIN, 7
        RIGHTMARGIN, 203
        TOPMARGIN, 7
        BOTTOMMARGIN, 122
    END
END
#endif    // APSTUDIO_INVOKED

#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE  
BEGIN
    "resourceppc.h\0"
END

2 TEXTINCLUDE  
BEGIN
    "#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
    "#include ""resdefce.h""\r\n"
    "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
    "\0"
END

3 TEXTINCLUDE  
BEGIN
    "\r\n"
    "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
    "LANGUAGE 9, 1\r\n"
    "#pragma code_page(1252)\r\n"
    "#include ""Instrumentppc.rc2""  // non-Microsoft Visual C++ edited resources\r\n"
    "#endif\r\n"
    "\0"
END

#endif    // APSTUDIO_INVOKED

/////////////////////////////////////////////////////////////////////////////
//
// String Table
//
STRINGTABLE  
BEGIN
   IDC_INSTRUMENT   "INSTRUMENT"
   IDS_APP_TITLE    "Instrument"
   IDS_OK	"OK"
   IDS_HELP	"HELP"
END

#endif
/////////////////////////////////////////////////////////////////////////////


#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
LANGUAGE 9, 1
#pragma code_page(1252)
#include "Instrumentppc.rc2"  // non-Microsoft Visual C++ edited resources
#endif

/////////////////////////////////////////////////////////////////////////////
#endif    // not APSTUDIO_INVOKED

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
Engineer
United States United States
I am a software architect and I have been developing software for nearly two decades. Over the years I have learned to value maintainable solutions first. This has allowed me to adapt my projects to meet the challenges that inevitably appear during development. I use the most beneficial short-term achievements to drive the software I develop towards a long-term vision.

C++ is my strongest language. However, I have also used x86 ASM, ARM ASM, C, C#, JAVA, Python, and JavaScript to solve programming problems. I have worked in a variety of industries throughout my career, which include:
• Manufacturing
• Consumer Products
• Virtualization
• Computer Infrastructure Management
• DoD Contracting

My experience spans these hardware types and operating systems:
• Desktop
o Windows (Full-stack: GUI, Application, Service, Kernel Driver)
o Linux (Application, Daemon)
• Mobile Devices
o Windows CE / Windows Phone
o Linux
• Embedded Devices
o VxWorks (RTOS)
o Greenhills Linux
o Embedded Windows XP

I am a Mentor and frequent contributor to CodeProject.com with tutorial articles that teach others about the inner workings of the Windows APIs.

I am the creator of an open source project on GitHub called Alchemy[^], which is an open-source compile-time data serialization library.

I maintain my own repository and blog at CodeOfTheDamned.com/[^], because code maintenance does not have to be a living hell.

Comments and Discussions