How to load a bmp?????

is there a way i can load and display with C++ alone(no other things like directx or allegro) in dos??

thanx

Comments

  • If you're under Windows, it's 1 line, else about 100...
    _____________________________
    [size=1][b][grey]Cold[/grey][blue]Shine[/blue][/b]
    http://www16.brinkster.com/rafonline[/size]


  • Hey,

    You said you can do it in 1 line in windows, how do you do that.

    Thanks


  • HBITMAP bitmap; //The bitmap

    //hInst is the WinMain HINSTANCE parameter
    bitmap = LoadBitmap(hInst,"bitmap.bmp"); //Load 'bitmap.bmp' to 'bitmap'




    [b][size=3][red]CocaCola[/red][/size][/b]
    [italic]ICQ:[/italic] [blue]50302279[/blue]
    [italic]E-mail:[/italic] [email protected]


  • : HBITMAP bitmap; //The bitmap
    :
    : //hInst is the WinMain HINSTANCE parameter
    : bitmap = LoadBitmap(hInst,"bitmap.bmp"); //Load 'bitmap.bmp' to 'bitmap'
    :
    Once its loaded, how do you display it?


  • : You said you can do it in 1 line in windows, how do you do that.

    Use LoadImage.

    LoadImage(NULL, filename, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE);
    --
    [italic][blue]Sunlight[/blue][/italic]


  • You get the bmp file structure in www.wotsit.org and use the info there to figure out how to load it.

    Most files can be loaded if you know their structure.



Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories