Jump to content

natty

Member
  • Posts

    3
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    China

About natty

natty's Achievements

0

Reputation

  1. hello, I am new about directdraw, I recently setup directx9 and wanna load and display some pictures in my MFC program. Here are my steps: the MFC program is a single document program and created by the AppWizard and the VIEW class is derived from CScrollView. Firstly I created a primary surface and a offscreen surface in CMainFrame::OnCreateClient(); Then in OnCreateClient(), I use BitBlt() to copy some picture files onto the offscreen surface. Finally,in CMyView::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 !
  2. 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.....?
  3. 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 !
×
×
  • Create New...