|
Yes i want to hide exe name from task manager.
modified on Monday, October 13, 2008 6:35 AM
|
|
|
|
|
|
how do i display menu bar on a dialog box?
|
|
|
|
|
Create a menu in your resource editor and then add it to your dialog (in "Dialog Properties"). That's how it works in VC6. Pretty sure it's similar in other versions.
|
|
|
|
|
|
Hello everyone,
1.
I am developing for both x86 and x64. I stop mouse on size_t in the code, and "typedef unsigned int size_t" is always displayed. I think it is not correct for x64. Since x64 size_t is 64-bit and unsigned int on x64 is 32-bit. So, the first question is how to let mouse display the correct typedef?
2.
But when I select size_t and click go to Definition/Declaration, but always failed. Where are they defined?
thanks in advance,
George
|
|
|
|
|
George_George wrote:
I am developing for both x86 and x64. I stop mouse on size_t in the code, and "typedef unsigned int size_t" is always displayed. I think it is not correct for x64. Since x64 size_t is 64-bit and unsigned int on x64 is 32-bit. So, the first question is how to let mouse display the correct typedef?
I would not bet my money on what intellisense tell me.
|
|
|
|
|
Maximilien wrote: I would not bet my money on what intellisense tell me.
Agreed. That would not be an intellibet.
led mike
|
|
|
|
|
But how do you find out in which header file it is defined, led mike? I found a couple of definitions.
regards,
George
|
|
|
|
|
George_George wrote: But how do you find out in which header file it is defined, led mike? I found a couple of definitions.
George_George wrote: The go to definition or go to declaration in VC never works
Maybe it's not defined in code. Maybe it's intrinsic to the compiler. Why does it matter?
led mike
|
|
|
|
|
Thanks led mike,
Currently there is no issues. But I think for such a commonly used data type, if we are not sure where it is defined, we will have risk. Any comments or ideas about how to find out where it is defined?
regards,
George
|
|
|
|
|
George_George wrote: But I think for such a commonly used data type, if we are not sure where it is defined, we will have risk.
Well George this is another example of you digging into something that is not necessary while still not even understanding fundamental things like how constructors and object construction works. If the entire community of VC developers works without the knowledge of where size_t is defined, why is it immediately important to know, just because you say so?
What risk exists by not knowing where it's defined? You can still know what it is defined as by doing cout << sizeof(size_t) George_George wrote: Any comments or ideas about how to find out where it is defined?
Yes and I already made those comments.
led mike
|
|
|
|
|
Thanks led mike,
I do not know why finding where size_t is defined is too hard.
Today, I have made more experiment, which is, enable the "Generate Preprocessed Files" of VC, but the output is quite surprising. Any ideas?
#line 1 "d:\\visual studio 2008\\projects\\testsizet1\\testsizet1\\main.cpp"
#include <wnidows.h>
int main()
{
size_t x;
return 0;
}
regards,
George
|
|
|
|
|
George_George wrote: I do not know why finding where size_t is defined is too hard.
Maybe because you completely ignored what I previously posted.
led mike wrote: Maybe it's not defined in code. Maybe it's intrinsic to the compiler.
led mike
|
|
|
|
|
Sorry led mike,
Could you clarify which of your related statements resolves my issue of generating only one line of mian.i file please? I read your reply again but not finding anything related to this question.
regards,
George
|
|
|
|
|
You appear to be changing the question. In the previous post it was:
George_George wrote: I do not know why finding where size_t is defined is too hard.
Now it is:
George_George wrote: my issue of generating only one line of mian.i file
I don't know what that means and I don't care. I believe you are being deliberately obtuse and have exhausted my patience. Good day.
led mike
|
|
|
|
|
Hi led mike,
Your final decision is, you do not know whether size_t is a built-in type or not?
regards,
George
|
|
|
|
|
It is fine, Maximilien. But how do you find out in which header file it is defined? I found a couple of definitions.
regards,
George
|
|
|
|
|
from io.h (and crtdefs.h)
#ifndef _SIZE_T_DEFINED
#ifdef _WIN64
typedef unsigned __int64 size_t;
#else
typedef _W64 unsigned int size_t;
#endif
#define _SIZE_T_DEFINED
#endif
|
|
|
|
|
Hi Chris Losinger,
How do you prove my code is using definitions of size_t in crtdefs.h -- I have this suspecision because there are a couple of definitions of size_t I found? The go to definition or go to declaration in VC never works...
regards,
George
|
|
|
|
|
Hello everyone,
The command syntax from debugger help document, but after reading the document, I am still confused what are the legal value range for the 2 parameters? The debugger help document does not cover the legal ranges. Where to look-up?
!error Value [Flags]
regards,
George
|
|
|
|
|
timeval timeOut;
timeOut.tv_sec = 0;
timeOut.tv_usec = 3000*1000;
fd_set fdread, fdExcept;
FD_ZERO(&fdread);
FD_ZERO(&fdExcept);
FD_SET(sock,&fdread);
FD_SET(sock,&fdExcept);
int iRet = 0;
iRet = select(0, &fdread, NULL, &fdExcept, &timeOut);
if(FD_ISSET(sock,&fdread))
{
int iRecv = recv(sock, strRecv, 512*1024, 0);
}
|
|
|
|
|
use:
while( .... )
{
select( ... );
recv( ... );
}
to receive a lot data.
because of the large TCP data block will be splitted to small pieces during transfer, the recv()'s size may not equal to send()'s size at one time.
Erwin Yuan
|
|
|
|
|
As Erwin mentions, you can never assume you'll get all the bytes you
request in a single call to recv(). You must keep calling recv() until
you get the number of bytes you're expecting.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi,
I want to print decimal values if characters are non-printable.
how to find out non-printable characters in a string ? is their any 'c' api?
Thanks,
Sakthi
Nice things do nice works
|
|
|
|