Questions tagged [cview]

32 questions
3
votes
1 answer

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

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…
veekay
  • 65
  • 2
  • 7
3
votes
1 answer

CDialog to CView

So I've an MFC based application, which is primarily derived from CDialog, with some controls etc. For certain reasons, it needs to be hosted in another application, using a container class, which is based on CView. So there has to be some way...of…
user1173240
  • 1,455
  • 2
  • 23
  • 50
2
votes
2 answers

MFC: Communicate with View from Dialog

I want my Dialog to communicate with my existing view outside of an OK response (so using an apply or similar). I assume Messages are the best way to do this. I'm sure there are not a lot of MFC questions these days, so I hope someone is able to…
David
  • 1,050
  • 1
  • 16
  • 31
2
votes
1 answer

How to handle message send from view class to dialog?

I have SDI application that hand view, doc and mainframe. In view class, I have button to open another dialog, let say Chartering dialog. I would like to open that dialog and send initial value from view to assign some variable at dialog, but I can…
2
votes
1 answer

Float a control over a CView

I've got an app that uses several CView-derived classes (actually CScrollView) to display document data. For one particular view, I want to add a fly-out edit box to add notes. That is, you'd see a tab at the bottom of the window labeled "Page…
Kurt Hutchinson
  • 2,959
  • 23
  • 30
2
votes
2 answers

How to overcome Script Error in CHtmlView?

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…
HariDev
  • 508
  • 10
  • 28
2
votes
1 answer

How to create a sub-rectangle device context for drawing onto

I'm using MFC (but this would also apply to Win32) and I have a view I want to draw. So I am overriding the OnDraw method. Here's a bit of psuedocode, I'm coding like this: void OnDraw(DC* pDC) { foreach(Node n in nodes) { …
DanDan
  • 10,462
  • 8
  • 53
  • 69
2
votes
1 answer

CDockablePane - Sliding - Redrawing

I have an MFC MDI application using the new MFC Feature Pack. I have a CDockablePane that has the autohide option enabled. My CView driven class takes a lot of time to be drawn. The problem I am facing is that when the pane is sliding (to autohide…
dood
  • 101
  • 4
1
vote
1 answer

MFC CView::OnFilePrint won't print more than one copy

I have a class which derives from CView which calls OnFilePrint(), but it seems as though only one copy ever gets printed regardless of how many I enter in the print dialog. Is this a known bug, or am I doing something wrong? I could potentially…
Jordan
  • 9,014
  • 8
  • 37
  • 47
1
vote
1 answer

how to show the print preview category?

Well I am working with visual studio 2015 on an mfc project. I have enabled the office like ribbon in the project creation wizard. I am inheriting from CView for my view class to get printing support as documentation suggests. I have also overrided…
manianis
  • 109
  • 3
  • 13
1
vote
1 answer

C++ CScrollView, how to scroll an image?

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…
Nika_Rika
  • 613
  • 2
  • 6
  • 29
1
vote
1 answer

CView inplace editing of control layout

I have a CView that acts as a placeholder for several Ctrl's stacked vertically so as the occupy all available space. What I wish to do is grab a horizontal boundary with the mouse and drag it up or down to resize Ctrl height. The problem being…
alman
  • 83
  • 6
1
vote
0 answers

No focus on a window child to CView

I've created a simple MFC MDI application. Then I've created a DLL which implements a simple window (inherited from CWnd). I want it to be a child of CView window in my application. So when the application starts and the view is created I create my…
Roman Khvostikov
  • 305
  • 3
  • 14
1
vote
0 answers

(MFC) Split a view into two side-by-side duplicates

I have successfully implemented view switching in a program I'm working on. My first view is a normal view displaying the document, but I want my second view to be a split view, displaying the same document, one above the other, each with their own…
JayB
  • 397
  • 6
  • 21
1
vote
1 answer

MFC MDI CView and some kind of bar at bottom of CView

I have created a MDI project with CView's using VS2008Pro. I want to have some sort of bar at the bottom of every CView where i can put controls on, like buttons. I dont know how this bar is called and how to create one for every CView. I have a…
Nijenhuis
  • 109
  • 2
  • 13
1
2 3