CFormView vs. CRecordView

I want to create a dialog looking data entry screen.  I don't want the entry
screen filling the whole view.  I want it to be just enough to hold all the
controls.  Can the recordview do this or does it have to expand to fill the
whole view?  Is so, then probably formview is my best choice?  Correct?


0
w_gower (280)
12/13/2003 8:14:38 PM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
848 Views

Similar Articles

[PageSpeed] 12

William Gower wrote:
> I want to create a dialog looking data entry screen.  I don't want the entry
> screen filling the whole view.  I want it to be just enough to hold all the
> controls.  Can the recordview do this or does it have to expand to fill the
> whole view?  Is so, then probably formview is my best choice?  Correct?
> 

No and No. All views expand to fill the main window (unless you are 
using a splitter window).  If you want something smaller then a dialog 
is the thing to use.

If you don't want something that looks and acts like a dialog you could 
consider using a modeless dialog as a portion of your main view.  To do 
this turn off the dialog's titlebar style and use SetWindowPos to 
position it where you want it.

-- 
Scott McPhillips [VC++ MVP]

0
scottmcp1 (239)
12/13/2003 10:50:06 PM
"Scott McPhillips [MVP]" <scottmcp@mvps.org.nowhere> wrote in message news:<#Jg5uucwDHA.2148@TK2MSFTNGP12.phx.gbl>...
> William Gower wrote:
> > I want to create a dialog looking data entry screen.  I don't want the entry
> > screen filling the whole view.  I want it to be just enough to hold all the
> > controls.  Can the recordview do this or does it have to expand to fill the
> > whole view?  Is so, then probably formview is my best choice?  Correct?
> > 
> 

One other important difference to consider is that a RecordView will
provide record navigation buttons and will automatically save any
changed data when you move from the record. Whether or not this is a
good thing for your application may assist your choice.

Paul.
0
12/15/2003 12:01:10 PM
Reply:

Similar Artilces:

Biggest difference
Are there any major differences? Is it worth getting the upgrade? How does it compare to Quicken? TIA Have a nice week... Trent Fighting for peace is like screwing for virginity! http://catalogs.google.com/microsoft.html start here and search for your items. >-----Original Message----- >Are there any major differences? Is it worth getting the upgrade? > >How does it compare to Quicken? > >TIA > > >Have a nice week... > >Trent > >Fighting for peace is like screwing for virginity! >. > ...

CAppForm (CFormView) Object always NULL
Hi, I've got a CFormView derived object (g_pData) that always be NULL after ProcessShellCommand returned, making subsequent calls (g_pData->IsReady())failed.I looked at the callstack and found the CAppForm Object (g_pData) was NULL. I placed the CAppForm *g_pData = NULL; before the implementation. Two constructors are available. One in the SuperClass CD3DApplication and one in the CAppForm(View Class). I don't know why that fails as MFCFog in the DirectX 9 SDK does the same as I do. Info. is ready. Thanks Jack Fixed. But New problem arises, the m_pMainWnd always got destroyed bec...

VS 2005 Reports & SRS 2000
I have an implementation of CRM 3.0 which is running on SQL 2000, with SRS 2000 as the report server. I was wondering if there are any issues with creating reports using Visual Studio 2005 and publishing them to the CRM implementation? When I designed a basic report and tried to load it nto CRM it came back with the cryptic "An error has occured please contact your administrator"....:) (I love the concise nature of that one) If I design reports using VS 2003 I do not experience this problem. Thanks John Hi John, AFAIK you cannot use VS 2005 to create SRS 2000 reports, y...

Macro vs. Add-In
What's the difference between a macro and an add-in? I downloaded an Add-In off the internet and it seems like it's basically just a macro. If this is true then how do you convert a macro into an Add-In? >>What's the difference between a macro and an add-in? What's the difference between gasoline and a car? Gas makes a car go. Macros make an add-in go. A macro is a computer program (in the case of Excel) written in Visual Basic for Applications (VBA). The code can be saved in an Excel file. The file can be saved in several forms depending on your goals - a...

Urgent: Switching between views derived from CFormView
Hi, I have a SDI application and have 2 views derived from CFormView. I am able to swap the views. But everytime I swap the view, it creates new view so I am not able to view my old data. On one view, I have Browser control, and on another I have few List Boxex. But, when I switch from List view o browser view, and back to List view, I loose all my selection. Can someone help me in resolving this issue? Help in regards of any samples is really is appreciated. Thanks in advance. Musa When you create the new view, are you passing it the same instance of the document as the old one? If not t...

SOS!!! lookup Excel vs Outlook? Record messages to Excel
Hi Everybody! I've got a distribution list of 700 emails. I've sent them an email and got replies. Say, the sender's address is in col A. I need to get the replies recorded to col B, and an indicator of an attachment put into col C - all against the senders email. IS THAT POSSIBLE?? :confused: Thanks in advance for help. I'd be grateful if directed to a similar topic - I failed to find it, and there is a tough deadline coming :eek: ALSO, how can I send an email to all recepients in a folder? Cheers! Lana W -- LanaWhite ---------------------------------------------...

FYI: MBCS vs UNICODE in VS7
It looks like the inital setting in VS7 Project Properties for Character Set still #defines UNICODE and _UNICODE even if it says "Use Multi-Byte Character Set". Toggling the settings seems to fix the setting. Using the following in stdafx.h seems to work too: #undef UNICODE #undef _UNICODE Also, for protection, the following gives a good warning: #ifdef UNICODE #error xxxx will not compile corectly when UNICODE is defined!!! #endif #ifdef _UNICODE #error xxxx will not compile corectly when UNICODE is defined!!! #endif These can be added to any xxxx.h file concerned. Interestingl...

Multiple Selection of Objects in CFormView
Hi, I've written en objects editor(on CFormView). Now I need to apply Multiple Selection feature to my appliation, also I need to supprot draggin selected objects, change thier properties, delete etc. I need your advices on how to do that, also sample project will be gladly accepted. Regards and Thanks, Janiv Ratson. First, you have to have a selection mechanism. So you need to have a way of detecting if the mouse is clicked down in an object. I can't tell you how exactly to do this, because it depends on what you define as an "object". However, we can assume that you ha...

Single DLL vs. Multiple DLLs
When building a website in ASP.Net, are there any advantages to compiling everything into multiple DLLs (one per .aspx, .ascx, etc) in the website project model vs. the single DLL generated by a web application project? I can see the benefit of having multiple DLLs in that you can replace the DLL corresponding to one codebehind file and not worry about deploying unwanted code somewhere else on the site, but are there any other advantages? My testing showed that with either model, dropping a DLL into the bin folder results in the application restarting, so all classes in the appli...

C-Run-time library static vs DLL vs both!
I have now settled down to having my language-support resource DLLs carrying the minimum amount of code (other than none): One cpp file: ============ #define WIN32_LEAN_AND_MEAN #include <windows.h> BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { return TRUE; } ============ These "language resource DLLs" go with a project with lots of big DLLs some of which are MFC extension DLLs and most of which link to the C-runtime DLL. If I imply in the language resource project that it mi...

Themes 2003 vs 2007
I created a page in Word 2003 using a Theme. As of 2 weeks ago I now use Word 2007. How do I remove the theme? I have gone to the Page Layout/Theme section, but if it's there, I can't figure out how to use it. Thanks, Christine Are you really referring to themes? Note that themes were introduced in Word 2007, so you couldn't have created one in Word 2003. In Word 2007, you cannot remove a theme, but you can reset to the theme from the document template: Page Layout | Themes | Reset to Theme from Template. -- Stefan Blom Microsoft Word MVP "CShel&...

Misleading VS.NET 2003 error message
I got this error message compiler under VS.NET 2003 (no, I haven't tried it under 2005) ParseTrace.cpp i:\mvp_tips\Parser\RDParser\ParseTrace.h(42) : error C2226: syntax error : unexpected type 'BOOL' i:\mvp_tips\Parser\RDParser\ParseTrace.h(42) : error C2238: unexpected token(s) preceding ';' from the following class definition class AFX_EXT_CLASS StackTrace { public: StackTrace(BOOL pushing, TreeNode * n); // <= error was on this line ~StackTrace(); CString ToString(); }; Now try to guess what is wrong. What is wrong is that I forget to ...

Background color for CFormView
I am trying to change the background (and text) color of my form derived from CFormView. I have added the OnCtlCOlor method to my derived Form as case CTLCOLOR_DLG: pDC->SetTextColor(RGB(255, 255, 0)); pDC->SetBkColor(RGB(0, 0, 255)); hbr =(HBRUSH)m_brush; I also added the SetDialogBkColor() to my derived CWinApp. These have successfully changed the color of the About boxes etc, but not my main form. I added the OnEraseBkgnd to my MainFrm class with the CRect Rect; GetClientRect(&Rect); CBrush Brush(RGB(0,0,192)); pDC->FillRect(Rect,&Brush); code. This did n...

HTMLHELP in a CFormview
I am trying to implement "What's This" help in my MFC application. Is it possible to hook the help functionality in a CFormView to the same experience seen with Dialog boxes? The Dialog boxes allow me to pop help message from a txt file. The User experience is a small bubble help that pops just like F1 help. Hoever in a CFormView, I am getting the HTML window pop up. I am catching the OnHelpHitTest. and then assigning the topic ID as a return value. Maybe it is just not possible to have What's This help implement the same way as F1 help, in a CFormView? Thanks ...

Multiple .pst files vs. one big one?
As my .pst files get larger, I'm wondering if I ought to break them down into smaller files, which would mean my keeping several .pst files open at one time. Is it easier on OL to have several smaller files open or one large one? Also, at what size does a .pst file start to get too big? I'm running OL 2003 on WinXP. On Sun, 1 Jan 2006 23:21:46 -0800, "T. Wise" <terwise111@yahoo.com> wrote: >As my .pst files get larger, I'm wondering if I ought to break them down >into smaller files, which would mean my keeping several .pst files open at >one ti...

pro of cons of DFS vs cluster of 1 real server and another server hw with server hyperv VMs
can any tell me the pro and cons of the following A 2 server PC with DFS vs. B. a complex one: two server PC, one backup minimal pc hardware with DNS and global catalo one of the server PC is configured as primary dns, global catalog and file server the other one configured to run as hyperv server with enough server VMs to acts cluster we are getting two proposal from two different groups, each arguing their soln is best I can see the benefit of DFS and simplicity of the DFS and can be augmented with a low power PC for backup DNS to make it even more fault tolera...

Outlook vs. Netscape
Hello all, Maybe someone can help me. I'm encoutering a weird bug and I'd like to get to the bottom of it and fix it. I have a system using Windows XP Pro as an OS. I have the Office 2002 suite and for my mail service I use OUTLOOK (not xpress). I had the McAfee 2003 anti-virus installed which I removed for technical reasons (annoying tests) and the compuetr was sacnned free from viruses..... I have an account set up in OUTLOOK, my outgoing and incoming servers are exactly what they are supposed to be, I can receive all mail but for some odd reason I'm unable to send anything fr...

Money vs Quicken #4
I am having trouble with my Quicken and am thinking of switching to MSoft Money. I have only basic needs with no stock items etc. Your opinions would be welcome. Thanks... Bob My mother has used Quicken for 10 years and often asked me for help. I have used MS Money for about the same length of time and personally have found it easier to use. As I have told several friends and family, determine what your financial institutions support better and use it. Both products are very similar and perform some items slightly different. If the financial institutions support both then I per...

Solid vs. pattern
I put an autoshape behind a text box and a table and set it to fill in a solid color and send it backwards (in the order). Then I set the color to 90% transperancy cause I plant to put a photographic background. But when I am printing it out, I am getting a pattern rather than a "solid" transparent color. No matter what dpi I use on the printer, the pattern won't go! And I haven't selected or even touched the fill effects thing and gone into pattern! What version Publisher? Is your printer driver current? Are you using a laser printer? I experimented with the transpar...

CFormView and Background Color
Hallo! I want to change the background color of an FormView (not at initialization). With OnCtlColor, it works fine, the background color changes. But controls on the form doesn't changend the background color (like static controls, radio buttons, comboboxes changend on drop down, etc). How can i change the controls colors without subclassing them? Is there any easy way? Thanks for any help Tim See here: http://www.microsoft.com/msj/0597/c0597.aspx -- Ajay "Tim" <tim@mail.no> wrote in message news:op.ub8xhaqnp0gfcj@rewe.woho.intern... > Hallo! > > I...

Outlook 2007 : Tasks vs. To-Do
Hi there Can you please help me to make "Tasks" the default view in the Navigation Pane of the Tasks Section. I keep getting the "To-Do-List" view first even though I have re-ordered the list to show "Tasks" at the top. Many thanks Graham This is very frustrating and I would love to know the answer. My view defaults to "To Do" and I NeVER want to see To Do's. How do I turn that off? I can't find an answer to this anywhere. I want the default My Tasks view to be Tasks "Graham" wrote: > Hi there > > Can you please h...

GP 10 ODBC Setup SQL Native Client vs SQL 2000 Client
I have been running into this error more and more recently. I am trying to setup an ODBC connection to a SQL Server 2008 instance. I can have two identical WXP SP2 computers sitting side by side. On one the connection works just fine and on the other I get the error message "encryption not supported on client" . This is using the SQL Native Client. If I revert back to just the SQL 2000 client it connects just fine. Can someone please explain what is going on here??? I have also seen this with Vista SP1a. Try setting up as a User DSN instead of a Sytem DSN. Mick &...

NT vs. 2000
Every time my co-worker uses Word as his e-mail editor and tries to attach a hyperlink to a message, the link doesn't work for the reciever of the message. The link is supposed to go to a file on a shared drive. What's the deal? I have NT and it works fine. Is there an option control that we are missing? ...

Dialog editor loses functionality after changing base class from CFormView to another CFormView derived class
When I change the base class of a "form-view" from CFormView to a CFromView derived class, the dialog editor loses functionality like that of the "Messages" and "Control Events" tabs of the property grid. Also double-clicking on conrols does not add the default message handler. Stranegly, in another project this does not happen. Is there any hidden (or otherwise) setting/hack that must be done to prevent this? Thanks Bob I'm not surprised about this happening. A CFormView would have some events another (none view derived class) wouldn't. Deri...

Outlook vs Outlook Express Security
I'm having a tough time believing that Outlook is far less secure than Outlook Express. I was wondering if there's any information out there comparing Outlook (2000,XP,2003) to OE in regards to inherent security issues. I realize that keeping up-to-date and applying patches affects this, but is there anything out there discussing inherent differences in security between the two. I know that they come from two different code-bases and lines of development (Office vs IE). Thanks, Eugene K Euge <yevger@yahoo.com> wrote: > I'm having a tough time believing that Outlook is ...