|
Hi.
I Know that in Borland there're automatic .Bak files which are backup for any compiled file.
I was wondering if there're any such files in the VC++ 6.0 , and if not if there an option
to set VC++ to create back up files.
Thanks.
Gal.
|
|
|
|
|
No, but we could BUILD one ( spurious Black Adder reference )
To my knowledge, there isn't, but you can define a pre build or post build step, so it would be pretty easy to run something that did what you want, so it ran just before every build, or just after.
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
HI All,
I have a situation where I need to have only one instance of a class at any given time. How would I do that. If you provide code it will be better. It is very urgent.
Thanking you
A.Santosh
|
|
|
|
|
|
Hi All,
I am trying to write an customised unistallation exe.
The problem I am facing is, after uninstallation,
the exe is left over..
So, I need to write a self destructing exe
which will destroy itself once uninstallation is complete.
Has any body tried this,
|
|
|
|
|
ummm
why not use the installers that are available?
installshield or the microsoft installer?
mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them
|
|
|
|
|
do you program clown chips?
|
|
|
|
|
i have a masters degree in them
along with clown fish
mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them
|
|
|
|
|
|
Thank you Jason. Excellent!
|
|
|
|
|
|
Is there a function or macro to convert an HRESULT to a win32 error code that can be set with SetLastError()? or can I just use the HRESULT value as the error code?
BOOL CMyWrapperClass::WrapperFunction()
{
HRESULT hr = IInterface.Function();
if (hr == S_OK) return TRUE;
DWORD error_code = Some_conversion_function(hr);
SetLastError(error_code);
return FALSE;
}
|
|
|
|
|
No. HRESULT values are determined by the server that produced them, they may or may not be standard Microsoft error values. You need to have the server's documentation to find out what HRESULT values mean.
|
|
|
|
|
There are some macros listed in the COM and MAPI docs that can extract the different portions of an HRESULT. Grep the MSDN for "Using Macros for Error Handling".
I think Mel has a point about their mapping to standard win32 codes - but at least you can get em.
There's also DECODE.CPP / .H. The readme warns that errors added after its release will not be recognized.
|
|
|
|
|
Thanks for the replies Where can I find DECODE.CPP / .H
I guess my best bet now would be to check all the HRESULTS returned from the functions and make sure they are defined in winerror.h before I do a SetLastError() with them, and change them to something close that is defined otherwise;)
|
|
|
|
|
The Decode sample is from 1996, but it should pop up if you search the MSDN for "DECODE.CPP".
I think there's a good chance a lot of the codes will map to win32, but it might be a grey area. There is a macro to map a win32 error to an HRESULT.
|
|
|
|
|
How does Onkeydown work???
I cant get my dialog to show a messagebox when i press the "S" key
I tryed lots of things, cant get it to work
I need some help or tip's
THANK you!!
|
|
|
|
|
You might want to look at OnGetDlgCode, which is a handler for the WM_GETDLGCODE message. If you override it for your dialog and return DLGC_WANTALLKEYS you might see a difference - check the docs for other constants.
Windows sends a window this message to see what it wants in terms of tab, arrows, etc. Note, for instance, that a dlg control might not ask for the tab char, since that would interfere with the hanling of the tab key by the parent dialog.
Mind, I would think 'S' would get through. Hmmm...
|
|
|
|
|
Is it possible to enumerate toolbars attached to a window? I have made a
program similar to SPY++ that comes with Visual Studio. It first enumerates
all processes, all threads, all thread windows, then all thread children. In all that mess
toolbar windows do no show up as children of anything. If you look at SPY++
and look at a program like Calcs children there are NO toolbars listed, only
controls like buttons and edit boxes.
I think I can FindWindows that are of a CtoolBar class but I don't think
that covers all cases and I don't know if I can relate it back to the
correct process let alone the correct window.
Thanks in advance,
Jason
|
|
|
|
|
I've noticed that sometimes dialog controls can show up in the list of top level windows for an application (usually custom creation code).
Also, apps often have more that one top level window, and contain controls that are created in other modules (COMCTL32.DLL, e.g.). I wonder if a call to GetTopWindow(NULL) and subsequent GetNextWindow(...) would find the toolbars.
Remember some windows have no parent, and even no owner, so you can't rely on all of an apps windows existing in an ancestral chain.
|
|
|
|
|
The following are defined global:
char *CmdTable[] = {"quit", "help"};
char *args[10];
I have a function called Search as follows:
int Search()
{
int iResult = -1;
int iEnd = 1;
int iCount = 0;
while (iCount <= iEnd)
{
if (args[0] == CmdTable[iCount]) return iCount;
iCount++;
}
return iResult;
}
and in main I call the function like this:
int iNum = Search();
Now, when going through the Search function and both args[0] and CmdTable[iCount] are equal to eachother it skips right over it as if they are not ... anybody know why that happens? I'm completely lost here because it should work!!
Thanks in advance, James
|
|
|
|
|
args[0] is a pointer to a char-array and so is CmdTable[iCount].
You are comparing the pointers to two different strings, instead of comparing the strings...
try with: if (strcmp(args[0], CmdTable[iCount]) == 0) return iCount;
- Anders
|
|
|
|
|
Sweet, that worked! Thank you very much for the help
- James
|
|
|
|
|
Sweet, that worked! Thank you very much for the help
- James
|
|
|
|
|
in LAN
VC
can u help me ?
|
|
|
|