Howdy, Stranger!

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

Categories

DDraw, DirectX 7 SDK - Load bmp to DirectDrawSurface??

Im stuck - Im looking for a function that can take a bmp from file and put it to a surface...only I cant find one that VC++ 6.0 recognizes..
there errror is sometimes "unresolved external" and sometimes "undeclared identifier" (on the function)..

Ive included "mssdkINCLUDE" ... is there something else Im missing? or maybe another function? Ive tried:
DDLoadBitmap
DDReLoadBitmap
DDCopyBitmap
copyBitmap

....any help would be appreciated. blasted "tutorials" and "help" files lie/ dont tell me if I need to add a directory to include..

Comments

  • PAGPAG Member Posts: 168
    : Im stuck - Im looking for a function that can take a bmp from file and put it to a surface...only I cant find one that VC++ 6.0 recognizes..
    : there errror is sometimes "unresolved external" and sometimes "undeclared identifier" (on the function)..
    :
    : Ive included "mssdkINCLUDE" ... is there something else Im missing? or maybe another function? Ive tried:
    : DDLoadBitmap
    : DDReLoadBitmap
    : DDCopyBitmap
    : copyBitmap
    :
    : ....any help would be appreciated. blasted "tutorials" and "help" files lie/ dont tell me if I need to add a directory to include..
    :

    Did you include the ddutil.cpp to the project? if not, it can be found in the examples src directory, look under example 2 i think...
  • Bob IIIBob III Member Posts: 2
    : Did you include the ddutil.cpp to the project? if not, it can be found in the examples src directory, look under example 2 i think...
    :

    Thanks ..but it's already #included. Any other suggestions, Pag, anyone? They'd be greatly appreciated.

    btw, also included are:
    #include
    #include
    #include


    [italic]"Ah yes," he said, "that's to do with the day I finally realized that the world had gone totally mad and built the Asylum to put it in, poor thing, and hoped it would get better."[/italic]

  • PAGPAG Member Posts: 168
    : : Did you include the ddutil.cpp to the project? if not, it can be found in the examples src directory, look under example 2 i think...
    : :
    :
    : Thanks ..but it's already #included. Any other suggestions, Pag, anyone? They'd be greatly appreciated.
    :
    : btw, also included are:
    : #include
    : #include
    : #include
    :
    :
    : [italic]"Ah yes," he said, "that's to do with the day I finally realized that the world had gone totally mad and built the Asylum to put it in, poor thing, and hoped it would get better."[/italic]
    :
    :

    well another way of doing it is writing your own functions, it isnt really that hard, and you would probably learn a few things on the way... I remember I did it, but since it was a year ago and I have jumped over to opengl, so I can't provide any source code... :(

  • CrawfordCrawford Member Posts: 4
    Here's what you have to do:
    1. Lock the surface.
    2. Open your .bmp file, read the header (dimensions etc.), skip it and read the pixels and write them right into the surface. Pay attention to the alignment.
    3. Unlock the surface.

  • Justin BibJustin Bib USAMember Posts: 0

    _______ \ http://forcoder.org \ free video tutorials and ebooks about / Java C++ Scratch Swift JavaScript Perl Ruby Objective-C MATLAB Assembly Visual Basic R PHP Python Go Visual Basic .NET Delphi C# PL/SQL C Crystal FoxPro F# Julia Apex Logo D Clojure Lua COBOL Kotlin Awk Prolog Bash Ada Hack Rust Lisp Transact-SQL Erlang LabVIEW VBScript SAS ML Scheme Scala ABAP Alice Dart Fortran / ___________

Sign In or Register to comment.