|
Thanks for the ideas ... but ...
The main window of the app is set explicitly by code in InitInstance when the main frame is created.
The dll window is always hidden (it's just there to host an invisible ActiveX control). It's parent is NULL.
The root of the problem is that when CWnd::DestroyWindow() (for the splash dialog) calls ::DestroyWindow(hWnd) (with the splash dialog's hWnd) Windows emits a WM_NCDESTROY with a completely different hWnd (that of the dll's window).
Just thought ... maybe it's something to do with the fact that both windows have NULL parent ... ? I'll investigate now.
Phrustrated Phil
The opinions expressed in this communication do not necessarily represent those of the author (especially if you find them impolite, discourteous or inflammatory).
|
|
|
|
|
Making the hidden dll window a child of the DesktopWindow instead of a child of NULL fixed the problem. Don't ask me why! I must have missed the bit of the documentation that says
"NULL is the default value for the parent window but if you're too idle to find the window a proper, caring parent then you have to be prepared for Windows destroying the window when it feels like it."
Thanks to Blake Miller for putting me on the track.
The opinions expressed in this communication do not necessarily represent those of the author (especially if you find them impolite, discourteous or inflammatory).
|
|
|
|
|
Hi ,
I had made an application which can send mails .
I had done this by loading MAPI32.dll.
Now my doubt is "Is there any method to display mails to my application which is coming to my outlook account ?"
Thanx in advance
Rgds
Sunil
|
|
|
|
|
If you receive you mail from server using Outlook, you can find received messages in
C:\Documents and Settings\{User name}\Local Settings\Application Data\Identities\id\Microsoft\Outlook Express (this folder may be changed in Outlook settings)
If you planing to interact whith mail server from you program (not using Outlook), you mast implement needed mail protocol (like POP3,...) self (see C++/Internet section on this site)
|
|
|
|
|
Hi,
you must have to look 4 articles related 2 outlook automation. Have a look @ the following article
http://www.codeproject.com/com/outlookaddin.asp
This may help you
Sujan
|
|
|
|
|
|
If the dll is not loaded into memory then it's not being used. However, you probably mean "how many programs might potentially need the dll if and when they are run". The answer is there's not really any way to tell. You could run the depends tool on all the executables on the computer but you still wouldn't know because the dll might be loaded at run-time by something.
Shared dll's are supposed to be registered so they appear in the registry but there's nothing to guarantee that.
The only way to be sure is to delete the dll and then run absolutely every application using every possible feature under every possible condition. If something complains then the dll was needed. If not then it (probably) wasn't.
The opinions expressed in this communication do not necessarily represent those of the author (especially if you find them impolite, discourteous or inflammatory).
|
|
|
|
|
You could use the windows search for files option to find *.exe and *.dll files that contain the name of the dll in question
--
Help me! I'm turning into a grapefruit!
Phoenix Paint - back from DPaint's ashes!
|
|
|
|
|
benjymous wrote:
You could use the windows search for files option to find *.exe and *.dll files that contain the name of the dll in question
This is no better than using the depends tool. It does not take account of the possibility of programs loading dll's at runtime. The name of the dll may be built at runtime from user input or registry/ini settings for example.
The opinions expressed in this communication do not necessarily represent those of the author (especially if you find them impolite, discourteous or inflammatory).
|
|
|
|
|
Can u tell a method to convert unsigned short* to CString ??
Thanx in advance.
Rgds
Sunil
|
|
|
|
|
That depend on what data type pointed by unsigned short*, etc. string, wide char string number ..., and what string representation you want.
|
|
|
|
|
|
You asking "how convert pointer to string", or "how convert data ref by pointer to string" ?
And if data, you mast say what kind of data (unsigned short * pointer may point to Unicode string, WORD value, 16bpp raster data ....)
|
|
|
|
|
It is pointer to a Ascci string.
I have to display it in a message box.
So I have to convert it to CString.
|
|
|
|
|
simple (if there ASCII coded string )
CString((char *)data)
|
|
|
|
|
I got only the first letter???
|
|
|
|
|
That meens, that you have not ASCII data stored by pointer.
You mast know, what coding used (Unicode, MBS, BSTR, wide char), and corectly convert pointer to CString constructor.
|
|
|
|
|
Sorry I mistook .
It is pointed to BSTR.
|
|
|
|
|
|
It works!!!!!!!
Thanx a lot..
|
|
|
|
|
Neither MessageBox() nor AfxMessageBox() requires a CString object. You might consider showing us a relevant code snippet and we could probably offer a solution.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
If the unsigned short * is really a BSTR or a _bstr_t then just do
CString(usp) . The CString constructor is overloaded to accept BSTR s
The opinions expressed in this communication do not necessarily represent those of the author (especially if you find them impolite, discourteous or inflammatory).
|
|
|
|
|
Hi Friends,
I have about 10 machines where data from 10 different office locations is stored in MSDE. I have a centralized SQL server where I want to copy the data(8 tables) from other machines. How can I write a program which creates DTS package on the fly and copy data from all the 10 machines.
I could have DTS packages in all the 10 machines which updates data to the central server,but, assuming the structures are consistent accross all source machines(which is exactly in have right now in my application), why not
have a single package held centrally that I call against the different
sources. Sounds GOOD , BUT............
I want to create a Generic(customizable) DTS package which accepts 6 PARAMETERS
1. Source DB name
2. Source DB UserID
3. Source DB Password
1. Traget DB name
2. Target DB UserID
3. Target DB Password
So i expect to call the DTS package from my vc++ application using 'ShellExecute'.
So please help me create such a kind of DTS package(i shud be able to handle exceptions and Tranformation failure if anything should occur in the process)
Waiting for ur reply,.........
Regards,
Prax.
|
|
|
|
|
Hello. Ive asked this question before. Ive read tutorials, and looked online at google. The problem is, most of this assumes that you have knowledge of MFC, and programming with CDialog. I do not. Now I will present my problem. I have an ATM Gui type project. When I run this project, a dialog window pops up that has two buttons. These buttons are "Savings" and "Checking". When the "Savings" button is clicked, the Dialog window should SWITCH to the savings Dialog Window. This should also be the same for the "Checking" button. There is already a Checking and Savings class, and an ATM class, and each of them have their own Dialog Window. I have already used ClassWizard, and read tutorials, but I require some code. Anyone with knowledge in this area, anyone at all, I am begging for help. When I use class wizard, it makes two functions:
void CATM_gui1Dlg::OnChecking() <br />
{<br />
}<br />
<br />
void CATM_gui1Dlg::OnSavings() <br />
{<br />
}<br />
I Dont know what code to put in there to "invoke the other class dialog windows." That is my question, what would the code be, or the functions be, to switch to other Dialog Windows once the button is clicked?
Mike -- I Code Because I love to
|
|
|
|
|
search for GetOpenFileName() and GetSaveFileName() in the MSDN.
TOXCCT >>> GEII power
|
|
|
|