Thread: Wc_static

  1. #1
    george7378
    Guest

    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をこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    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
    george7378
    Guest
    The "Static" definition worked - thanks.

Popular pages Recent additions subscribe to a feed