Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version
Go to top

Calculator

, 9 Jun 2003
Calculator using MFC, Dialog based application.
calculater_demo.zip
dialog_based
dialog_based.clw
dialog_based.dsp
dialog_based.dsw
arrowcop.cur
res
dialog_based.ico
Reign Find.ico
HardLine Workgroup.ico
See Control Panel.ico
exe.zip
dialog_based.exe
//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

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

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

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

3 TEXTINCLUDE DISCARDABLE 
BEGIN
    "#define _AFX_NO_SPLITTER_RESOURCES\r\n"
    "#define _AFX_NO_OLE_RESOURCES\r\n"
    "#define _AFX_NO_TRACKER_RESOURCES\r\n"
    "#define _AFX_NO_PROPERTY_RESOURCES\r\n"
    "\r\n"
    "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
    "#ifdef _WIN32\r\n"
    "LANGUAGE 9, 1\r\n"
    "#pragma code_page(1252)\r\n"
    "#endif //_WIN32\r\n"
    "#include ""res\\dialog_based.rc2""  // non-Microsoft Visual C++ edited resources\r\n"
    "#include ""afxres.rc""         // Standard components\r\n"
    "#endif\r\n"
    "\0"
END

#endif    // APSTUDIO_INVOKED


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

// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDR_MAINFRAME           ICON    DISCARDABLE     "res\\See Control Panel.ico"

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

IDD_ABOUTBOX DIALOGEX 0, 0, 263, 81
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_TOOLWINDOW | WS_EX_CLIENTEDGE | WS_EX_STATICEDGE
CAPTION "Calculater"
FONT 8, "MS Sans Serif"
BEGIN
    ICON            IDR_MAINFRAME,IDC_STATIC,17,14,27,25,SS_SUNKEN | 
                    WS_BORDER,WS_EX_CLIENTEDGE
    LTEXT           "Calculater Version 1.0",IDC_STATIC,80,10,93,11,
                    SS_NOPREFIX
    LTEXT           "Copyright (C) 2002",IDC_STATIC,80,25,66,8
    DEFPUSHBUTTON   "OK",IDOK,206,7,50,14,WS_GROUP
    LTEXT           "This Calculater is Developed by Mohammad Tahir Naeem  . For any help you can mail me at sensitive007@hotmail.com",
                    IDC_STATIC,54,42,191,21
END

IDD_DIALOG_BASED_DIALOG DIALOGEX 0, 0, 303, 150
STYLE DS_MODALFRAME | DS_3DLOOK | DS_CENTERMOUSE | WS_MINIMIZEBOX | WS_POPUP | 
    WS_VISIBLE | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW
CAPTION "Calculater"
FONT 9, "Comic Sans MS"
BEGIN
    EDITTEXT        IDC_EDIT1,52,7,198,13,ES_RIGHT | ES_AUTOHSCROLL
    PUSHBUTTON      "+",IDC_ADD,231,56,17,16,BS_FLAT | NOT WS_TABSTOP
    DEFPUSHBUTTON   "=",IDC_EQUAL,237,113,47,16,BS_FLAT | NOT WS_TABSTOP
    PUSHBUTTON      "--",IDC_SUBTRACT,231,75,17,15,BS_FLAT | NOT WS_TABSTOP
    PUSHBUTTON      "cos",IDC_cos,65,47,19,15,BS_FLAT | NOT WS_TABSTOP
    PUSHBUTTON      "sin",IDC_sin,42,46,18,16,BS_FLAT | NOT WS_TABSTOP
    PUSHBUTTON      "*",IDC_mul,252,56,17,16,BS_FLAT | NOT WS_TABSTOP
    PUSHBUTTON      "tan",IDC_tan,89,47,18,17,BS_FLAT | NOT WS_TABSTOP
    PUSHBUTTON      "log",IDC_log,41,66,17,14,BS_FLAT | NOT WS_TABSTOP
    PUSHBUTTON      "n!",IDC_factoriel,89,66,18,15,BS_FLAT | NOT WS_TABSTOP
    PUSHBUTTON      "ln",IDC_ln,65,67,18,13,BS_FLAT | NOT WS_TABSTOP
    CONTROL         "Inv.",IDC_inv,"Button",BS_AUTOCHECKBOX | BS_FLAT | 
                    WS_TABSTOP,24,26,28,10
    CONTROL         "",IDC_STATIC,"Static",SS_BLACKFRAME,19,24,79,12
    CONTROL         "hyp",IDC_Hp,"Button",BS_AUTOCHECKBOX | BS_FLAT | 
                    WS_TABSTOP,62,27,34,8
    PUSHBUTTON      "/",IDC_devide,253,75,17,15,BS_FLAT
    PUSHBUTTON      "BACKSPACE",IDC_bsp,176,30,45,14,BS_FLAT
    PUSHBUTTON      "M",IDC_M,113,47,19,15,BS_FLAT
    PUSHBUTTON      "M+",IDC_MM,113,66,19,15,BS_FLAT
    PUSHBUTTON      "MR",IDC_MR,114,84,19,15,BS_FLAT
    PUSHBUTTON      "x^y",IDC_pow,41,86,18,15,BS_FLAT
    PUSHBUTTON      "x^2",IDC_x2,65,84,18,15,BS_FLAT
    PUSHBUTTON      "x^3",IDC_x3,90,85,18,15,BS_FLAT
    PUSHBUTTON      "PI",IDC_pi,66,104,17,14,BS_FLAT
    PUSHBUTTON      "MC",IDC_MC,114,104,19,14,BS_FLAT
    CONTROL         "",IDC_STATIC,"Static",SS_BLACKFRAME,6,1,295,142
    PUSHBUTTON      "1",IDC_b1,149,97,19,14,BS_FLAT
    PUSHBUTTON      "2",IDC_b2,174,97,19,14,BS_FLAT
    PUSHBUTTON      "3",IDC_b3,198,97,19,14,BS_FLAT
    PUSHBUTTON      "4",IDC_b4,149,78,19,14,BS_FLAT
    PUSHBUTTON      "5",IDC_b5,173,78,19,14,BS_FLAT
    PUSHBUTTON      "6",IDC_b6,198,77,19,14,BS_FLAT
    PUSHBUTTON      "7",IDC_b7,149,59,19,14,BS_FLAT
    PUSHBUTTON      "8",IDC_b8,172,59,19,14,BS_FLAT
    PUSHBUTTON      "9",IDC_b9,197,59,19,14,BS_FLAT
    PUSHBUTTON      "0",IDC_b10,149,116,19,14,BS_FLAT
    PUSHBUTTON      ".",IDC_bp,175,116,19,14,BS_FLAT
    PUSHBUTTON      "+/-",IDC_bp2,198,116,19,14,BS_FLAT
    CONTROL         "",IDC_STATIC,"Static",SS_BLACKFRAME,141,50,85,86
    CONTROL         "",IDC_STATIC,"Static",SS_BLACKFRAME,16,39,120,97
    CONTROL         "",IDC_STATIC,"Static",SS_BLACKFRAME,229,53,62,87
    PUSHBUTTON      "C",IDC_clear2,263,34,26,14,BS_FLAT
    CONTROL         "",IDC_STATIC,"Static",SS_BLACKFRAME,231,30,61,22
    PUSHBUTTON      "OR",IDC_OR,273,56,16,15,BS_FLAT
    PUSHBUTTON      "1/x",IDC_1x,89,104,18,15,BS_FLAT
    PUSHBUTTON      "stat",IDC_stat,19,46,18,15,BS_FLAT
    PUSHBUTTON      "avg",IDC_st2,19,66,18,15,BS_FLAT | WS_DISABLED
    PUSHBUTTON      "sum",IDC_sum,19,85,18,15,BS_FLAT | WS_DISABLED
    PUSHBUTTON      "S",IDC_s,19,104,18,15,BS_FLAT | WS_DISABLED
    PUSHBUTTON      "data",IDC_data,41,104,18,15,BS_FLAT | WS_DISABLED
    PUSHBUTTON      "DATE",IDC_DATE,264,10,27,15,BS_FLAT,WS_EX_TRANSPARENT
    PUSHBUTTON      "root",IDC_root,19,121,35,13,BS_FLAT | NOT WS_TABSTOP
    PUSHBUTTON      "n-th root",IDC_root2,99,121,34,13,BS_FLAT | NOT 
                    WS_TABSTOP
    EDITTEXT        IDC_sd,16,9,13,12,ES_AUTOHSCROLL | ES_READONLY | NOT 
                    WS_BORDER
    PUSHBUTTON      "AC",IDC_clear,236,34,24,14,BS_FLAT
    PUSHBUTTON      "And",IDC_And,273,75,16,15,BS_FLAT
    PUSHBUTTON      "XOR",IDC_XOR,273,92,16,15,BS_FLAT
    PUSHBUTTON      "mod",IDC_MOd,253,92,17,15,BS_FLAT
END

IDD_DIALOG1 DIALOGEX 0, 0, 215, 162
STYLE DS_3DLOOK | WS_CAPTION
FONT 9, "Palatino Linotype"
BEGIN
    DEFPUSHBUTTON   "CLOSE",IDOK,70,133,65,20,BS_FLAT,WS_EX_TRANSPARENT
    CONTROL         "MonthCalendar1",IDC_MONTHCALENDAR1,"SysMonthCal32",
                    MCS_WEEKNUMBERS | WS_TABSTOP,7,7,201,123,
                    WS_EX_CLIENTEDGE | WS_EX_STATICEDGE
END


#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//

VS_VERSION_INFO VERSIONINFO
 FILEVERSION 1,0,0,1
 PRODUCTVERSION 1,0,0,1
 FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
 FILEFLAGS 0x29L
#else
 FILEFLAGS 0x28L
#endif
 FILEOS 0x4L
 FILETYPE 0x1L
 FILESUBTYPE 0x0L
BEGIN
    BLOCK "StringFileInfo"
    BEGIN
        BLOCK "040904b0"
        BEGIN
            VALUE "Comments", "Tahir\0"
            VALUE "CompanyName", "Mettellicca\0"
            VALUE "FileDescription", "Application by Tahir Naeem\0"
            VALUE "FileVersion", "1, 0, 0, 1\0"
            VALUE "InternalName", "Caculater\0"
            VALUE "LegalCopyright", "Copyright (C) 2002\0"
            VALUE "LegalTrademarks", "6.6\0"
            VALUE "OriginalFilename", "CACLULATOR.EXE\0"
            VALUE "PrivateBuild", "3.3\0"
            VALUE "ProductName", "Calculate\0"
            VALUE "ProductVersion", "1, 0, 0, 1\0"
            VALUE "SpecialBuild", "1.3\0"
        END
    END
    BLOCK "VarFileInfo"
    BEGIN
        VALUE "Translation", 0x409, 1200
    END
END

#endif    // !_MAC


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

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

    IDD_DIALOG_BASED_DIALOG, DIALOG
    BEGIN
        LEFTMARGIN, 6
        RIGHTMARGIN, 301
        TOPMARGIN, 1
        BOTTOMMARGIN, 143
    END

    IDD_DIALOG1, DIALOG
    BEGIN
        LEFTMARGIN, 7
        RIGHTMARGIN, 208
        TOPMARGIN, 7
        BOTTOMMARGIN, 155
    END
END
#endif    // APSTUDIO_INVOKED


/////////////////////////////////////////////////////////////////////////////
//
// Cursor
//

IDC_POINTER_COPY        CURSOR  DISCARDABLE     "arrowcop.cur"

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

IDR_MENU1 MENU DISCARDABLE 
BEGIN
    POPUP "Menu"
    BEGIN
        MENUITEM "Close ?",                     ID_CL
    END
END


/////////////////////////////////////////////////////////////////////////////
//
// String Table
//

STRINGTABLE DISCARDABLE 
BEGIN
    IDS_ABOUTBOX            "&About dialog_based..."
END

STRINGTABLE DISCARDABLE 
BEGIN
    IDC_devide              "*****Devide******"
END

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



#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
#define _AFX_NO_SPLITTER_RESOURCES
#define _AFX_NO_OLE_RESOURCES
#define _AFX_NO_TRACKER_RESOURCES
#define _AFX_NO_PROPERTY_RESOURCES

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE 9, 1
#pragma code_page(1252)
#endif //_WIN32
#include "res\dialog_based.rc2"  // non-Microsoft Visual C++ edited resources
#include "afxres.rc"         // Standard components
#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 has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Tahir Naeem

Unknown
No Biography provided

| Advertise | Privacy | Mobile
Web04 | 2.8.140926.1 | Last Updated 10 Jun 2003
Article Copyright 2002 by Tahir Naeem
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid