Wc_static

This is a discussion on Wc_static within the Windows Programming forums, part of the Platform Specific Boards category; Hi everyone, I have the following resource (a dialog box with a picture frame in it, intended to display a ...

  1. #1
    Registered User
    Join Date
    Feb 2010
    Posts
    128

    Wc_static

    Hi everyone,

    I have the following resource (a dialog box with a picture frame in it, intended to display a picture known as "IDB_SUNPIC"):

    Code:
    LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
    IDD_SUNPAGE DIALOG 0, 0, 490, 352
    STYLE DS_3DLOOK | DS_CENTER | DS_MODALFRAME | DS_FIXEDSYS | WS_VISIBLE | WS_BORDER | 
    
    WS_CAPTION | WS_DLGFRAME | WS_POPUP | WS_SYSMENU
    CAPTION "Latest Sun"
    FONT 8, "Ms Shell Dlg 2"
    {
        CONTROL         IDB_SUNPIC, IDC_SUNFRAME, WC_STATIC, SS_BITMAP, 30, 12, 341, 236
    }
    I get the message:
    Code:
    error RC2104 : undefined keyword or key name: WC_STATIC
    I know what this means, but I am confused as to how I define WC_STATIC. If I do this:

    Code:
    #define WC_STATIC                               -2
    ...The button I press to open the dialog box does not work. What do I need to do? Is there a different way to display images in dialog boxes and frames?

    Thanks.

  2. #2
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,765
    WC_STATIC should be declared in Windows.h.
    I have no idea why it wouldn't declare it if you are including Windows.h properly (is there an include windows.h statement?).
    If all fails, you could try manually adding
    Code:
    #define WC_STATIC               "Static"
    in your resource.h file.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #3
    Registered User
    Join Date
    Feb 2010
    Posts
    128
    The "Static" definition worked - thanks.

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21