bitmap covers text

This is a discussion on bitmap covers text within the Windows Programming forums, part of the Platform Specific Boards category; I simply try to put a picture of bitmap (100x116 pixels, indexed color) in my dialog (VC++ 6.0 resource editor ...

  1. #1
    vn1
    vn1 is offline
    Registered User vn1's Avatar
    Join Date
    Jun 2002
    Posts
    13

    Unhappy bitmap covers text

    I simply try to put a picture of bitmap (100x116 pixels, indexed color) in my dialog (VC++ 6.0 resource editor on Win2K). Compiled dialog looks OK, but on other Win versions (98, 95, XP) picture starts to cover adjacent text. Well, I could move textboxes and radio buttons further, but it feels very uncontrollable.
    What I must check: bitmap, font or resource editor?
    Last edited by vn1; 01-07-2003 at 02:17 AM.
    Vaidotas.Vilnius.lt

  2. #2
    vn1
    vn1 is offline
    Registered User vn1's Avatar
    Join Date
    Jun 2002
    Posts
    13

    thread icon

    why icon of my thread looks so strange: letter with black hole in center of it?
    Vaidotas.Vilnius.lt

  3. #3
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231

    Re: thread icon

    Originally posted by vn1
    why icon of my thread looks so strange: letter with black hole in center of it?
    The black hole means you posted on this thread.
    The style of letter shown denotes if you have read the new posts or not.

    Anymore questions, PM me or another mod for assistance, as this is off topic for this thread.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  4. #4
    vn1
    vn1 is offline
    Registered User vn1's Avatar
    Join Date
    Jun 2002
    Posts
    13

    W2K vs. 98

    I provide code for my question:
    Code:
    IDD_START DIALOG DISCARDABLE  0, 0, 253, 148
    STYLE DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
    CAPTION "My caption"
    FONT 8, "MS Sans Serif"
    BEGIN
        CONTROL         "Action 1",IDC_AC1,"Button",
                        BS_AUTORADIOBUTTON,80,21,77,16
        CONTROL         "Action 2",IDC_AC2,
                        "Button",BS_AUTORADIOBUTTON,80,66,139,14
        CONTROL         "Action 3",IDC_AC3,
                        "Button",BS_AUTORADIOBUTTON,80,43,143,16
        CONTROL         106,IDC_STATIC,"Static",SS_BITMAP,21,21,50,58
    END
    Dialog, compiled under W2K, looks OK (I realize, according MSDN my bitmap would occupy x=21+50=71, radio buttons should be painted starting at x=80).
    But when I run program on Win98, radio buttons covers ~10% of bitmap's left side .
    Tried on identical screen resolutions - problem remains.
    Which options to check?
    Last edited by vn1; 01-07-2003 at 04:52 AM.
    Vaidotas.Vilnius.lt

  5. #5
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,853
    Do the machines have the same default font size?

    That is 96 dpi or small (normal) fonts? (under the display settings, under the Advanced tab in Win2000)

    If not the bitmap will be scaled differently when the dialog is created.

    Try a BitBlt() or StretchBit() (with the size calculated on the client area, to ensure it appears the same.
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

  6. #6
    vn1
    vn1 is offline
    Registered User vn1's Avatar
    Join Date
    Jun 2002
    Posts
    13
    You're 100% right! There was large fonts on developers machine. After change to small, my dialog looks OK on all reincarnations. Thanks!
    Vaidotas.Vilnius.lt

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. bitmap not going onto screen
    By stallion in forum Windows Programming
    Replies: 4
    Last Post: 02-22-2003, 09:07 AM
  2. No one can seem to help me, loading bitmap
    By Shadow12345 in forum C++ Programming
    Replies: 7
    Last Post: 12-28-2002, 12:22 PM
  3. Replies: 1
    Last Post: 07-13-2002, 05:45 PM
  4. Saving a bitmap.
    By jdinger in forum Game Programming
    Replies: 4
    Last Post: 05-01-2002, 01:40 PM
  5. texture is all white in opengl!
    By Crossbow in forum Game Programming
    Replies: 7
    Last Post: 03-31-2002, 10:54 AM

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