natty Posted July 19, 2006 Share Posted July 19, 2006 hello, I am new about directdraw, I recently setup directx9 and wanna load and display some pictures in my MFC program.the MFC program is a single document program and started by the AppWizard and the VIEW is derived from CScrollView. Firstly I created a primary surface and a offscreen surface.Then I use BitBlt() to copy some picture files onto the offscreen surface.Finally,in CXXXView::OnDraw(), I use Blt() to copy the offscreen surface to primary surface.The program is running all right , But when I OnSize or Drag the HBar(VBar), the picture should move but not.I think that the coordinate argument of the Blt() should be a variable instead of a constant, and I need to add some codes in OnHScroll(), OnVScroll(), OnSize(), OnMove().So there are two questions I would like to ask:1.Is my method RIGHT if I want to use directdraw in View in a single document program ?2.Whether I need to manually override and add some codes in OnMove(),OnSize(),etc. And what codes should I add? Is there any sample?the second question has made me nearly mad, I found lots of sample and document, but all of them is just display a picture in VIEW, never mentioned the movement situation. Thank you ! Link to comment Share on other sites More sharing options...
Royalty Posted July 19, 2006 Share Posted July 19, 2006 I'm pretty sure that would be in 1 of the programming sections, cause I have no idea what the heck your talking about. Link to comment Share on other sites More sharing options...
WolfX2 Posted July 19, 2006 Share Posted July 19, 2006 @natty - Woa...and i thought photo-shop was complicated ...sorry buddy, i have no clue what your talking about Link to comment Share on other sites More sharing options...
natty Posted July 20, 2006 Author Share Posted July 20, 2006 i'm sorry, maybe i post the article into a wrong place.what do you mean that you couldn't understand what i said?more programming or my bad English.....? Link to comment Share on other sites More sharing options...
WolfX2 Posted July 29, 2006 Share Posted July 29, 2006 your English is fine, i just don't understand what your talking about program wise Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now