Annotation of mstools/mfc/samples/restool/dlgres.h, revision 1.1

1.1     ! root        1: // dlgres.h : Structures, constants and inline helpers for REStoH.
        !             2: //
        !             3: // This is a part of the Microsoft Foundation Classes C++ library.
        !             4: // Copyright (C) 1992 Microsoft Corporation
        !             5: // All rights reserved.
        !             6: //
        !             7: // This source code is only intended as a supplement to the
        !             8: // Microsoft Foundation Classes Reference and Microsoft
        !             9: // QuickHelp documentation provided with the library.
        !            10: // See these sources for detailed information regarding the
        !            11: // Microsoft Foundation Classes product.
        !            12: 
        !            13: #ifndef __DLGRES_H__
        !            14: #define __DLGRES_H__
        !            15: 
        !            16: /////////////////////////////////////////////////////////////////////////////
        !            17: 
        !            18: #ifndef _NTWIN // already in NT Windows header files
        !            19: typedef struct {
        !            20:        long style;
        !            21:        BYTE cdit;
        !            22:        int x, y;
        !            23:        int cx, cy;
        !            24: } DLGTEMPLATE;
        !            25: 
        !            26: typedef struct {
        !            27:        int x, y;
        !            28:        int cx, cy;
        !            29:        int id;
        !            30:        long style;
        !            31:        // next comes a zero-terminated string,
        !            32:        // then comes a length byte, followed by some data
        !            33: } DLGITEMTEMPLATE;
        !            34: #endif
        !            35: 
        !            36: #define CODEBIT       0x80
        !            37: #define BUTTONCODE    0x80
        !            38: #define EDITCODE      0x81
        !            39: #define STATICCODE    0x82
        !            40: #define LISTBOXCODE   0x83
        !            41: #define SCROLLBARCODE 0x84
        !            42: #define COMBOBOXCODE  0x85
        !            43: 
        !            44: // CheckReadValue:
        !            45: // Returns TRUE iff n isn't either 0 or -1.
        !            46: //
        !            47: inline BOOL CheckReadValue(int n)
        !            48: {
        !            49:        return (n != 0) && (n != -1);
        !            50: }
        !            51: 
        !            52: // SkipString:
        !            53: // Advances the given BYTE* past the string.  Also handles 0xFF/WORD ordinal
        !            54: // string references.
        !            55: //
        !            56: inline BYTE* SkipString(BYTE* pb)
        !            57: {
        !            58:        // Special case for "ordinal" strings: if the first char is
        !            59:        // 0xFF, then the next two chars are really an int.  Skip past it.
        !            60:        if (*pb == 0xFF)
        !            61:                return pb + 3;
        !            62: 
        !            63:        while (*pb++)
        !            64:                ;
        !            65: 
        !            66:        return pb;
        !            67: };
        !            68: 
        !            69: /////////////////////////////////////////////////////////////////////////////
        !            70: 
        !            71: #endif // __DLGRES_H__
        !            72: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.