Click here to Skip to main content
15,894,017 members
Articles / Desktop Programming / MFC

WndImage Control

Rate me:
Please Sign up or sign in to vote.
5.00/5 (17 votes)
6 May 2002CPOL 122.4K   6.2K   79  
An easy-to-use control to display bitmaps (stretch, scale, tile)
//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

/////////////////////////////////////////////////////////////////////////////
// German (Germany) resources

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
#ifdef _WIN32
LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
#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\\ImgTest.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\\ImgTest.ico"

/////////////////////////////////////////////////////////////////////////////
//
// Bitmap
//

IDB_BITMAP2             BITMAP  DISCARDABLE     "res\\fem12L.bmp"
#endif    // German (Germany) resources
/////////////////////////////////////////////////////////////////////////////


/////////////////////////////////////////////////////////////////////////////
// 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

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

IDD_IMGTEST_DIALOG DIALOGEX 0, 0, 232, 153
STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
EXSTYLE WS_EX_APPWINDOW
CAPTION "ImgTest"
FONT 8, "MS Sans Serif"
BEGIN
    CONTROL         "1:1",IDC_1_1,"Button",BS_AUTORADIOBUTTON | WS_GROUP,7,7,
                    26,10
    CONTROL         "Stretch",IDC_STRETCH,"Button",BS_AUTORADIOBUTTON,7,22,
                    39,10
    CONTROL         "StretchXY",IDC_STRETCHXY,"Button",BS_AUTORADIOBUTTON,7,
                    37,48,10
    CONTROL         "StretchSm",IDC_STRETCHSM,"Button",BS_AUTORADIOBUTTON,7,
                    52,49,10
    CONTROL         "Tile",IDC_TILE,"Button",BS_AUTORADIOBUTTON,7,67,27,10
    CONTROL         "<<",IDC_RB_LEFT,"Button",BS_AUTORADIOBUTTON | 
                    BS_PUSHLIKE | WS_GROUP,66,8,15,14
    CONTROL         "||",IDC_CENTERX,"Button",BS_AUTORADIOBUTTON | 
                    BS_PUSHLIKE,86,8,15,14
    CONTROL         ">>",IDC_RIGHT,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE,
                    106,8,15,14
    CONTROL         "^",IDC_TOP,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE | 
                    WS_GROUP,65,23,15,14
    CONTROL         "--",IDC_CENTERY,"Button",BS_AUTORADIOBUTTON | 
                    BS_PUSHLIKE,65,38,15,14
    CONTROL         "v",IDC_BOTTOM,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE,
                    65,52,15,14
    CONTROL         "Custom Demo",IDC_CB_CUSTOM,"Button",BS_AUTOCHECKBOX | 
                    BS_PUSHLIKE | WS_TABSTOP,139,7,60,14
    PUSHBUTTON      "?",IDC_INFO,211,7,14,14
    CONTROL         "Window Background",IDC_CB_WINBACK,"Button",
                    BS_AUTOCHECKBOX | WS_TABSTOP,137,26,83,10
    CTEXT           "Placeholder for WndImage control",IDC_ST_IMG,129,51,96,
                    95,WS_BORDER
END

IDD_ABOUT DIALOG DISCARDABLE  0, 0, 225, 181
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Info"
FONT 8, "MS Sans Serif"
BEGIN
    DEFPUSHBUTTON   "OK",IDOK,87,160,50,14
    CTEXT           "CWndImage Copyright (C) Peter Hauptmann",IDC_STATIC,7,7,
                    211,8
    CTEXT           "Free for use as long as the copyright stays intact.",
                    IDC_STATIC,7,17,211,10
    CTEXT           "Updated version can be found under\r\nhttp://buerger.metropolis.de/bitbucket",
                    IDC_STATIC,7,30,211,21
    CTEXT           "Blit 1:1\r\nStretch to fit,\r\nStretch Proportional to fit X/Y/Larger/Smaller\r\nTile Fill\r\nCustom Zoom\r\n-=-\r\nalign left/center/right\r\n align top / center / bottom\r\ncustom Origin\r\n-=-\r\nSelect rect of source window",
                    IDC_STATIC,7,52,211,91
END


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

VS_VERSION_INFO VERSIONINFO
 FILEVERSION 1,0,0,1
 PRODUCTVERSION 1,0,0,1
 FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
 FILEFLAGS 0x1L
#else
 FILEFLAGS 0x0L
#endif
 FILEOS 0x4L
 FILETYPE 0x1L
 FILESUBTYPE 0x0L
BEGIN
    BLOCK "StringFileInfo"
    BEGIN
        BLOCK "040904B0"
        BEGIN
            VALUE "CompanyName", "\0"
            VALUE "FileDescription", "ImgTest MFC Application\0"
            VALUE "FileVersion", "1, 0, 0, 1\0"
            VALUE "InternalName", "ImgTest\0"
            VALUE "LegalCopyright", "Copyright (C) 2000\0"
            VALUE "LegalTrademarks", "\0"
            VALUE "OriginalFilename", "ImgTest.EXE\0"
            VALUE "ProductName", "ImgTest Application\0"
            VALUE "ProductVersion", "1, 0, 0, 1\0"
        END
    END
    BLOCK "VarFileInfo"
    BEGIN
        VALUE "Translation", 0x409, 1200
    END
END

#endif    // !_MAC


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

#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE 
BEGIN
    IDD_IMGTEST_DIALOG, DIALOG
    BEGIN
        LEFTMARGIN, 7
        RIGHTMARGIN, 225
        TOPMARGIN, 7
        BOTTOMMARGIN, 146
    END

    IDD_ABOUT, DIALOG
    BEGIN
        LEFTMARGIN, 7
        RIGHTMARGIN, 218
        TOPMARGIN, 7
        BOTTOMMARGIN, 174
    END
END
#endif    // APSTUDIO_INVOKED

#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\ImgTest.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, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Klippel
Germany Germany
Peter is tired of being called "Mr. Chen", even so certain individuals insist on it. No, he's not chinese.

Peter has seen lots of boxes you youngsters wouldn't even accept as calculators. He is proud of having visited the insides of a 16 Bit Machine.

In his spare time he ponders new ways of turning groceries into biohazards, or tries to coax South American officials to add some stamps to his passport.

Beyond these trivialities Peter works for Klippel[^], a small german company that wants to make mankind happier by selling them novel loudspeaker measurement equipment.


Where are you from?[^]



Please, if you are using one of my articles for anything, just leave me a comment. Seeing that this stuff is actually useful to someone is what keeps me posting and updating them.
Should you happen to not like it, tell me, too

Comments and Discussions