Advertisement

Question about loading a bitmap into a windows app?????????????

Started by February 27, 2001 06:43 PM
13 comments, last by Merc22 23 years, 11 months ago
i was readin the genesis tutorial on how to program in windows i came across suttin that wasnt really explained it was how to load a bitmap into a window i did this and then i got lost //this part is outside of WinMain HDC phdc; //this part is in WinMain phdc=CreateCompatibleDC(NULL); after this i got lost due to the poor explaining please help me wat do i have to do after this? thanx
The full source code is listed, so you can at least see the steps to the process... could you be more specific as to which parts you don''t understand? I''ll try to clear it up the best I can.

-Ironblayde
 Aeon Software

Down with Tiberia!
"All your women are belong to me." - Nekrophidius
"Your superior intellect is no match for our puny weapons!"
Advertisement
ok
it all started many a day ago
i was readin ure tutorial when i came about a disturbing peice of code

it just said "HDC GetDC(hdc)"
i really had no idea what to do
the paragraphs didnt say much to explain it
that was prob number 1(i fixed it)

prob 2 was this "CreateCompatibleDC(NULL)"
same as above
i had no idea what to do(i fixed it too)

prob number 3 "HGDIOBJ SelectObject(
HDC hdc, // handle to device context
HGDIOBJ hgdiobj // handle to object )

what the hell am i supposed to do wit this?
and this "int GetObject(
HGDIOBJ hgdiobj, // handle to graphics object of interest
int cbBuffer, // size of buffer for object information
LPVOID lpvObject // pointer to buffer for object information )


cant u be a little more specific when u right this stuff(no offense)
They''re just the function prototypes so you know exactly what to pass to the functions. If you can''t understand that maybe you should revise your C knowledge.
i know there prototypes!

but im not sure what to do wit them
assign em to suttin?
wat?
i know there prototypes!

but im not sure what to do wit them
assign em to suttin?
wat?
Advertisement
You don''t do anything with function prototypes, per se. They are merely there to show you which types of variables are passed as arguments to each function. Every function prototype in that article is preceded by a description of what the function does and why it needs to be used, and is followed by a description of the return value, and an explanation of each parameter and what to pass as that parameter. I don''t think you''re likely to find an explanation more detailed than the one that is given there. Furthermore, if any doubt remains, there''s also a source code listing at the bottom of the article, so you can see in practice exactly how each function is used.

Judging from what you''re saying in your post about being confused what to do with function prototypes, then I''d have to agree with the earlier post, that you should get a book on basic C, go through that until you are very comfortable with the language, and only then try to get into Win32 programming.

-Ironblayde
 Aeon Software

Down with Tiberia!
"All your women are belong to me." - Nekrophidius
"Your superior intellect is no match for our puny weapons!"
i knoe C++
i dont think i explained myself too well so ill make it easier for everyone

can someone please write down how to load and show a bitmap on a window using the info given in the genesis tutorials

thanx
i to have had some trouble going through his tutorials some parts aren''t very well explained. so dont go saying well maybe you should read a fricken book, the point is if your gonna post a tutorial you should explain things a bit more clearly. and also dont get mad and say well atleast the tutorial was free.
i am no longer pissed at ure incompetence
someone in my group showed me how to display a bmp

at least he helped and didnt tell me im so stupid i should go read a book

This topic is closed to new replies.

Advertisement