GIDForums  

Go Back   GIDForums > Computer Programming Forums > CPP / C++ Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 25-Oct-2003, 14:44
BlackLion BlackLion is offline
New Member
 
Join Date: Oct 2003
Posts: 1
BlackLion is an unknown quantity at this point

How do I import images and media into c++


I am learning computer programming for game development. I have studied alot but I don't know how to put media and import media from other sorces into my code. Please do not tell me to study more because i am in the process. This is just something that I have been looking forward to and would like a straight answer.
  #2  
Old 11-Nov-2003, 08:15
aidanh aidanh is offline
New Member
 
Join Date: Nov 2003
Posts: 2
aidanh is an unknown quantity at this point
you can use LoadImage, for example if you want to load a bitmap from a file use:

CHAR * bmp_name;

HBITMAP hBitmap = (HBITMAP)LoadImage( hInst, bmp_name, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE);

this will give you a handle to a bitmap.

If you are using DDraw, and want to load image onto a surface, use:

HRESULT hr = D3DXLoadSurfaceFromFile( ... )

check out params on MSDN website
 
 

Recent GIDBlogNARMY by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 19:15.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.