destroyWindow give error

Hi

hi i have one class which is nodialog

from that i create dialog which is modeless.  in one thread

i call destryWindow from onother thread..it give error

CHandleMap* pMap = afxMapHWND();
>> >>     ASSERT(pMap != NULL);     // Why does pMap == NULL

this code fails..

if any body have solution ,plz send 

pradip

0
10/10/2006 2:37:29 PM
vc.mfc 33608 articles. 0 followers. Follow

3 Replies
628 Views

Similar Articles

[PageSpeed] 40

> in one thread
>
> i call destryWindow from onother thread..it

Thats your problem. The map between handle and CWnds is thread
specific. This must be called on the same thread the window was
created.

---
Ajay

0
ajaykalra (6842)
10/10/2006 3:18:37 PM
you can post a custom defined message to the owner thread to destroy the 
owned window
"Ajay Kalra" <ajaykalra@yahoo.com> wrote in message 
news:1160493517.062764.148140@c28g2000cwb.googlegroups.com...
>> in one thread
>>
>> i call destryWindow from onother thread..it
>
> Thats your problem. The map between handle and CWnds is thread
> specific. This must be called on the same thread the window was
> created.
>
> ---
> Ajay
> 


0
mubi (159)
10/10/2006 4:02:27 PM
>
> hi i have one class which is nodialog
>
> from that i create dialog which is modeless.  in one thread
>
> i call destryWindow from onother thread..it give error
>
> CHandleMap* pMap = afxMapHWND();
> >> >>     ASSERT(pMap != NULL);     // Why does pMap == NULL
>
> this code fails..
>
> if any body have solution ,plz send
>

Besides the thread issue I mentioned earlier, you shouldnt be calling
DestroyWindow. Call ::PostMessage(windowHandle,WM_CLOSE,..) instead.

---
Ajay

0
ajaykalra (6842)
10/10/2006 5:19:36 PM
Reply:

Similar Artilces:

OLE File error
I have publisher 2003 and am trying to save my newsletter in 2000 format for my printer (a printing company) to read and publish. My error says an OLE object is open and the souce file needs to be closed before saving it to 2000 format. I have looked the whole letter over and I don't have any embedded objects like a database, or spreadsheet in the newsletter. I'm stuck as to what to do to save it to the earlier version. Anyone can call toll free with advise or post to the group or email me at decaturjewelry2@insightbb.com 1-888-877-4367 thanks Lew Does the publication have WordAr...

Error sending/receiving
I am using outlook express for mail sending/ receiving, but after new installation of ISA server, 3 out of 7 computers are not getting/sending emails, while others are working fine. and those 3 computers which are not getting / sending mails have ISA client installed and browsing is also working. please help. Nadeem wrote: > I am using outlook express for mail sending/ receiving, but after new > installation of ISA server, 3 out of 7 computers are not getting/sending > emails, while others are working fine. and those 3 computers which are not > getting / sending mails have...

Out look express error
Sometimes when i open outlook express where my list of messages should be i get a error saying MESSAGE LIST CONTROL the only way to get rid of it is to close outlook and restart it. Can anyone tell me what this is and how do i fix it? Thanks Mike Michael Moore <anonymous@discussions.microsoft.com> wrote: > Sometimes when i open outlook express where my list of > messages should be i get a error saying MESSAGE LIST > CONTROL the only way to get rid of it is to close outlook > and restart it. Ask in an Outlook Express newsgroup. -- Brian Tillman ...

Query Error in Business Portal #2
BP 2.5. Sometimes a user, a requisition purchase, got "Query Error" when he tried to select a vendor from drop dowm list. I reboot the BP server and fixed the problem. Do you know how did it happen? How to prevent it happen again? Except reboot the BP server, should I do anything in the SQL Database server? Thank you very much. stien ...

Why does this give an error ?
XmlNodeList CommonFiles = ProgramBackup.SelectNodes("Directory[contains(.,'CommonFilesPath']"); This generates a XPathException "'Directory[contains(.,'CommonFilesPath']' has an invalid token." How can I do this, it works fine in XSLT but in this case thats a huge amount of processing overhead for such a simple task. Never mind, I'm Polish... it's called Syntax... I was missing the closing ")". "Mike Oliszewski" <mikeo@faxback.com> wrote in message news:OB$NbLeHEHA.328@TK2MSFTNGP11.phx.gbl... > XmlNodeList ...

IMAP4SVC errors
We're getting ready to deploy a new E2k3 SP1 cluster and have begun to move some test users over to it. Some of our IMAP users are receiving an error: Event ID 1023: Error 0x8004050a occurred while rendering message 0011-000000c9660e for download for user xyzzy@[EMAIL PROTECTED] Any ideas? We're running a similar setup and have the same problem. It means that there are some messages that cannot be retrieved via IMAP. We opened an incident with Microsoft and the feel that it is the anti-virus software we are running. Sure enough, turning off the AV makes the error go away. ...

ASSERT problem in CWnd::DestroyWindow within a DLL
Hello, I've got a regular DLL (let's call A) with a custom control in it. This control uses a ToolTip control. I've got another regular DLL (let's call B) that contains a doc/view (the view is derived from CFormView and it has a CPropertySheet in it) to be imported from an App. I managed to import the doc/view template into the App and create new documents based on that template. In one of the property pages of the property sheet within the view there is an instance of the custom control contained in DLL A. The problem appears when the property page is destroyed (when closi...

confusing error in access2003 db running in access2007
have opened a 2003 db in 2007...opens fine, but when adding records I am getting an error as follows: Microsoft Office Access -2147352567 Method ‘Nz’ of object ‘_Application’ Failed I can perform the exact same actions on the dB in 2003, and do not have a problem...I am wondering if the NZ method in conjuction with data on an sql server is invalid...I feel as if this particular dB is getting corrupted when being used in Access 2007...I have been unable to convert this dB to 2007....the error message is that the dB is already opened exclusively by another user...which is me...the dB si...

Mystery error
Has anyone ever received and explanation for the floowing error? Event Type: Error Event Source: MSExchangeTransport Event Category: NDR Event ID: 3015 Date: 10/13/2005 Time: 1:48:37 PM User: N/A Computer: myserver Description: A non-delivery report with a status code of 5.3.0 was generated for recipient rfc822;someguy@somedomain.net (Message-ID <1773136B08AB5742BF2B8C10FD547DE406DC68B3@myserver.mydomain.com>). Causes: Exchange mistakenly attempted mail delivery to an incorrect MTA route. For more information, click http://www.microsoft.com/contentredirect.asp. Solution:...

Fatal Error during install
I get through the CRM Server install, but at the last moment while the system is wrapping up, the following error occurs: ----- "Fatal Error" Installation ended prematurely because of an error. ----- Three databases are created and the web files are copied to the root. Any thoughts on why the installation doesn't complete? Thanks. --Ed Fatal Error during install - More info: The CRM server is on a different box than the SQL server. CRM: Windows 2000, SP3 SQL: Windows 2000, SP3, SQL 2000 Standard, SP3 I have read that there may be an issue with SQL Server SP3, but...

XML Parse Error Codes
Is there any place I could find a list with all the parsing errors you can get when loading an XML document? I'm mostly interested in error codes generated when using a schema to validate an instance document. All I could find on the web was related to PHP parser implementation, but I'd like to have such a reference specific to MSXML 4.0 SP2 if that's possible. ...

Intermittent error
I have an odd one. My client has a P IV with 512 RAM, SP Pro, Office 2003 all updates etc. He checks two email addresses. I use the ISP’s smtp server on both and both email accounts check with a send receive. I have disabled the “send” function on one account since it is unnecessary. Every few “Send/Receive”’s, he gets “Receiving reported error (0x800CCC0F): The connection to the server was interrupted.’ My server settings must be right as he does send and receive email. As soon as I get the error, it goes away and does a successful send/receive before I can try to ping the server...

CurrentPrincipal for Thread seems to give wrong result
Hello! If I run the code below I get the following result Name: IsAuthenticated: False AuthenticationType: So I thought I would get the name I used when logging in to the computer and that IsAuthenticated should be true because the computer should Authenticate me when I logging into the computer. Thread t = Thread.CurrentThread; System.Security.Principal.IPrincipal threadPrincipal = Thread.CurrentPrincipal; Console.WriteLine("Name: {0}\nIsAuthenticated: {1}" + "\nAuthenticationType: {2}", threadPrincipal.Id...

Rules in error... error
I can't seem to get my rules to work properly. I've set it up so two things happen: 1. All mail coming from a specific account gets moved to a folder the error I get is "cannot remove items from folder" then rule gets turned off. 2. Junk mail not sent to me with specific words on the subject line: error: "you don't have authorization" then the rule gets turned off. In all instances, if I run the rule separately (manually) they work. Can someone tell me what's wrong and how to correct it? Thanks ...

Strange Backup Error
Hello All, I have a windows 2003 server running Exchange 2003 standard and Veritas backupexec 9.1 with all SP's installed. It is only on one users mailbox and it is consistently the same errors... now, I know most folks here do not like brick level backups, but I have been running them for over a year with no problems until now. The job log states: Directory not found. Can not backup directory .User, Joe [jxu] . ..[][][][][][][][]. . . [] (a bunch of squares and garbage characters) and its subdirectories. This user had a virus a while back and it seems like there is something wrong with...

DPInst error with Windows 2000
Hello, I'm using DPInst.exe to Preinstall FTDI USB drivers during installation of our software. Yesterday I downloaded the latest WDK (7.0.0) to update my DPInst.exe Version. When I tried to install the USB drivers on Windows 2000 SP4 DPInst.exe ended prematurely with the message "No suitable driver files for your platform found…". On Windows Vista I was able to successfully install the same driver package with this version of DPInst.exe. With the version of DPInst.exe I have been using up to now, I'm able to install the driver package on Windows 2000. When ...

Give a user name and a password to access GP
I was very happy to download the file GP10.0Trial.exe for studying this software and recommend it or not to my customers. At the beginning everything was find, the SQL server was created and started, the installation went perfect, the databases are in their locations.... So I click the program GP to start, first screen, they want a user and a password, I do not find that information, so I can't access the software. Also in the GP Utilities installed at the same time, the user that appears is ''sa'' for system administrator, probably, but again I do not have a passwor...

Outlook Backup Error - cannot copy mailbox
Running 98se and outlook 2000 - before the outlook backup runs the following error message is displayed - Error copying file Cannot copy mailbox - File system error (2106) Any ideas on how to fix this welcome. ...

Error when starting a Access database
I always get an error that the database can not be found. Meanwhile, the application is running in the background. I get this with all the Access databases, when I click on the MDB file, or a shortcut to the file. If I start Access, then browse to the MDB file, it opens without the error. I have unstalled Assess 2003 and re-installed at least three times, and the error persists. When I get the error, I just click on ignore, and everything then works properly. I have Vista, but another user reported the same problem with Windows XP. Thanks for any assistance. -- hgeron ...

Inserting transparent gifs into document gives white borders
I have used Photoshop to create pictures which have no background (transparent) so that I can put them into Publisher and would see the background of the Publisher file instead of a big white box. I save them as transparent .gif files and can use them in other software just fine. But when I put them into a Publisher document, the white backgrounds come back. When I insert your built in clip-art, this doesn't happen, so I know it's possible to do what I'm trying. What might I be getting wrong? Have you thought about saving the images as .png? Publisher has a transparency ...

DestroyWindow function-help
hello, I have created a dialog based application.I have drawn a menu in it through which i plot another modeless dialog.I have created a class for the dialog called midialog.On in the menu handler i create pointer of this class and by allocating memory using new and using the create() function i create the modeless dialog.Do i need to explicitly call destroywindow in OnOk() and OnCancel()of my dialog?if yes how? coz i am creating dialog in the project's main dialog(thru menu) and then i will i have to pass a handle to destroy the dialog and its object in the OnOk() of my di...

Getting a 0x800CCC0F error?
Hi, I just reloaded windows on my new PC that I just built and I am getting a error with Outlook XP that I just do not understand. This the the error that I am receiving; Task 'mail.*********.com Webmaster - Sending and Receiving' reported error (0x800CCC0F) : 'The connection to the server was interrupted. If this problem continues, contact your server administrator or Internet service provider (ISP). The server responded: ?$?$??' The weird part is that I can send and receive e-mails I just keep on getting this message and I do not know why. Thanks for any help, ...

How to redirect to an error page from server side after an error during an AJAX post?
Hi, I am so sorry to post this but I am utterly confused by this. I know it's been asked a million times before but I just don't get it. Click a button in an UpdatePanel. Goes to server side. Server side errors. Exception is caught in Application_Error in Global.asax. Error is logged... Error is cancelled. When I try to redirect to an error page I am getting a pagerequestmanagerservererrorexception instead. Now - how do I redirect the ENTIRE page to an error page? Response.Redirect doesn't seem to work, presumably because I'm returning the request to an XMLHTT...

Error Message: 0x800CC90
I suddenly started receiving this message and one e-mail is not processed. Others are processed but after I delete them and press "send/receive" they re-appear with the same error message. How can I fix this problem? ...

w3wp.exe worker process throws errors on CRM 3.0
Our CRM3 environment is running fine, but every now and then the w3wp.exe worker process on the server is doing something that consumes either abnormal large amounts of memory or blocks some other process. W3wp.exe is associated with the application pool of IIS (6.0). This server runs on 4 GB of internal memory. Users trying to enter CRM3 through Internet Explorer get an error message that there was a problem (contact systemadministrator). Killing the w3wp.exe on the server instantly resolves the connection problem of the other users. What can cause these occasional 'hangup's'? ...