Please help me!
I''ve followed a tutorial on this site *to the letter* and still something is very wrong with my app: it is supposed to blt a bitmap to the screen but two things have gone wrong.
1) There''s a load of crap at the bottom of the screen that wasn''t part of the bitmap.
2) The cursor doesn''t appear at all...
Pleeez help the newbie
KlDzny
"Success can make you persevere for hours, failure can make you quit in seconds" - KlDzny
"Success can make you persevere for hours, failure can make you quit in seconds" - KlDzny
Does the bitmap show as it is supposed to?
1) the junk at the bottom of the screen is probably whatever was in your video memory before the surface was created.. you get that until you blit something else to that part of the surface (screen).
2) ShowCursor(TRUE); // Hope this helps : )
if you have "ShowCursor(FALSE);" anywhere in your program it will hide the cursor.. ShowCursor(TRUE); shows the cursor once again
hope this helps : )
1) the junk at the bottom of the screen is probably whatever was in your video memory before the surface was created.. you get that until you blit something else to that part of the surface (screen).
2) ShowCursor(TRUE); // Hope this helps : )
if you have "ShowCursor(FALSE);" anywhere in your program it will hide the cursor.. ShowCursor(TRUE); shows the cursor once again
hope this helps : )
For your first problem, I offer two suggestions:
1) You may not be defining your destination (or source) RECT
correctly. Double-check the coords. If you set it wrong, the
extra space will be filled with garbage.
2) The surface isn''t cleared. In other words, the memory in
VRAM still has a bunch of garbage in it. If you know how to
do a memory fill using Blt(), do it. If not, then you''ll have
to clear the surface either line-by-line (if lPitch is not
linear) or with memset().
as for your second problem, I dunno. There is a function called ShowCursor() that accepts TRUE or FALSE. It displays or hides the cursor. Try calling ShowCursor(TRUE); and see if that works.
Note that I''m not sure about the first problem any more than the second one - those are the only two things I could think of.
==============================
\\// live long and prosper; \||/ die short and rot.
==============================
1) You may not be defining your destination (or source) RECT
correctly. Double-check the coords. If you set it wrong, the
extra space will be filled with garbage.
2) The surface isn''t cleared. In other words, the memory in
VRAM still has a bunch of garbage in it. If you know how to
do a memory fill using Blt(), do it. If not, then you''ll have
to clear the surface either line-by-line (if lPitch is not
linear) or with memset().
as for your second problem, I dunno. There is a function called ShowCursor() that accepts TRUE or FALSE. It displays or hides the cursor. Try calling ShowCursor(TRUE); and see if that works.
Note that I''m not sure about the first problem any more than the second one - those are the only two things I could think of.
==============================
\\// live long and prosper; \||/ die short and rot.
==============================
Drew Sikora
Executive Producer
GameDev.net
DAAARGH!!!! Corfe, you beat me to it man! I should stop thinking so much while writing these things.... well at least I feel better about my response. Although if I had been patient, you probably could have saved me some writing.... oh well Peace.
==============================
\\// live long and prosper; \||/ die short and rot.
==============================
Edited by - Gaiiden on October 10, 2000 7:02:44 PM
==============================
\\// live long and prosper; \||/ die short and rot.
==============================
Edited by - Gaiiden on October 10, 2000 7:02:44 PM
Drew Sikora
Executive Producer
GameDev.net
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement