|
Hi All,
I am having a problem with OnCancel()...Basically, if I click on Cancel on any interface, it vanishes (closes) the window but what my problem is that I get errors when I click CANCEL on my interface. Am I missing something?
Thanks in advance
Preeti
C++Prog
|
|
|
|
|
What kind of errors are you getting? Do they appear before the interface closes?
|
|
|
|
|
No..they appear after I click "Cancel" button on the dialog box.
C++Prog
|
|
|
|
|
What are the error messages?
It could be from some clean-up code or many other things. It would be easier to offer ideas if you provide the errors messages themselves.
|
|
|
|
|
Thanks for the help...Actually, the error messages are related to my project.
Thanks
C++Prog
|
|
|
|
|
Preeti9 wrote: ...I get errors...
We're not mind readers. What are they?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
As said by Leah_Garett,
It may be bacause of some clean-up code. You need to debug it. Or tell exact error message.
|
|
|
|
|
|
Is there a way to do this? I am familiar with setting the alphablend levels on the main window and making it transparent but when I try to do the same for child windows nothing ever happens.
|
|
|
|
|
If you want to transparent window I think you can see an example of codeproject about it.I think It has four window that are transparent (child window)
|
|
|
|
|
Hi,
If anyone's not familiar with the windows "net" program, it sends messages to people based on a given user or computer alias.
Does anyone know how to enumerate these aliases? I've basically scoured the web. I'm looking for a way to do it in C++, and i'm thinking that there's probably some kind of obscure networking function that I've missed.
Thanks for your help everyone.
SwITCh?!
|
|
|
|
|
Does WNetOpenEnum() give you what you're looking for?
|
|
|
|
|
Fabian Tamp wrote: If anyone's not familiar with the windows "net" program, it sends messages to people...
That's "net send" actually. "Net" by itself does nothing.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hey, thanks for the help.
I don't think WNetOpenEnum was quite what i was looking for, but through that i found NetQueryDisplayInformation, which is closer to what i want.
The comment about the program being "net send", the program is actually "net", but "send" is an argument it takes. therefore "net send" is used to send a message using the "net" program. On that note, the "net" program has alot of extra useful functionality which i might try out.
Thanks for your help guys.
SwITCh?!
|
|
|
|
|
I curently have this code
bool FilesClass::FilePath(char name[50])
{ int buffer;
int fh;
if( _sopen_s( &fh, name, _O_BINARY, _SH_DENYWR, 0 ) )
{
Files++;
buffer=strlen(name);
strncat(DllStatus,name,buffer);
strncat(DllStatus,";",2);
return false;
}
else
return true;
}
But in some cases it fails to process the checks, and asserts with cant open file.
My idea is that this function either returns true if the file is present, or false if its not, any sugestions?
-- modified at 17:45 Tuesday 5th December, 2006
|
|
|
|
|
What do you mean fails to process the checks?
How about something like this:
bool FilesClass::FilePath(const char *name)
{
int buffer;
int fh;
errno_t errno = _sopen_s( &fh, name, _O_BINARY | _O_RDONLY, _SH_DENYWR, _S_IREAD );
if( errno )
{
if (errno == ENOENT)
{
Files++;
buffer=strlen(name);
strncat(DllStatus,name,buffer);
strncat(DllStatus,";",2);
}
else
{
}
return false;
}
else
{
_close( fh );
return true;
}
}
The pmode param is required in the call to _sopen_s().
Note that if the file is already opened elsewhere without read share access FilePath() will
return false.
|
|
|
|
|
Ok, found my assert problem as well, i actualy check for total of 6222 files, array was to short.
Thanks, your code worked better.
-- modified at 18:26 Tuesday 5th December, 2006
|
|
|
|
|
FredrickNorge wrote: My idea is that this function either returns true if the file is present, or false if its not, any sugestions?
_access(..., 0) sounds a whole lot simpler.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
In additinal yo can use of FindFirstFile
|
|
|
|
|
FredrickNorge wrote:
My idea is that this function either returns true if the file is present, or false if its not, any sugestions?
try PathFileExists
<div class='ForumSig'>"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 Support CRY- Child Relief and you </div>
|
|
|
|
|
I need some help about the code i must write so the program will compare the files of 2 folders and find the number of the different files. thanks in advance.
|
|
|
|
|
pro.log wrote: ...different files.
Which could be any number of things (e.g., size, date, contents). Please elaborate.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
just for the contents of the 2 folders
|
|
|
|
|
So just add the contents of each folder to its own array. If the size of the arrays are different, or if one array has an item that the other does not, then you know the folders are indeed different.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi Forum,
Is it possible to write a simple hello world win32 application which is statically linked with kernel32 and ntdll? When I run the ap, only the executable image should be in memory and no other modules (including the kernel32/ntdll which are normally loaded). I want to build a fully self-contained executable. Is that doable?
Thanks in advance for any information.
|
|
|
|