New Document

Hi, I'm using the MFC document/View architecture, or at least I'm
trying to do so.
The Image Processing software I'm developing, returns an image (a
matrix of points), and other information in a class call Image

CImage
{ //Attributes
          CArray figure;
          int tenderness
          ....
}

I was wondering to create a new class. let's say CImageDoc : public
CDocument, to display and use manipulate my application data.
My problem is I can't create an instance of the CImageDoc class, the
command
CImageDoc   myNewImageClass;
dosn't work.
How do I create a new documente (not using the new document menu option
neighter the toolbar)?

thanks

0
mrbiancu (40)
6/1/2006 5:35:20 PM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
584 Views

Similar Articles

[PageSpeed] 11

Why not just have your image object be a member of the CDocument class 
already there.  You could add it to the .h file and use it for displaying 
the image in one or more views.

Tom

"Biancu" <mrbiancu@gmail.com> wrote in message 
news:1149183320.818358.261280@i40g2000cwc.googlegroups.com...
> Hi, I'm using the MFC document/View architecture, or at least I'm
> trying to do so.
> The Image Processing software I'm developing, returns an image (a
> matrix of points), and other information in a class call Image
>
> CImage
> { //Attributes
>          CArray figure;
>          int tenderness
>          ....
> }
>
> I was wondering to create a new class. let's say CImageDoc : public
> CDocument, to display and use manipulate my application data.
> My problem is I can't create an instance of the CImageDoc class, the
> command
> CImageDoc   myNewImageClass;
> dosn't work.
> How do I create a new documente (not using the new document menu option
> neighter the toolbar)?
>
> thanks
> 


0
tserface (3861)
6/1/2006 10:00:25 PM
You create a document thru the doctemplate.
CDocTemplate::CreateNewDocument/CreateNewFrame/OpenDocumentFile. This
will help:

http://msdn2.microsoft.com/en-us/library/hts9a4xz.aspx

If you use the wizard, you have a document class, you could simpy use
that instead of creating a new one and another doctemplate.

--
Ajay

Biancu wrote:
> Hi, I'm using the MFC document/View architecture, or at least I'm
> trying to do so.
> The Image Processing software I'm developing, returns an image (a
> matrix of points), and other information in a class call Image
>
> CImage
> { //Attributes
>           CArray figure;
>           int tenderness
>           ....
> }
>
> I was wondering to create a new class. let's say CImageDoc : public
> CDocument, to display and use manipulate my application data.
> My problem is I can't create an instance of the CImageDoc class, the
> command
> CImageDoc   myNewImageClass;
> dosn't work.
> How do I create a new documente (not using the new document menu option
> neighter the toolbar)?
> 
> thanks

0
ajaykalra (6842)
6/2/2006 1:04:21 AM
Reply:

Similar Artilces:

Error when adding new user to CRM
Hello all, I need to add 5 new users into CRM. When I complete the first form for the user information such as Last name, First name, email address, etc, then click the save button I receive an error page and the following message is logged in the Application log. MSCRM Platform Error Report: -------------------------------------------------------------------------------------------------------- Error: The statement has been terminated. Error Message: The statement has been terminated. Error Details: Details on this error have not been provided by the platform. Source File: Not avail...

SBS Exchange 2003: Create new user in AD but no exchange mailbox #3
I'm using SBS 2003. Exchange server is SP2. When I create a new user using Active Directory, it prompts me about creating a mail box. It says it's creating a mailbox, then it's done. But no mailbox appears. In fact, if I use the Exchange tasks wizard, I can create, delete, and recreate the mailbox--all say successful without an error message. And yet, no mailbox. This is even after I reboot the PC and sent email to the address. Any ideas what's going on? mike.aes@gmail.com wrote: > I'm using SBS 2003. Exchange server is SP2. > > When I create a new user ...

If my GP Dynamics support CPA's new cheque standard
Hi; I am using GP Dynamics 8.0 in Canada, we have Payable Management module installed. How can I know if my current version support the CPA's new cheque standard? The CPA's new cheque standard will be launched in July 2007. -- Kane Kane, Support for the new cheque format has nothing to do with the Payables module. Rather, it is a function of modifications or changes to the report that produces your cheque. Lyle On Fri, 22 Sep 2006 10:06:01 -0700, Kane <Kane@discussions.microsoft.com> wrote: >Hi; > >I am using GP Dynamics 8.0 in Canada, we have Payable Managem...

Does the New Worth Report have a fault
When I calculate my new worth in MS Money 2000 (old version I know) it adds my assets and liabilities instead of subtracting them. For example, if my savings, checking, investments total $10,000.00 and my liabilities total $5000.00, MS Money calculates my net worth as $15,000.00. Shouldn't my net worth be $5,000.00? Shouldn't it subtract my liabilities instead of add them? Please let me know if there is a glich in the software and how I can fix it. Also please let me know if I am financially inept. Thanks, -k In your example, the net worth should be $5,000.00. You may hav...

How do you replace old data with new data without creating a new .
I have existing pivot tables and I want to replace the data source worksheet with new data and the pivot tables update with the new information. I have replace the data source but the pivot tables didn't update. Hit the "Refresh Data" in the pivot table toolbar (looks like an exclamation point) -- Regards, Dave "Dena" wrote: > I have existing pivot tables and I want to replace the data source worksheet > with new data and the pivot tables update with the new information. I have > replace the data source but the pivot tables didn't update. So...

How do you import data from one Excel document to another?
Hey everyone, I work at a school and I'm trying to update their attendance reports from hand written to excel, but I'm running into several problems. For one, I need it to be able to calculate how many "Ab"s (absents) there are in the worksheet (for the individual student's attendance page). And THEN, I need to have the sum show up on a completely new document (for the overall attendance report). Is that possible? I've fooled around with data importing and several other things, but I'm just too new at this. If what I'm asking is possible, can anyone he...

try out of new e-mail
Hi, Mike, Please let me know if you get this e-mail. Thanks, Mom Hello, I did get this email. But you also sent it to a public news group! -- http://www.ready4mainstream.ny911truth.org/index.html "Helene Meyer" wrote: > Hi, Mike, > > Please let me know if you get this e-mail. Thanks, Mom > ...

ActiveSync does not sync new mail without intervention
I have a SBS2003 with Exchange 2003 SP2. The computer is behind a Watchguard firewall. ISA is not running. OWA & OMA both work fine via https from either mobile devices or computers. From Windows Mobile 5 works fine if in cradle (I'm assuming that activesync notes & tasks syncing keeps outlook open) but if remote Initial sync - works fine Send mail - works fine read mail messages - works fine sync'd message deleted - works fine new mail - only works if mail already read Activesync shows that it has synchronized all items without error but new messages do not sync! If a ...

Convert Publisher document to a .pdf file
I create a multi-page newsletter using Publisher. How does one convert this to a single .pdf file? My first attempts (copy/paste into Acrobat) only produce page 1. Is there a way to capture the whole document which includes photos and clipart so that I can paste it into Acrobat? Thanks, EdC. You don't paste into Acrobat, you print the document to Acrobat. File, print, select the distiller or Adobe PDF, depending on the version of Acrobat. -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "Ed C" <econgleton@snet....

adding holidays to a new calendar
I have set up a new calendar that I want to share with my department and I'm trying to add legal holidays which were already on my personal calendar. Even though I'm viewing the new calendar, the holidays got added to the personal calendar. I tried deleting all the holidays and then, with both calendars open, putting the holidays back in, but again they were added only to the personal calendar. Anyone know what to do? Add them to the personal calendar and copy (or move) them to the other calendar. -- Diane Poremsky [MVP - Outlook] Outlook Tips: http://www.outlook-t...

.OST full (2 GB) during POP collection = all new mail lost?
The subject says it all... Outlook 2003 in Cached Exchange Mode (non-Unicode, i.e. inheriting old 2 GB limit) on Windows XP. Was working offline, collecting two days of POP3 mail, and at the end of the collection I got the error message saying that the .ost file had reached the size limit... Very stupidly, Outlook 2003 (!!!) _deleted_ all mail from the POP3 server before making sure that the same had been stored properly, so it appears to be all lost now? Just out of curiosity, where did Outlook write this data as it was being collected? Was it being appended to the .ost file? I tried ...

Cant see Default Public Folders on New 2003 Exchange
Hi We have recently installed a new W2003 Exchange 2003 server into our domain. The domain already had an Exchange 2000 server installed. The default public folders on the Exchange 2000 machine can be seen under ESM and by Outlook clients. We have created an additional new public folder store on the new 2003 server, however, the default Public folders on the new 2003 server cant be seen by mapi clients ie Outlook. Additionally any folder created under the Public Folder tree on the 2003 server under Folders does not appear under the First Storage Group > Public Folder Store > Public Fol...

Fonts do not print in colur used when document created.
When I create a document in either Word ot Publisher the text is not always printed in the colour selected. This problem seems particular to Red & Blue. can any one help please. Peeter Have you tried some maintenance on your printer? Are you saving as a PDF? This problem has been reported using Microsoft's save as add-in. -- Mary Sauer http://msauer.mvps.org/ "Peter Piper" <PeterPiper@discussions.microsoft.com> wrote in message news:76737C66-2B07-42DF-BFC5-828A14CE135F@microsoft.com... > When I create a document in either Word ot Publisher t...

New computer, outlook locking up
Hello, My boss was having alot of problems with an old 1.5GHz HP laptop, so he asked me to find a new one for a good price. The best price range I found was the $700 dollar range (best bang for the buck). He got a Dell 2.3GHz P4 Dual core, 3GB RAM, 500GB HD, Windows 7 Home premium. Now what sucks is that after importing all his old emails into outlook, everytime it goes into send/receive, outlook freezes for a little bit. I was told earlier that my method for importing emails (just replacing the PST, rather than Data>open) was not good practice, but could that be causing these pro...

This Document has been removed from Sales Order Processing History #2
Hi, We have imported data from GP Version 7.0 to GP Version 9.0. We did not upgrade it. All the history and all the transactions were imported into verions 9.0. Now I am trying to using Sales Inquiry from Inquiry >> Sales >> Transaction by Customer. Selected a customer, all details appeares including invoices, payments and other documents. But when I try to drill down on one SOP invoice I get above mentioned error. I checked the Sales Order Processing module, I found those documents and tried to drill down on them, it worked fine. But not from Receivable side. I have al...

Moving Exchange DB's to a new server (different name)
In a DR test, we moved SG's to a new server, different server name, same SG and MS name. MS mounts, can not connect to mailbox. Delete mailbox, create a new one, we can then connect. Delete this mailbox, reconnect to the original, and now we can connect. How can we accomplish this in bulk? In other words, after doing a system state restore of AD, then a system state of Exchange, restored MS file, mounted, etc. We were unable to connect to these mailboxes. I am assuming this is related to GUID's. Any thoughts? Users in AD specify a server by name. When you say that you move mailbo...

Creat new dictionery
It says when I try to add a new word to my dictionery that it is full. How do I expand same, or create a new dictionery? I use WORD 2003 See http://sbarnhill.mvps.org/WordFAQs/MasterSpellCheck.htm -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "kernaghanl" <kernaghanl@discussions.microsoft.com> wrote in message news:BBC3C828-16EF-4861-B3A5-2A7CC406F43C@microsoft.com... > It says when I try to add a new word to my dictionery that it is full. > How > do I expand same, or create a new dictione...

Outlook 2007-exchange issue..inbox doesn't show new mails when offline!
Hi I have outlook 2007 (Beta 2) installed and I connect to my office exchange server(2003) as well. Incoming mails from internet get routed to my local pst. Mails from exchange server keep sitting in my exchange mailbox-inbox, which I manually copy to my pst inbox (as is a known issue with Beta 2). Yesterday, for the first time I downloaded mails from home. Outlook downloaded all mails and the unread mail count increased....however, it just wouldn't show the new mails received. All it showed was my earlier mails downloaded while I was still connected to exchange server. Now I came to wo...

Exchange 2k3 backup
Finally decided to really learn Exchange... someone else migrated the Exchange server from SBS to Exchange Enterprise 2k3... I've never really rolled up my sleeves in learning it in-depth so I've decided to set up a new server and install the Exchange 2k3 as a backup. Since I'm a relatively newbie to Exchange, can someone point me in the right direction to follow so that I can duplicate our live Exchange server onto a backup box? Any pitfalls to watch out for? Thanks, R Green your only options for a "backup" box are to use some version of clustering, or to use a 3r...

Opening an old Word document, date changed to current date
When I open old Word documents, the date gets automatically changed to the current date and I can't view the date that the document actually had. I am using MS Office 2007, but the old document was created in Word 2003. I can see the date that the file was last modified in the details of the file, but I cant guarantee that the date of the document is the same as the date last modified for the file. Press Alt+F9 to toggle the field code display and edit the DATE field code to read CREATEDATE. Then Alt+F9 to toggle back and F9 to update. The date displayed will be the date th...

Double New Mail Indicator
I have a user that is suddenly getting two New Mail pop ups and tw little envelopes in the systray. My first thought was that he had tw Outlooks open (it happens way too often), but that wasn't it. *looks befuddled ----------------------------------------------- ~~ Message posted from http://www.ExcelTip.com ~~View and post usenet messages directly from http://www.ExcelForum.com ...

Variable Pass to new record
Can somebody help me to pass a variable to one record which is search and selected. For Example on one record I have startCoupon = 101 then add 5 on this StartCoupon then it will become startCoupon will be 106 Then we search another record and select the record I want the StartCoupon value automatically show in textbox as 106 Please help me to make it possible. On the next record, set the DefaultValue property to: = DMax("FieldName", "TableName") -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.mvps.org/access http://www.accessmvp.com &qu...

Locking a publisher document
I am going to be placing something on a network drive that will be created in Publisher, I would like to lock it so that it can not be edited by others who will be viewing it. Is this possable. I do not want to read write protect it. On Fri, 24 Mar 2006 19:45:16 +0000, Megan wrote (in article <58FA818E-4A5B-4988-AF52-7C348750D7CC@microsoft.com>): > I am going to be placing something on a network drive that will be created in > Publisher, I would like to lock it so that it can not be edited by others who > will be viewing it. Is this possable. I do not want to read write...

receiving attachments as notepad documents
I am using Outlook 97. All incoming mail is received as a notepad attachment. Does anyone know how to fix this problem? ...

new rules filter
Can anyone please tell me if there is a way to create a Rule in Outlook 2000, that will send all email from people in the Address Book only to the Inbox, all others get sent to the Delete box? If there is a way, I could not find an easy solution. Thanks! -- marx404 No. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. After searching google.groups.com and finding no answer: marx404 <404@404.com> asked: | Can anyone please tell me if there is a way to create a Rule in | Outlook 2000, that will send all email from people in the Address ...