MDI appliccation problem

Hi,

I am working on an MDI application.
I am haveing a strange problemin this application.

I have 2 dialogs in the main MDI application (Common settings &
standard about app dialog). I have my Doc/View/Frame coming from
various DLLs.

When I start my application, and use the dialogs (common dialog OR
About App) it works fine (i.e. dialog s are displayed properly with
proper filled values).

Now I create a new instance of a Document by clicking New in Fuile Menu
or Ctrl+N (I have 2 document types available right now), and then close
the document (by Close in File menu or Ctrl+F4).

After closing the document, If I try to access(open) theCommon Settings
 dialogs in main application, the application crashes. and in case of
About Appl dialog, application dows not crash, but nothing is displayed
on the screen.

I tried to debug this problem and saw that when I create the object of
dialog its m_hWnd is 0x00000000.

Can anybody help me solve this problem?

Thanks

0
7/14/2005 6:51:28 AM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
567 Views

Similar Articles

[PageSpeed] 33

Hallo BNP!

> I am working on an MDI application.
> I am haveing a strange problemin this application.
> 
> I have 2 dialogs in the main MDI application (Common settings &
> standard about app dialog). I have my Doc/View/Frame coming from
> various DLLs.
> 
> When I start my application, and use the dialogs (common dialog OR
> About App) it works fine (i.e. dialog s are displayed properly with
> proper filled values).
> 
> Now I create a new instance of a Document by clicking New in Fuile Menu
> or Ctrl+N (I have 2 document types available right now), and then close
> the document (by Close in File menu or Ctrl+F4).
> 
> After closing the document, If I try to access(open) theCommon Settings
>  dialogs in main application, the application crashes. and in case of
> About Appl dialog, application dows not crash, but nothing is displayed
> on the screen.

Were does it crash? Show into the callstack. Maybe you are freeing a 
pointer that is still in use!


-- 
Martin Richter [MVP] WWJD
"In C we had to code our own bugs. In C++ we can inherit them."
FAQ : http://www.mpdvc.de
Samples: http://www.codeguru.com http://www.codeproject.com
0
7/14/2005 10:16:18 AM
Does the dialog use any data in the view or the document.  If they are all 
closed then you may have a bad pointer assigned.

Tom

"BNP" <bnpateljobs@yahoo.co.in> wrote in message 
news:1121323888.756471.189430@g14g2000cwa.googlegroups.com...
> Hi,
>
> I am working on an MDI application.
> I am haveing a strange problemin this application.
>
> I have 2 dialogs in the main MDI application (Common settings &
> standard about app dialog). I have my Doc/View/Frame coming from
> various DLLs.
>
> When I start my application, and use the dialogs (common dialog OR
> About App) it works fine (i.e. dialog s are displayed properly with
> proper filled values).
>
> Now I create a new instance of a Document by clicking New in Fuile Menu
> or Ctrl+N (I have 2 document types available right now), and then close
> the document (by Close in File menu or Ctrl+F4).
>
> After closing the document, If I try to access(open) theCommon Settings
> dialogs in main application, the application crashes. and in case of
> About Appl dialog, application dows not crash, but nothing is displayed
> on the screen.
>
> I tried to debug this problem and saw that when I create the object of
> dialog its m_hWnd is 0x00000000.
>
> Can anybody help me solve this problem?
>
> Thanks
> 


0
tserface (3860)
7/14/2005 5:44:22 PM
Reply:

Similar Artilces:

Retention Problem
When I delete emails, unopened are being saved in my "Deleted Items" folder but opened items dissappear forever. They are not in my Recycle Bin. Also my "Sent Items" folder only holds items for one week. No matter what I try I cannot fix these problems using any of the setting changes available. For example, even though under "properties" for the "Sent Items" folder, it is set to keep items for 6 months, it does not obey!!!! HELP! Karen Earley wrote: > When I delete emails, unopened are being saved in > my "Deleted Items" fold...

UserForm_Terminate problem
Can anyone explain to me why, when I run the code below by clicking on my Cancel Button or the Red X on my Userform every thing works fine, but the next time the UserForm is called clicking on the Cancel Button or the Red X nothing happens. The UserForm does not close nor does the rest of the code run. For that matter nothing on the UserForm works (there are other CommandButtons with code attached to them). Private Sub UserForm_Terminate() Unload EmployeeList Application.ScreenUpdating = True Range("A3").Select msgbox "QueryClose" Unload EmployeeList ...

MDI appliccation problem
Hi, I am working on an MDI application. I am haveing a strange problemin this application. I have 2 dialogs in the main MDI application (Common settings & standard about app dialog). I have my Doc/View/Frame coming from various DLLs. When I start my application, and use the dialogs (common dialog OR About App) it works fine (i.e. dialog s are displayed properly with proper filled values). Now I create a new instance of a Document by clicking New in Fuile Menu or Ctrl+N (I have 2 document types available right now), and then close the document (by Close in File menu or Ctrl+F4). After ...

Payables Cheques Error Problem
Hi everyone, Does anyone know where I need to go to enable/fix this problem. In the Select Payables Cheques window, when I try to print a report, I keep getting the "Cannot access this report because the dictionary containing it is not loaded" window. I've looked into the report security settings and the only one that is similar to Payables is Purchasing >> MC computer Checks Posting Journal which is already set to modified. Thanks for your input. Ian Do you have a third party product for check printing? Something like Accountable Forms Printer or Mecorma? Those ...

F1 Help problem
Since rebuilding a MFC application with Visual Studio 2005 C++ 8 the 'F1' call to help says "The topic does not exist". No source code or help has been changed. It worked OK before the rebuild. Any ideas? -- Steve Wolstenholme Neural Planner Software EasyNN-plus. The easy way to build neural networks. http://www.easynn.com <steve@tropheus.demon.co.uk> wrote in message news:08qsr198hl8t4bk3ldqqspv4qlktc511qc@4ax.com... > Since rebuilding a MFC application with Visual Studio 2005 C++ 8 the > 'F1' call to help says "The topic does not exist&qu...

MDI within MDI?...
Hi All, I have an MDI app where I want each child window to in turn host another MDI parent, allowing a managed frame of children for each top-level MDI child. The purpose is a "workspace" driven UI where the top-level children are maximised and displayed as tabs only, but each has to be able to host further framed windows within it. I am not an MFC expert on MDI/SDI, nor on the underlying API requirements. I have been able to create primitive child frame in the top-level view's OnInitialUpdate, specifying the view as the parent, which does bounds clipping OK, however I'm l...

Creating Document in MDI app
Hi, In my application I wish to be able to export certain data to another file. In one of the functions in my view I need to create a new document, call some functions on it then save and close the document. I am struggling to find how to do this. I have only one Document template in my app. The code I have so far is: POSITION p = GetApp()->GetFirstDocTemplatePosition(); CDocTemplate* pTem = GetApp()->GetNextDocTemplate(p); CBob_photoDoc* pDoc = (CBob_photoDoc*) pTem->OpenDocumentFile(GetApp()->m_pProfStrs->DefFile,false); CBob_photoDoc is my document class. I can now...

OWA password problem
If we reset a username and password with the "user must change password at next logon" checked, then the user logs on to through the OWA, they are getting that they are not authorize to view the web page. This is Exchange 2003 and Windows 2003. -- Eric Sabo NT Administrator ...

How to set MDI view as background view?
I am developing a MDI application and have the requirement to allow for the definition of a single background view. By using a bulletin board analogy, it is more clear what is needed. In this analogy, the background view would be the bulletin board and all other views would be the flyers in the foreground. I have no problems implementing this by changing the z-order of the desired background view by calling the frame window's SetWindowPos() method, provided that no view is maximized. However, I need to implement this capability regardless of the window state; normal, maximized, minimize...

Zombie users problem in Exchange 2000 SP3 urgent
Help please, Sorry its a long one but urgent Deleting Active Directory accounts and mailboxes in preparation for inplace upgrade to exchange 2003. Currently running exchange 2000 SP3. Anyway forgot to check permissions on a directors mailbox and now the event view shows ACL messages error 9551 an error occured whilst updating the acl on folder MBX task/mailbox name located on first storage group mailbox store. Then it says Information store unable to convert security for recipient. both the mailboxes involved have been deleted from the system just today as they no longer work here. ...

CString and CreateThread problem.
Hello, I am creating a thread and passing a CString to the function that the thread calls. Everything is working perfectly except that when I use the CString within the function it's garbage. Why is the string getting mangled? CString fname = __argv[1]; AfxMessageBox(fname); //prints desired results tHandle = CreateThread(0, 0, (LPTHREAD_START_ROUTINE) SpawnFtp,&fname, 0, &threadID); //creating the thread void CMyApp::SpawnFtp(CString fname) { AfxMessageBox(fname); // prints garbage } Any ideas? Thanks, Bill > I am creating a thread and passing a CString...

Crazy DST Outlook Problem
I hope someone can help me because this is driving me up a wall! For DST 2007 I have patched all clients(XP), servers(2003 SP1) and exchange (back end and OWA 2003 SP2). Rather than distribute the Outlook Tool for the calendars I instructed users to reschedule recurring meetings after the patch was applied. All is well with MOST users (about 245 out of 250). I have verified the patch is working on the other 5 but............. Here is the Problem: For 5 users, meetings for which they are invited, are not being scheduled at the correct time. There are 2 different scenarios that can occ...

Problem with Full Screen MDI application
Hi all, I have added full screen functionality to MDI application as per fscrn.exe sample provided by microsoft. The problem is when I minimize the application (provided a minimize button on toolbar), and after that lock the computer and log in again, and click on taskbar to show application again, then menubar associated with application shows up. It does not go even if I minimize the application and again show it back. This problem is not present when I just minimize the application without locking the computer. It does not show menubar that time. Please help me. Thank you, Sandeep Kulkarni ...

problem with serializer constructor
Hi all, i'm trying to serialize a class. Using the constructor of XmlSerializer i get these (odd?) errors: "File or assembly name goseij9w.dll, or one of its dependencies, was not found". Everytime i run the testprogram it complains about another exotically named dll like et_kn-hl.dll or afeaqisr.dll. Even the example from msdn throws these errors. Anyone knows wuts wrong? I'll post the example code below. Thanks in advance, grtz, Mark <code> Imports System Imports System.Xml Imports System.Xml.Serialization Imports System.IO Imports Microsoft.VisualBasic Public ...

Massive Email 2 Queue Problems?
Well, after doing alot of research on this problem I have seen so many people with this same problem not being able to fix it. Is there anyone knowledgeble enough who could write a proper 'howto' on this? Maybe one you MVPs. I know it might sound too simple, but trust me, alot of people are strugling trying to get an email into a queue - me included. Has anyone whatsoever found a solutions for it? If anyone knows please let me know, none of the place i've looked have this information. Thanks Carlos Taborda. Anyone? "ctaborda" wrote: > Well, after doing alot ...

MDI with DLLs
Hi I want to create an MDI application that will have different views. It will need form views, views and listview. I can do this with no problem using just an regular exe with all the code in it, but I want to be able to put all the code and resources of the view classes and other part of the programs in dlls so if I find a problem in one part of the program I will only update the dll where the problem is. How do I do this? How do I load a child view from a dll? What is the best way to do this "Alfredo" <anonymous@discussions.microsoft.com> wrote in message news:94099A9B-...

integration MDI child views from VC i VB into one MDI App
Hey, I’d like to integrate two applications: First is MDI application written in Visual C++ 6.0. Second is dialog-based application written in Visual Basic 6.0, but I suppose that we can change the main dialogs to MDIChild forms. Both applications are in DLLs at all. Is it possible to use a MDI child forms created in visual basic 6 and in visual studio c++ together in one MDI application? I suppose that main MDI application should be written in VC++, because it’s extremely flexible and I know this environment the best, but maybe I’m wrong :). Maybe for example in C# .net it’d be easier...

Problem inserting pictures
Version 2003 In a newsletter I am working on I tried to insert a picture on a page. The picture shows, however I cannot get the text to wrap around the picture no matter what I pick from the menu. Tight, square, none, etc. I have inserted pictures in the previous pages with no problems. All pictures are in JPEG format. Any and all help is appreciated. Thank you. -- Mike All outgoing messages (both text and attachments) are scanned for viruses prior to sending you probably have to juggle the order of the picture and the type. ( picture in front of type, behind the type...that so...

System folder problem
Hi I have strange problem, I dont know when and how some of the system folder are shown as unknown objects, like the Events Root. What can I do to fix it? Than'x Shay Restore from a previous known good backup. If this dosent work I would open a support ticket so PSS can walk you through the steps for fixing this. Dgoldman "S" <s@s.com> wrote in message news:OJbqPRHBHHA.4212@TK2MSFTNGP02.phx.gbl... > Hi > > I have strange problem, I dont know when and how some of the system folder > are shown as unknown objects, like the Events Root. > > What can...

problem with RMS on windows 7
we upgraded our QB (2010) computer to windows 7, RMS (2.0 SP 2) still on XP. Previously the direct interface from RMS to QB worked perfectly, now it fails to find the QB database file. MSFT support claims the interface is not certified... eg. does not work. Apparently they are working on the issue with intuit, but no timeline is provided. Has anyone resolved this issue? -- Lasting Impressions This is a multi-part message in MIME format. ------=_NextPart_000_0008_01CAA65D.EFC317B0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printa...

Splitter problem
I'm just starting to experiment with the MFC, and was looking at the VIEWEX sample, and the three-way splitter. If I alter this: // add the second splitter pane - which is a nested splitter with 2 rows if (!m_wndSplitter2.CreateStatic( &m_wndSplitter, // our parent window is the first splitter 2, 1, // the new splitter is 2 rows, 1 column WS_CHILD | WS_VISIBLE | WS_BORDER, // style, WS_BORDER is needed m_wndSplitter.IdFromRowCol(0, 1) // new splitter is in the first row, 2nd column of first splitter )) { TRACE0("Failed to create nested spli...

Randon OWA Access Problems
Hello, We have been using OWA for about 2 years now and we have never had a problem. Then, this weekend, certain users were unable to access their mailboxes while others were fine. For the users who couldn't get in, it would ask for there username and password 3 or 4 times and then give them the following error "HTTP/1.1 401 Unauthorized". I have checked all settings and permissions and everything seems to be fine. AD objects for those users are configured correctly and the IIS and Exchange Servers have been restarted. Any ideas would be greatly appreciated. Craig ...

weird WM_QUERYENDSESSION problem
Recently, I had a problem reported to me with (non-admin) operators unable to log out of our server systems. I tracked this down to the "Default IME" window associated with several applications (different each time) responding to WM_QUERYENDSESSION with FALSE. I went to the trouble of writing a test app that enumerated top-level windows and sent them this message just so I could check. Imagine my suprise when I found it wasn't even a window that we'd created for ourselves that caused the problem. Now we can fix this problem by turning off advanced text input services, becau...

Problems importing from DBF to Outlook
I've been importing records from my business database (Foxpro DBF) to Outlook's Contacts database for about a week and have run into a snag. One of the fields contains the contact's email address, and although it appears to import over to Outlook with no trouble, when I highlight a given Outlook record and select the New Message to Contact icon, I get the following error: "Error creating new mail! This may be caused due to an incorrect e-mail address for a contact or an invalid name for a distribution list." Since I have no distribution list, I assume the problem inv...

xsi:noNamespaceSchemaLocation Problem
I use the following code to create the XML from a class object Dim serialize As New System.Xml.Serialization.XmlSerializer(GetType(XYZObject)) serialize.Serialize(obWtiter, obObject) But I need the following ' xsi:noNamespaceSchemaLocation="obj-envelope.xsd"' to be included in the in the main opening tag How can I cause the XmlSerializer to do that? Thank you, Samuel "Samuel" <samuel.shulman@ntlworld.com> wrote in message news:O3KgGkN#IHA.3852@TK2MSFTNGP05.phx.gbl... > > > > I use the following code to create the XM...