|
CDC::SetTextColor(clr);
-c
------------------------------
Smaller Animals Software, Inc.
http://www.smalleranimals.com
|
|
|
|
|
|
|
A long is 32bits.
so try 2^31 for a long (1 bit for sign) and 2^32 for an unsigned long
+-2147483648 and 4294967296
there are defined for these. Look for MAX_LONG, MAX_FLOAT etc.
|
|
|
|
|
from -2147483648 to 2147483648.
The LONG is a 32-bit signed integer!!!
Cheers!!!
Carlos Antollini.
|
|
|
|
|
What this 'xor'?
How do use in this in vc++
|
|
|
|
|
True xor True => False
True xor False => True
False xor True => True
False xor False => False
For use it you need to use the ^ macro.
^ == Xor
Cheers
Carlos Antollini.
|
|
|
|
|
so:
^x;
or so:
x^;
or another ?
|
|
|
|
|
XOR is a binary operator.
z = x ^ y;
if x = 00101101b
and y = 01110111b
then z = 01011010b
Hope this helps.
>>>-----> MikeO
|
|
|
|
|
|
CSrting str;
I want that str would contain some variables in its string
for example so:
str = (" the price is %d, the nameis: %s", x,s);
|
|
|
|
|
Use.
CString::Format();
Is like sprinf();
CString str = _T("");
int iVal = 10;
Cstring strName = _T("Carlos");
str.Format("The price is %d, the name is %s", iVal, strName);
Cheers!!!
Carlos Antollini.
|
|
|
|
|
|
|
The size of an integral type is entirely compiler-dependent (well, except for char which is always 1 byte). In MSVC, an int is 4 bytes.
--Mike--
http://home.inreach.com/mdunn/
"Make sure that if you are using a blow torch that you don't set anything on fire."
-- Chris Maunder
|
|
|
|
|
|
The MDSN say:
The sizeof Operator
The sizeof operator gives the amount of storage, in bytes, required to store an object of the type of the operand. This operator allows you to avoid specifying machine-dependent data sizes in your programs.
Bye....
Carlos Antollini.
|
|
|
|
|
If you don't believe, please make this.
int n = sizeof(int);
n will be equal to 4 like Michael Dunn Said.
Cheers
Carlos Antollini.
|
|
|
|
|
|
|
Hi,
I need to know when an item is clicked in a ListView Control. And Which Items It is.
I used the class wizzard to respond to the NM_Click Message. This gives me the following function header definition.
void CResultsDlg::OnClickList(NMHDR* pNMHDR, LRESULT* pResult)
How can i find out which item is clicked?
Cheers
Rich
|
|
|
|
|
Try looking here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/CommCtls/ListView/Notifications/NM_CLICK_LISTVIEW.asp
The key is to cast the pNMHDR to a NMITEMACTIVATE pointer and access the iItem and iSubItem members.
Lee Nowotny
|
|
|
|
|
Does anyone knows how can be subclassed SpinButton of the TabCtrl ?
I want to change it with my own.
|
|
|
|
|
Hi,
What I wanna achieve is this:
I want to be able to split a frame like this with different wiews:
---------------
| |
| View 1 |
| |
---------------
| | |
|View 2|View 3|
| | |
---------------
Then by clicking a button or through a menu command I would like to change the frame view becausu I don't like the view layout. So I would like to get this view by the button click:
---------------
| | |
|View 1| |
| | |
|------|View 2|
| | |
|View 3| |
| | |
---------------
Does anyone know how to do this? (code sample?) Your help would be GREATLY appreciated,
/Tommy
|
|
|
|
|
The MSDN for the WinSock bind API call states:
For TCP/IP, if the port is specified as zero, the service
provider assigns a unique port to the application with a
value between 1024 and 5000.
..
Binding to a specific port number other than port 0 is
discouraged for client applications, since there is a
danger of conflicting with another socket already using
that port number.
Unfortunately it does not say when the allocated port number is released. When using this technique I always get the last port number increased by one. Does that mean that this method can only succeed up to 3976 times and will then fail? Or will the port number start again with 1024 after 5000 has been reached?
In summary: Does anybody know more about this feature or have some references?
Oliver
|
|
|
|