View previous topic :: View next topic |
Author |
Message |
Sadbrute
Joined: 26 Apr 2011 Posts: 14
|
Posted: Tue Apr 26, 2011 6:12 pm Post subject: Displaying plots MFC C++ |
|
|
I want to display a plot, but when i try to display my picture box (CStatic derived control) Diplot shows first and i have a white bitmap on my picture box. I have implemented ONPaint () on the picture box (it was grey at the beginning and it turns white..) . Does anyone have an idea how to display the actual plot On my picture box ? I do not want a diplot window to pop up.
Code: |
void MyPictureCtrl::OnPaint()
{
HBITMAP bm=this->GetBitmap();
if(bm !=0)
{
CPaintDC dc(this);
// device context for painting
HDC dcmem=::CreateCompatibleDC(dc);
if (dcmem!=0)
{
CBitmap* old = dc.SelectObject((CBitmap*)bm);
//500,500 just to try
::BitBlt(dc,rect_->left,rect_->top,500,500,dcmem,0,0,SRCCOPY);
::SelectObject(dcmem, old);
::DeleteObject(dcmem);
}
::ReleaseDC(this->m_hWnd,dc);
}
} |
|
|
Back to top |
|
|
DPlotAdmin Site Admin
Joined: 24 Jun 2003 Posts: 2310 Location: Vicksburg, Mississippi
|
Posted: Tue Apr 26, 2011 7:32 pm Post subject: |
|
|
I don't see anything that should prevent the bitmap from being displayed, though I'll look into it more.
As far as DPlot being visible, start it before creating a plot with
DPlot_Start(1,(int *)NULL); _________________ Visualize Your Data
support@dplot.com |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|