cview

SendMessage/PostMessage to a derived CView class not working for MFC application

谁说我不能喝 提交于 2021-01-28 14:53:31
问题 I am building a test application(testApp) for a legacy MFC based application (MFC-app). I am trying to simulate mouse clicks on the MFC-app using message-passing between them. I was able to do this successfully for bring up dialog boxes from the MFC-app menu. However when I am trying to simulate a mouse click on the View of the MFC -app it doesn't seem to work. The main question I have is whether there are any known limitations in trying to use SendMessage,PostMessage functions to communicate

How to overcome Script Error in CHtmlView?

。_饼干妹妹 提交于 2021-01-24 11:35:37
问题 I am using CHtmlView to show HTML pages from online into my application. Whenever the site/page tries to load any '.js' file or script it throws Script Error dialog and unable to load few items from the page. I have made SetSilent(TRUE) to avoid error messages, but still the Script Error occurs without showing the dialog. How can I overcome this problem? 回答1: To avoid JavaScript errors , one must create a value in registry edit under the following registry path, 32-bit : HKEY_LOCAL_MACHINE

How to overcome Script Error in CHtmlView?

谁说我不能喝 提交于 2021-01-24 11:35:12
问题 I am using CHtmlView to show HTML pages from online into my application. Whenever the site/page tries to load any '.js' file or script it throws Script Error dialog and unable to load few items from the page. I have made SetSilent(TRUE) to avoid error messages, but still the Script Error occurs without showing the dialog. How can I overcome this problem? 回答1: To avoid JavaScript errors , one must create a value in registry edit under the following registry path, 32-bit : HKEY_LOCAL_MACHINE

C++ CScrollView, how to scroll an image?

五迷三道 提交于 2019-12-08 19:02:31
I draw an image in CScrollView (inherited from CView). Image scale is recalculated if view form is zoom in or zoom out: //*.h CPictureHolder pic; //*.cpp void CMyAppView::OnPaint() { CPaintDC dc(this); CBitmap bmp; BITMAP b; HBITMAP hbitmap; CRect rect; auto bmp_iter = theApp.FullBmpMap.find(m_iCurrentImage); if (bmp_iter == theApp.FullBmpMap.end()) return; hbitmap = bmp_iter->second; bmp.Attach((*bmp_iter).second); bmp.GetObject(sizeof(BITMAP), &b); GetClientRect(&rect); scaleRect = rect; OriginalWidth = b.bmWidth; OriginalHeight = b.bmHeight; if (rect.Height() <= b.bmHeight) scaleRect.right

C++ CScrollView, how to scroll an image?

坚强是说给别人听的谎言 提交于 2019-12-08 07:27:29
问题 I draw an image in CScrollView (inherited from CView). Image scale is recalculated if view form is zoom in or zoom out: //*.h CPictureHolder pic; //*.cpp void CMyAppView::OnPaint() { CPaintDC dc(this); CBitmap bmp; BITMAP b; HBITMAP hbitmap; CRect rect; auto bmp_iter = theApp.FullBmpMap.find(m_iCurrentImage); if (bmp_iter == theApp.FullBmpMap.end()) return; hbitmap = bmp_iter->second; bmp.Attach((*bmp_iter).second); bmp.GetObject(sizeof(BITMAP), &b); GetClientRect(&rect); scaleRect = rect;