Questions tagged [cview]

32 questions
1
vote
1 answer

Adding Multiple Views to a VC++ 2010 SDI using MFC

I'm trying to add multiple (actually 3 ) views to an SDI application and give the user choose witch View will be load according to his choice : IMG I have followed this tutorial in the official MS documentation . So, have created three classes : …
Serhan
  • 605
  • 9
  • 19
1
vote
2 answers

converting a CView to a CFormView

I have a CView and I've been painting stuff on it just fine. Then I realized I needed to add some controls like text boxes and combo boxes to my CView. So I am trying to convert my CView into a CFormView which does not have a default constructor.…
corneliu
  • 656
  • 13
  • 37
1
vote
2 answers

Scrolling while displaying a text file in an mfc application

I have an mfc application in which i have to display text. Whenever I use the scrollbar , the OnDraw() function is called. This is my OnDraw() function: CString fileText = pDoc->GetFileText(); //get text from file CRect…
molu
  • 77
  • 1
  • 11
1
vote
1 answer

MFC - How to send messages between 2 different Views

I have 2 CView-derived classes, CThumbView and CMainView. The CThumbView class displays thumbnails of images and the CMainView class controls the View that displays the original image. I want to display the first thumbnail and its original when my…
esh
  • 2,842
  • 5
  • 23
  • 39
1
vote
1 answer

How to get a CView based Windows that do not contain title bar and status bar

I am writing MFC application, I choose CView based application other then Dialog based application. I don't know how to remove title bar and status bar, is there any method to do this? And made a CView based application just like dialog based…
user25749
  • 4,825
  • 14
  • 61
  • 83
0
votes
1 answer

Copy CView contents to a bitmap

I'd like to create a bitmap copy of the current contents of my CView, which may or may not be currently visible on the screen. Here is the code I've added to my OnDraw function: void MyView::OnDraw ( CDC* pDC ) { ... normal processing…
Kevin
  • 403
  • 1
  • 8
  • 16
0
votes
0 answers

How to create C++ dll using MFC classes With CView Inherited class Ondraw method with IMPLEMENT DYNCREATE to be called from c# and or c++

I have often created C++ dll that export mathematical functions to C# or c++ . However now I must have a C++ dll that can export a function to C# or c++ such as mygraph(double xpointsin[],double ypointsin[],string xaxistitle, string yaxistitle, int…
bill g
  • 1
0
votes
2 answers

MFC: How do I get the CView* of a tab in a CTabView?

I have a CTabView and add a tab like AddView(RUNTIME_CLASS(CMyView1), _T("View1"));. But how do I get a pointer to the created CMyView1 class created in the tab? TIA!!
df234987
  • 513
  • 2
  • 13
0
votes
2 answers

System menus disappear when I maximize a child window

Has anybody encountered this issue? I am using MFC on an MDI application. I switch between menus using SetMenu() but has the side effect of system menus (Maximize, Minimize, Close buttons) disappearing when I maximize the child windows. CMenu* pMenu…
0
votes
1 answer

C++ can't display ActiveX control in the dialog CFormView, control variable is NULL

I use a SmartGraph ActiveX control in my project (Visual Studio 2015, MFC, C++). It has been registered successfully. I try to fit a dialog with this control into CFormView MyAppView.h: #pragma once #include "SmartGraph.h" #include…
Nika_Rika
  • 613
  • 2
  • 6
  • 29
0
votes
1 answer

Limiting rendered image size in CView::onDraw()

In a MFC SDI application containing a single CView, I pass the output device context pDC->m_hDC to a mapping library to render the map within the CMyView::OnDraw() method. I would like the rendered image to appear in the centre of the cview…
Ham
  • 436
  • 1
  • 4
  • 14
0
votes
1 answer

Combine some CScrollView into one

I have some files and i use OpenDocumentFile() to open and get pFirtView of each file. Now i have CView/CScrollView(s) for the files. I need combine all CView/CScrollView(s) to only one CScrollView. Any suggestion? Thanks
Hiep Trinh
  • 101
  • 2
  • 3
0
votes
1 answer

MFC and OpenGL CView, C++, initialising OpenGL after GLEW

I'm relatively (read: very) new to MFC using C++ - I usually just worry about OpenGL. From what I know writing C++ Win32 with OGL, I need to initialise GLEW before I initialise OpenGL and create window, which requires a dummy window to be used.…
coolhandle01
  • 81
  • 14
0
votes
0 answers

Porting CView drawing to HTML5 canvas

I have an MFC Windows application and I'm doing some research to see whether the software can be ported to a web app. The MFC app has a few CView-based windows that are drawn using the CDC class drawing methods. I'm thinking I could try to port…
Kevin
  • 403
  • 1
  • 8
  • 16
0
votes
1 answer

Switch layouts of CWnd inside CVIew

I have MDI application with Document/View enabled. Inside CView class of the application there are created several CWnd derived child windows(different views) and then placed inside tab control (CMFCTabCtrl), which is also created in application…
kolkhi
  • 56
  • 4