No I am not
llp00na
No I am not
llp00na
I have tried Refresh() But it erases everything, even those created after Refresh is called drawShapesA Refresh() drawShapesB
llp00na
Yes
llp00na
that did not work
llp00na
How do i force a web browser control to redraw itself?
llp00na
I am drawing on top of a web browser control So cant use the background colour I tried UpdateWindow() but does not work
llp00na
Hi I have got the following code: Code: drawDATA(Shapes shapes, CDC& cd){ // select pen ... ect // draw shapes cd.TextOut(X, Y, "DRAW1"); } I am calling drawDATA from two methods drawA, drawB with: CClientDC dc(this) as parameter. drawA(shapesA, dc); --> if user invokes action A Invalidate() drawB(shapesB, dc); --> if user invokes action B Invalidate(); both methods draw the shapes, but I only want to show the latest shapes not both shapes of A and B. If user clicks button A then i should show him shapes A If he clicks Button B then I should show him shapes B. If he clicks A , I should show shapes A first, and he continues and clicks B, I should erase shapes A and show shapes B only SO iI need a way of erasing previous shapes thank
llp00na
Awesome ideas Thanks
llp00na
Great answer Thanks for the clarification. Looks like i can not think anymore :doh:
llp00na
I am trying to delete all items of a CListBox However, only the top item is removed once calling this routine, How do I delete everything ? Thanks numOfItems= listBox.GetCount(); for (int i =0; i<=numOfItems; i++){ lisBox.DeleteString(i); }
llp00na
I have created an MFC application, dialog based. The application contains 4 child dialogs. and everything was fine. Now I tried to create a 5th dialog box. The program compiled and ran fine but when i try to close the main dialog window I receive: Unhandled exception at 0x7c22c81a (mfc71d.dll) The Call Stack refers to the InitDialog? :(
llp00na
Can you send you the code to inspect please ???
llp00na
I tried if (hBmp != 0){ } I still got the same error message ANy more ideas
llp00na
it is debug assertion failed Program: ....\DetectChange.exe File:.......\include\afxwin1.inl Line: 221 For more info (Press retry to debug) So i pressed retry and got: Unhandled exception at mfc71d.dll in DetectChange.exe: User breakpoint
llp00na
I am really deseparate, my future depends on that Assertion line is: imageScrollView->m_sizeBmp = CSize(bm.bmWidth, bm.bmHeight); This also happens if I try to show jpgs and other formats. It could be something to do with the format of the image and the CScrollView. No I did not, It's been a while since I programmed. So i dont know how to use the stack calls window
llp00na
Hi guys, I have got an urgent question which I need to solve, Plzzz this is very urgent, my whole dissertation depends on it, can you provide guidance? Deadline is Thursday afternoon. I have created an MFC application (dialog-based), added a Picture control to the dialog in order show images (.bmp) to the user. Now I am trying to display the images which the user selects in a scrollable area(for which i added a CScrollView). The application works fine when I capture screenshots manually using printSc and paste them in Paint, however I want the system to automatically capture screenshots and display them. The system indeed saves the image into the hard drive but fails to show to the user. I am getting Debug Assertion Failed! // This method captures a screen shot of the current page void CDetectChangeDlg::CaptureInstantPage() { RECT rc; HWND hWnd = m_webBrowser.GetSafeHwnd(); ::GetWindowRect (hWnd,&rc); HDC hDC = ::GetDC(0); HDC memDC = ::CreateCompatibleDC ( hDC ); HBITMAP memBM = ::CreateCompatibleBitmap ( hDC, rc.right-rc.left-20, rc.bottom-rc.top ); ::SelectObject ( memDC, memBM ); ::BitBlt( memDC, 0, 0, rc.right-rc.left-20, rc.bottom-rc.top, hDC, rc.left, rc.top , SRCCOPY ); char* imageName = (char*)"InstantImage.bmp"; // A screen shot of the current page AnotherWayToSaveBitmap(imageName, memBM); //SaveBitmap(imageName, memBM); // This way does not work ::DeleteObject(memBM); ::DeleteObject(memDC); ::ReleaseDC( 0, hDC ); } void CDetectChangeDlg:: AnotherWayToSaveBitmap(char *name,HBITMAP hBitMap) { CBitmap bmp; bmp.Attach(hBitMap); BITMAP bitmap; bmp.GetBitmap(&bitmap); int size = bitmap.bmWidth*bitmap.bmHeight*bitmap.bmBitsPixel/8; BYTE *lpBits = new BYTE[size]; ::GetBitmapBits(hBitMap,size,lpBits); WriteBmp(name,&bitmap,(int*)lpBits); delete []lpBits; } // Show the image to the user void ManualImageSegmenterDlg::DisplayImage(CString strFileName) { imageScrollView->m_Bitmap.DeleteObject(); HBITMAP hBmp = (HBITMAP)LoadImage(AfxGetInstanceHandle(), strFileName, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE); imageScrollView->m_Bitmap.Attach(hBmp); BITMAP bm; imageScrollView->m_Bitmap.GetBitmap(&bm); imageScrollView->m_sizeBmp = CSize(bm.bmWidth, bm.bmHeight); imageScrollView->SetScrollSizes(MM_TEXT, imageScrollView->m_sizeBmp); imageScrollView->Invalidate(); }
llp00na
Thats good idea which I started to implement now Thanks
llp00na
How can you do that?
llp00na
An animated website is a flash-based website. All/ Major content is flash.
llp00na
My main concern really is to detect the pages that use Flash for the majority of their content. Thanks for the try though
llp00na