I need help with mfc doc/view

i'm a newbie to vc++ mfc and stuff ...  and am working on a project of developing an IDE for a TCL script file which contains a statements that indicate the state flow of the application script. simply put this script can be diagramatically represented as a kind of STATE FLOW DIAGRAM.

So .. i started with an SDI application that will enable a user to draw the state flow and save the diagramatic document. Now the IDE should essentially enable the user to create the script file from the diagram and vice versa. Therefore i need a text file kinda document support also for my SDI application. ( i.e a diagram editor + a text code editor... for the script).

Can an SDI document have multiple document types ( essentially there will be only one doc instance at a time since its SDI ) .... how to define those document types and how to switch between those types ...?  in an sdi appln ... is it technically feasible .. ? please give be advice .. and helpful tutorials and resources on the net.

i am just a rookie and don't have much understanding of MFC and wat goes under the hood... hence am finding it difficult to proceed ..

Thank you
niz.
0
codeDope (1)
3/7/2004 8:01:06 PM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
291 Views

Similar Articles

[PageSpeed] 49

Yes an SDI can have multiple views of a document.  You can find samples for
this type of switching at www.codeguru.com and www.codeproject.com.

HTH
-- 
============
Frank Hickman
NobleSoft, Inc.
============
Replace the _nosp@m_ with @ to reply.


"codeDope" <codeDope@fastmail.com> wrote in message
news:51D141CF-6E48-4CFB-9999-7C9B2F6626AC@microsoft.com...
> i'm a newbie to vc++ mfc and stuff ...  and am working on a project of
developing an IDE for a TCL script file which contains a statements that
indicate the state flow of the application script. simply put this script
can be diagramatically represented as a kind of STATE FLOW DIAGRAM.
>
> So .. i started with an SDI application that will enable a user to draw
the state flow and save the diagramatic document. Now the IDE should
essentially enable the user to create the script file from the diagram and
vice versa. Therefore i need a text file kinda document support also for my
SDI application. ( i.e a diagram editor + a text code editor... for the
script).
>
> Can an SDI document have multiple document types ( essentially there will
be only one doc instance at a time since its SDI ) .... how to define those
document types and how to switch between those types ...?  in an sdi appln
.... is it technically feasible .. ? please give be advice .. and helpful
tutorials and resources on the net.
>
> i am just a rookie and don't have much understanding of MFC and wat goes
under the hood... hence am finding it difficult to proceed ...
>
> Thank you.
> niz.


0
3/7/2004 8:17:39 PM
WHile SDI can support multiple view types, I always worry about SDI apps. I've only
written three of them, and each was a serious mistake. I had to go back and convert them
to MDI. For example, in MDI I could see both views at once; my recollection (which might
be wrong) is that the references allow you to see one or the other view, but not both.

Limiting the user to working on one entity at a time is horribly restrictive, and in
addition makes it really clumsy to work with. For example, I really want two views in an
explorer, the "from" view and the "to" view, but to get these I have to bring up two
explorers, then minimize all my other windows and use the menu bar item "tile
horizontally". This is a horrendous step backward from having a single app in which I
could do this.

(You might be able to use a single splitter view, but that still limits you to working on
one doucment at a time).

In rereading this, it is not clear that you are needing multiple documents as much as
multiple views of a single document that holds the information. Note that "document" does
not necessarily imply "single file instance" although that is the simplest form. If there
is a correlation between two different files, it is possible to treat them as a single
"document" (you write your own open handler, big deal).

A very unfortunate feature of modern file systems is that they have approximately the
sophistication of punched paper tape, stored more densely. The NT file system (I think
this was introduced in Win2K) supports the notion of independent "streams" in a file,
although this feature is all but totally unusable at the moment (you need to open the
files using backup semantics. Echh). Perhaps in Longhorn this will be a first-class
concept. I'd LOVE to have my Visio diagrams be embedded as part of my C source code, so I
could look at both in the same editor. We can only hope...meanwhile, we fake it by doing
things like reading in two files on a file open (double click .aaa, and we implicitly will
open .bbb, double-click .bbb and we will implicitly open .aaa, deal with appropriate
issues if the other one is missing).

While MFC makes it convenient to have one-document-one-file, it does not mandate this at
all. I have one application where the "document" is at the end of a network cable,
embedded in a remote controller, and when a view calls a document method such as
GetValue() or SetValue(), this actually initiates a network transfer from the remote
device! I had another app which had a dozen files as the "document" (I was rewriting an
app that had been written in Basic (not Visual Basic, Basic! and the company had tens of
thousands of historical "documents" like this in their customer base that they needed to
re-analyze at any time...the problem was that they had lost their last programmer. And
they were not willing to change to a database, or change the representation, or to change
the data collection programs, which were still in MS-DOS Basic. So I just ended up reading
a lot of files on a "File Open" and writing a lot on a "Save" or "Save as")
				joe


On Sun, 7 Mar 2004 12:01:06 -0800, "codeDope" <codeDope@fastmail.com> wrote:

>i'm a newbie to vc++ mfc and stuff ...  and am working on a project of developing an IDE for a TCL script file which contains a statements that indicate the state flow of the application script. simply put this script can be diagramatically represented as a kind of STATE FLOW DIAGRAM. 
>
>So .. i started with an SDI application that will enable a user to draw the state flow and save the diagramatic document. Now the IDE should essentially enable the user to create the script file from the diagram and vice versa. Therefore i need a text file kinda document support also for my SDI application. ( i.e a diagram editor + a text code editor... for the script). 
>
>Can an SDI document have multiple document types ( essentially there will be only one doc instance at a time since its SDI ) .... how to define those document types and how to switch between those types ...?  in an sdi appln ... is it technically feasible .. ? please give be advice .. and helpful tutorials and resources on the net. 
>
>i am just a rookie and don't have much understanding of MFC and wat goes under the hood... hence am finding it difficult to proceed ...
>
>Thank you.
>niz.

Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15974)
3/7/2004 10:59:06 PM
Reply:

Similar Artilces:

newbie needs help
Hello, First to let you all know, I am a big novice at this kind of stuff, so please bear with me. What I am trying to do is make a trendchart with 9 different plots on it. How do I change the numbers on the side and bottom of the chart to read what I need them to? I take these tests 3 times a week and would like to chart all of them seperately and also together to chart progress for a whole month. One for each day, and then one for the month. Then I would like to do the same for the following months of the year. And I would like to have one chart to show the progress for the whole...

Outboud Receipts; view
Some message came in requesting read reciepts. I accepted the reciept request. Now I have reciepts that will not send and I would like to remove them from the queue. Because they are stuck I cannot send any outgoing mail on this account. Nothing shows up in the outbox but when send/receive(ing) it shows the receipt count and fails. Anybody have an idea how to view/remove these bad outbound receipts? Thanks, Greg get Outlookspy (www.dimastr.com/outspy/) and use it to delete the receipts. They are hidden in the top level of the mailbox or personal folder. -- Diane Poremsky [MVP -...

Help! Unable to mount public folder store event 9519
Hi, I am getting the following error when tring to mount the public folder store. Event Type: Error Event Source: MSExchangeIS Event Category: General Event ID: 9519 Date: 11/01/2006 Time: 00:10:26 User: N/A Computer: SERVER Description: Error 0x8004010f starting database "First Storage Group\f7967383-856a-4b7f-9023-37c269a0e908" on the Microsoft Exchange Information Store. Look up of DB Info failed. For more information, click http://www.microsoft.com/contentredirect.asp. I have tried numerous ms kb articles to no avail. I did find this on a news group :- -------------...

Formula help/suggestions?
I'm looking for help some help with a formula. How would I go about a formula for automatically adding 8 hours to a number each calendar month? I would like to open it and have it done for me if that's possible rather than having to remember to add it each month or forgetting if I did or not. For instance, i start out with the # 248 in a cell that I would like to automatically add 8 to each calendar month. "Gadgetman" <stoojz3@yahoo.com> wrote in message news:stoojz3-96EE83.15151022012011@usenet.ptd.net... > I'm looking for help some help with a formula....

need document properties statistics revision information
using excel 2000 pro in document properties; statistics tab; bottom half of info i do see "last saved by" info but cannot find help on how to get the "revision number" and "total editing time" information.. can anyone help me with this.. I would like to set it up so that it is automatically entered for every document i create and not have to recreate for every file.. thanks ...

Creating a view with concatenated columns
I have a table with about 20 columns and I am trying to create a view of it that includes about 10 columns. The problem is that in the process, I am trying to concatenate some fields into one field and I am unable to get any thing working. Below is one example of my attempts to tackle this. Any ideas will be highly appreciated. // The following should be considered as pseudo-SQL CREATE function [dbo].[fn_myview] (@CardNo varchar(11)) returns Table as BEGIN declare @FullName as nvarchar(128) (SELECT FirstName, FatherName, GFatherName, FamilyName, Birthdate, Birthplace...

I need help with a formula
Hi everyone I'm making a stock list sheet and I like to put on it the value - and + .. like when I take boxes out it will give me the total and when I add in it will change also. This is for a weekly count. I'm very new to excel so please H-E-L-P-. I need the instruction like u give it to a child. :) :) Thanks a lot -- pampam ------------------------------------------------------------------------ pampam's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=26224 View this thread: http://www.excelforum.com/showthread.php?threadid=395241 We need ...

formula help 02-10-10
Hi- Issue: 211 310 410 569 Would like to accomplish: 2211 2310 2410 2569 How do I add number 2 infront of the above ISSUE numbers as I have thousands of line to do. Soth If your number is in column A then in column B type =2 & A1 and copy it down. -- -John http://www.jmbundy.blogspot.com/ Please rate when your question is answered to help us and others know what is helpful. "Soth" wrote: > Hi- > > Issue: > 211 > 310 > 410 > 569 > > Would like to accomplish: > 2211 > 2310 > 2410 > 2...

Need Exchange limit help
I have a new SBS 2008 Server setup in a manufacturing environment. Two users within the company send and receive large CAD files. How do I allow this process? Right now one user is try to send a 185MB file and it is saying "the message being sent exceeds the message size established for this user." I have tried setting the limit in the console to 10GB and now I have unchecked the "enforce the mailbox quotas" box and he still can't send. If I go into the Exchange Management Console I still don't see how I can make this work. Is this something that...

MFC CPropertySheet: hiding Apply button partially works
I am hiding the Apply button in a property sheet by using the following code before creating it: m_psh.dwFlags |= PSH_NOAPPLYNOW; // remove the "Apply Now" button This works in the sense that the button is gone, but what I'm finding is that the "A" hotkey is still assigned to it! If I add a checkbox to one of the tabs, for instance, and I underline the "A" in the label. If I hit Alt-A it will only set focus to the checkbox but not check it. This is the behavior that you get if you have another field with the same hot key, but there is none. My only tho...

static control color in Custom Control in MFC
Hi, In the win32 application I have written WM_CTLCOLORSTATIC which was processed and white brush was returned(GetStockObject(WHITE_BRUSH)), so the static control which is child windows of the custom control looked white. In the corresponding MFC program I have the OnCtlColor for the "custom control" handled as:- HBRUSH CEditHold::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) { HBRUSH hbr = CWnd::OnCtlColor(pDC, pWnd, nCtlColor); int id = pWnd->GetDlgCtrlID(); if(nCtlColor == CTLCOLOR_STATIC && (id > 0 && id < 9)) { return (HBRUSH)GetStockObje...

Help with Hurricane Database
I work at the Corporate office of a fast food chain. We have almost 1000 stores in 10 states - mostly in the South. We have many stores in the hurricane zones. During Rita and Katrina we decided we needed a better way to track how our stores are affected and what help we could provide. I've designed a database to do this. I have three main tables: tblHurricane Info: fldHurricaneYear fldHurricaneName tblUnitInfo: fldUnit - the unit number assigned to the store fldAddress fldCity fldState fldZip fldPhone fldDO fldMgr tblUnitForm fldAutoNumber fldUnit fldHurricaneName fldPr...

Viewing 4 different graphs at once
HELP I have a workbook with 4 sheets. Each sheet has a graph on it. I want to show all 4 graphs on one sheet in a window pane environment. But I can't click on the chart and get it to allow me to do a Window - Split Any help would be greatly appreciatied Thank Kell Hi Kelly - Insert a blank worksheet. Right click on each chart in turn, select Location from the pop up menu, select the As Object option, and select the new sheet from the drop down list. When you've gotten all four charts onto the sheet, you can arrange them to your liking. If you hold down the Alt key while ...

Creating MFC child dialogs and windows in DLL.
Hi, I need to write some kind of plug-in, which are implemented as separate dll's. I already wrote a few plugins for this program using MFC and it worked ok, but now I need to create some GUI inside a plugin. I have an interface like that class IModule { public: virtual void ShowConfDialog( HWND hwndParent ) = 0; virtual HWND CreatePanel( HWND hwndParent ) =0; // create child window, position and size will be // controlled by a parent window. } But when creating a child windows in MFC I nee...

Outlook Certification Help
Do you need additional proof that you are an Outlook genius? Would you enjoy the respect and additional income that could come from being able to help everyone in your office on Microsoft Outlook? Get your Outlook Specialist certification and realize the benefits it can have. "Are You Certifiable (In Outlook, At Least)" is available at http://www.linkemup.us/areyoucertifiable.htm for only $18. It will go through each subject on the test and help you to prepare for this certification. If you do not plan to get certified but need a little extra help on using Outlook it is an excell...

MFC 7: Dropdown combobox not working under Win98?
Hello, I've written a dialog based app which has comboboxes. In my RC file it is defined as COMBOBOX IDC_WSCBOW,168,100,72,12,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP and I use CComboBox type as mapped variable. The dialog runs ok on XP, but in 98, the dropdown list is not drawn. Any ideas to get around this problem? I've tried the SetItemHeight() but in vain. TIA, Arthur CheckAbduol loves this question. Open the RC File and click on the arrow of the combo box, same way you would drop down the list, it should give you the outline of the drop down area, resize it t...

SQL script to create views
I think I saw a script somewhere on CustomerSource that would crete views with Table Display Names - would anybody know where to find it? Thanks, Mario Do a search for SDK and GenView (or Gen View, and it's part of the SDK). I believe that's what it's called. It's not so much a script as it is a utility. Clint "Mario" <anonymous@discussions.microsoft.com> wrote in message news:2a5ee01c465b4$e345d620$a301280a@phx.gbl... > I think I saw a script somewhere on CustomerSource that > would crete views with Table Display Names - would anybody > know wh...

Looking for help...I can't send e-mail using CRM web client
I'm having a problem with trying to send e-mails vie the CRM web client. When I try to send the e-mail I get a pop-up with the message in bold "Unexpected Error" "An error has occurred. For more information, contact your system administrator". I've checked the event logs, no errors are showing up in either my CRM server or my exchange server. I'm lost, new to CRM. Any help or ideas is appreciated. Thanks, You could try to add pre-windows2000 account to the administrator group on the exchange server. Some time that helps "Marty" wrote:...

Font format of rich edit ctrl in dialogs, Help!
Hi, I have used a lot of rich edit ctrl in my dialogs (I am sorry that I haven't use edit ctrl instead) and I found one problem now. The text displayed initially in the ctrl (set by DoDataExchange()) has different font format with the text which users type in later. Any experienced people can tell me the functions to make these two font same? Otherwise I think I will have to change about 100 rich edit ctrl to edit ctrl besides a lot of codes. Thank you a lot. -- Best regards, Kelvin ...

Views in Outlook
I'm using Outlook 2002 and am having issues with the Views... - I created a custom view while in my "Outlook Today" folder and gave it a unique name. - I apply the view to several folders within the "Outlook Today" folder (is there a way to apply it globally?) - I notice that I need to alter the formatting, so I go to the "Outlook Today" folder and change the formatting to my view. - The folders using that view *DO NOT* change to reflect the current formatting of this view. If I go to define views while in one of these folders I do not see the changes that we...

Help in Query with two condition
hello all, I have a table like this: Planner Qty User6 CUT SUB BAM-06 1 CONC Yes No BAM-06 1 CONC No Yes BAM-06 1 TOC Yes No BAM-06 1 TOC No Yes BAM-06 1 TACT Yes No BAM-06 1 TACT No Yes JAXM-06 1 CONC Yes No JAXM-06 1 CONC No Yes JAXM-06 1 TOC Yes No JAXM-06 1 TOC No Yes JAXM-06 1 TACT Yes No JAXM-06 1 TACT No Yes Note: CUT and SUB are check box I want a result as follow: User6 A B C D E F CONC 2 2 1 1 1 1 TACT 2 2 1 1 1 1 TOC 2 2 1 1 1 1 WHERE: A SUM Qty =BAM-06 B SUM Qty =JAXM-06 C SUM Qty =BAM-06 if Cut=YES D SUM Qty =JAXM-06 if Cut=YES E SUM Qty =BAM-06 if SUB=YES F SUM Qty =JAXM-06 i...

Help with Date format
I want to enter dates into a worksheet like this: January 25, 2001 And i want to get excel to display the date with the following format: 1/25/01 I have tried using a date format from the format menu but it wont display the date like i want! It will only display the date as I typed it in. Thanks to anyone who can help. :) It appears you're typing the date into a cell formatted as something other than General. 1. Delete the current contents of the cell. 2. Format > Cell > Number tab. Choose a date format. 3. Now key in the date into the cell. HTH Jason Atlanta, GA >-----Or...

Excel File Rename Macro Help!
Hello All! Daily csv files are dumped into a shared folder and i have written a macro that goes into that folder and automatically pull in data to put it in microsoft access tables. What i want to do next is after importing the data into access, rename those files to include dates and times. This import runs every morning so whenever a new csv is dumped in there, my macro will run the newest ones and avoid the past ones. Any ideas guys? I guess im looking for a rename macro sql script. Please see below script. Any help would be greatly appreciated!! Dim fso As Object, fol As Object, fils...

A little macro help?
I would like to use a macro to copy and repeat lines 'X' times on a new page. To find out how many times each row is to be copied, the number is provided in the last column ('C' in this case) of a spreadsheet. Sample data for start point: Lastname First Name Qty Smith John 3 Hank Aaron 5 Result required on new sheet in same spreadsheet: Lastname First Name Smith John Smith John Smith John Hank Aaron Hank Aaron Hank Aaron Hank Aaron Hank Aaron Can someone provide some macro code that will create the number of required rows on a new sheet called 'list' within th...

I need to set up about 50 resources without a delegate
Is there some way to automate this? The method described by Microsoft is very time consumming <http://support.microsoft.com/kb/180424/EN-US/> I'm using Exchange 2003 with Outlook 2003. ...