Bitmap display probelm.

This is a discussion on Bitmap display probelm. within the Windows Programming forums, part of the Platform Specific Boards category; http://www.ozzu.comHello , This is Bob from Bangalore, India. I have a doubt . I have a logo . I wanna ...

  1. #1
    Registered User
    Join Date
    May 2005
    Posts
    15

    Bitmap display probelm.

    http://www.ozzu.comHello,
    This is Bob from Bangalore, India. I have a doubt . I have a logo . I wanna display it in the project I

    made. But it is not happening. It worked ina a simple window program. But when I ported the same code in the

    below application which is available in the site it gives me a probelm. Please lemme know what is the probelm.

    The filename is within the zip file namely s2.bmp.

    http://www.geocities.com/kalamirch/Backend2.zip

    Thanking you,
    Bob

  2. #2
    Registered User kryptkat's Avatar
    Join Date
    Dec 2002
    Posts
    638
    That is a nice project. You have two bitmap files

    IDB_TOOLBITMAP1 BITMAP DISCARDABLE "bitmap1.bmp"
    IDB_SIEMENS BITMAP DISCARDABLE "s2.bmp"

    and only one paint structure. You are trying to display 2 bitmaps with one ps. Still looking at it. but that is all i can tell right now.

  3. #3
    Registered User kryptkat's Avatar
    Join Date
    Dec 2002
    Posts
    638
    Let me see that the last time i had a display problem with a bmp file i had to run the brc32 on it and recompile it. that worked for me. you wm-create and loadbmp looks ok. i need to look at it more carefully. try the brc32 then recompile. see if that works.

  4. #4
    Registered User
    Join Date
    May 2005
    Posts
    15
    I dont understand what brc32 is . As in does it work for you. Thanks for telling its a nice project. I am stuck from here have no where to go and what to do abt it.

  5. #5
    Registered User
    Join Date
    May 2005
    Posts
    15
    The 2 bitmaps are there in the project fine. But one is used up in the toolbars. The other bitmap , I just wanted to place it on the main window and it is getting hidden by tab controls and toolbar. Thats the whole probelm.

  6. #6
    Registered User
    Join Date
    May 2005
    Posts
    15
    I am using Visual c++ and dont want to switch to Borland c++. Can you please help me with this.

  7. #7
    Registered User kryptkat's Avatar
    Join Date
    Dec 2002
    Posts
    638
    after looking closer i saw that one was a tool bar.bmp

    brc32.exe is the borland resource compiler. For some reason when i compiled an app also with a pic it did not display. i recompiled the resource then recompiled the prog. that did work.

    with dev are you using a makefile? or just compile?

    will look the project over.

    edit

    did you NMAKE /f "SislProject.mak" ?

    the .mak file is not in the project. wanted to look at it to see how the resource compiler is configured.

    #define IDR_TOOLBAR1 108

    could not find where that is used
    Last edited by kryptkat; 05-27-2005 at 09:03 PM.

  8. #8
    Registered User
    Join Date
    May 2005
    Posts
    15
    Thanks for the time but i am not using dev or borland. I am using vc++. So i cant recomplie the resource file seperately. The image is being displayed but its hidden behind the tab control?toolbar. I can see a thin line which is the image itself. By changing the corrdinates in the bitblt function u can make out about the image in the WM_PAINT.

    aLSO I have one more probelm with the project..

    I have created a win32 Application using Visual c++. How to execute a command line
    program from within a windows program. I am using Win32 api in C. I have a DICOM Image file and I want to convert it to a bmp file by running a command line option pOovided by InfraView, by clicking a button ON MY PROGRAM. I wanna execute a command like "i_view32.exe c:\test.bmp /convert=c:\test.jpg" ....

  9. #9
    Registered User kryptkat's Avatar
    Join Date
    Dec 2002
    Posts
    638
    >How to execute a command line
    program from within a windows program.

    system("commandline.exe"); should work.

    glad you got the prog working. i tryed to compile all of the project this morning and it called for afxres.h which i do not have. i thought it would work that is why i tryed to compile it. to find where the bmp was at. good luck with the project.

  10. #10
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,854
    The reason your image is not displaying is that the TAB and Listview are 'on top' of the image.

    You are drawing to the bottom layer in the z-order.

    But Listviews handle their own drawing so you can't draw to the listviews screen directly (and have it persist).

    Look a 'ownerdraw' and WM_DRAWITEM msg.


    EDIT:
    I think your params in the paint BitBlt() are incorrect (given the size of the image).
    If you use the WS_CHILD style in a createwindow then you should/must cast the HMENU param to the numeric ID for the control.
    ie
    #define IDC_TAB 40001
    CreateWindow(........,(HMENU)IDC_TAB,...)
    Last edited by novacain; 05-28-2005 at 10:55 PM.
    "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

  11. #11
    Registered User
    Join Date
    May 2005
    Posts
    15

    Aint understanding that

    Hi novacain,
    I have no clue of what u saying. As in i am just a beginner. Can you implement the same in my program and send it to me by mail at hemanth.balaji@gmail.com . Please do it for me.

    Hemanth

  12. #12
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,854
    No.

    Sorry, I have too much work of my own to do (and I don't think you can afford my rates).

    Which bit don't you understand?










    PS I would not have posted my e-mail in a public forum......
    "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

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Bitmap Display Probelm
    By hemanth.balaji in forum Windows Programming
    Replies: 1
    Last Post: 06-09-2005, 12:17 PM
  2. OpenGL -- Bitmaps
    By HQSneaker in forum Game Programming
    Replies: 14
    Last Post: 09-06-2004, 04:04 PM
  3. Simple Ddraw question. Display bitmap on a screen.
    By tegwin in forum Game Programming
    Replies: 0
    Last Post: 05-22-2004, 05:50 PM
  4. How to create and display a bitmap programatically?
    By solar3147 in forum Windows Programming
    Replies: 4
    Last Post: 06-24-2003, 02:55 AM
  5. bitmap not going onto screen
    By stallion in forum Windows Programming
    Replies: 4
    Last Post: 02-22-2003, 09:07 AM

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