|
You may override the WM_NCDESTROY message handler like this
void CyourDlg::OnNcDestroy()
{
MessageBox("Dialog is going to be closed...");
CDialog::OnNcDestroy();
}
"Success is the ability to go from one failure to another with no loss of enthusiasm." - W.Churchill
-- modified at 15:02 Wednesday 21st September, 2005
|
|
|
|
|
Demian Panello wrote:
How could I know when Windows is closing.
Look for the WM_QUERYENDSESSION or WM_ENDSESSION message.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
What about OnClose()
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
I have the webbrowser in a program but want also to access the equivalent of this functionality:
internet explorer: Tools/internet options/general/fonts/language script
I expect it is not something exposed in the webbrowser, but otherwise.
Does anyone know how it can be done ?
Raymond Mercier
Raymond Mercier
|
|
|
|
|
hello
i find that there's little documention about DHTML Edit.who can tell me how to use it.
the event OnonkeyupDhtmledit().it doesn't tell me which key is pressed,i want to know which key is pressed.
thanks a lot
jianxin china
-- modified at 13:00 Wednesday 21st September, 2005
|
|
|
|
|
how do i know the dlls held up by a specific application? for example, i'm developing an application using TSAPI, it's mainly using CSTA32.dll and ATTPRV32.dll,
i'm copying these two dlls in other computers' system32 folder , though i was able to solve the error "xx.DLL not found in this computer" i'm still not able to connect to the Telephony server.
i think its using some other dlls along with these two.. how to find those dlls?
thankx
V
|
|
|
|
|
i tried in "Bulid->start debug->go",
i got this list of dlls used by my program, do u find any dll that u guess its not in ur system?
Loaded 'ntdll.dll',
kernel32.dll',
Csta32.dll',
wsock32.dll',
ws2_32.dll',
msvcrt.dll',
ws2help.dll',
advapi32.dll',
rpcrt4.dll',
mswsock.dll',
user32.dll',
gdi32.dll',
ATTPRV32.dll',
Loaded symbols for 'C:\WINDOWS\system32\MFC42D.DLL'
Loaded symbols for 'C:\WINDOWS\system32\MSVCRTD.DLL'
shell32.dll',
SHLWAPI.DLL',
Loaded symbols for 'C:\WINDOWS\system32\MFCO42D.DLL'
Loaded symbols for 'C:\WINDOWS\system32\MSVCIRTD.DLL'
AMInit.dll',
Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.1643_x-ww_7c3a9bc6\comctl32.dll',
comctl32.dll',
EntAPI.dll',
psapi.dll',
netapi32.dll',
msctf.dll',
mslbui.dll',
First-chance exception in MyTray.exe (KERNEL32.DLL): 0xC0000005: Access Violation.
dnsapi.dll',
winrnr.dll',
wldap32.dll',
rasadhlp.dll',
wshtcpip.dll',
The thread 0xDF4 has exited with code 0 (0x0).
wshtcpip.dll',
The thread 0x880 has exited with code 0 (0x0).
Loaded 'C:\Program Files\Microsoft Visual Studio\Common\Tools\SPYHK55.DLL',
V
|
|
|
|
|
|
i just found its already installed in my system but i never used it, i think iti'll solve my problem, thank you
V
|
|
|
|
|
Vivekuniq wrote:
i think iti'll solve my problem
But only for implicitly loaded libraries.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Hello,
I'm building a Windows Explorer-like application that displays files and folders. For my particular app, however, the files and folders being displayed may not exist on the computer the app is running on.
I'm using SHGetFileInfo with the flag SHGFI_USEFILEATTRIBUTES to get the icon for the file whether it exists on the computer or not.
Is there a similar way to get a folder icon for a path that doesn't exist? If the path I'm displaying in the folder tree doesn't exist, I want to get the default folder icon index (I'm using SHGetFileInfo to get the system image list).
Any ideas?
Thanks,
Ian
|
|
|
|
|
Why not just pick a folder you *know* exists (like the system folder, or temp - both paths can be retrieved using API functions) and retrieve the icon index for that?
|
|
|
|
|
That's currently my fall-back position. The only problem is, if someone (for some reason) setup a custom icon for the folder i'm using, then I get the custom icon for all the folders I'm displaying in the tree, instead of the default folder icon.
What I really want, is an index to an icon that is guaranteed to be the default folder icon.
Thanks for the good idea, but I'm hoping to find something a bit more robust.
Thanks for your reply!
-Ian
|
|
|
|
|
You can always create your own folder, if it comes down to that. Good luck, regardless - post what you come up with!
|
|
|
|
|
I am trying to pass the path the application was installed at to a custom action. But I can't seem to find anywhere what if any thing to put in [] to make it happen. Does anyone happen to know what will achieve this?
See what I am trying to do is write an install application that places a command line tool on the target machine. I would ideally like this to run from its own directory. But for this to be useful this needs to be part of the path on the machine. Following my previous questions I have a small program that modifies the path in the register that is run as a custom action but I need to pass it the install path as a parameter incase the user changes it during install.
Thanks in advance,
Charles
|
|
|
|
|
Im creating a GUI which has multiply pages of info, each of which has dialog boxes that display information ( simple cstring ), and from coding it seems apparent you cant update a dialog box when its not the current window, so I've created a way to hold all the info in the page (.cpp file) and now i wondering if its possible to add a calling method when the tab is clicked for that page. That way, when you click the tab for the page, it will call this method and pull all the latest data from my struct. Is this possible or is there a better way to do all of this? Im kinda new to .NET and C++
|
|
|
|
|
Does anyboday know any C++ function which can create an instance
by given a class name? In C#, we know that the function
Activator.CreateInstance(string className, BOOL ) does this job.
In C++, it is hard to find.
Any clue, hint and helpful resource link are very welcomed!
Thanks!!!
|
|
|
|
|
A thing like that is rarely used in C++! Can you describe why you need such things (give as many details as possible)? I'm almost sure this is a flaw in your design and that it can be done in another way.
|
|
|
|
|
No such thing in C++, unless you are using some plug-in framework.
My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.
|
|
|
|
|
what you need is a "class factory". there are many ways to do it, one of the simplest is this:
CBaseClass * MakeObject(CString & className)
{
if (className == "CObject1") return new CObject1;
else if (className == "CObject2") return new CObject2;
else if (className == "CObject3") return new CObject3;
else return NULL;
}
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
ling_shen2002 wrote:
In C++, it is hard to find.
That's because it doesn't exist. You can write something similar for your own purposes, but there really isn't anything in C++ that works like the reflection support in .NET.
As cedric moonen wrote, you may want to reconsider your design.
|
|
|
|
|
I often use the inline keyword for simple functions (i.e. get/set members). e.g.
class CFoo
{
...
inline std::string GetString(void) const { return m_str; }
};
However, I have noticed that MS tends to use a special .INL file for in-lined code. For example:
class CFoo
{
...
std::string GetString(void) const;
};
inline std::string GetString(void) const
{
return m_str;
}
My question is ... why? Is there anything inherently wrong with inlining code directly in the class header? Are there compiler compatibility or performance reasons for splitting inline code out of the body of the class definition?
Just curious. Thanks in advance.
The Rob Blog Google Talk: robert.caldecott
|
|
|
|
|
I don't know the response to your question but I just wanted to make a remark: when you define a function in your header file, it is always considered as an inline function.
From MSDN website:
A class's member functions can be declared inline either by using the inline keyword or by placing the function definition within the class definition.
Example 2
#include <iostream><br />
using namespace std;<br />
<br />
class MyClass<br />
{<br />
public:<br />
void print() { cout << i << ' '; }
private:<br />
int i;<br />
};<br />
<br />
int main()<br />
{<br />
}
|
|
|
|
|
Agreed. I like to include it for completeness/readability.
The Rob Blog Google Talk: robert.caldecott
|
|
|
|
|
I think in some cases, especially with some MFC code, I see the functions inline at release build, but regular functions when building as debug. You would not have that option when declaring them in the header file.
|
|
|
|