|
That was exactly what I needed. Thanks buddy.
I was over-engineering my own attempt at a solution, and was so far into the forest, I couldn't see the trees.
|
|
|
|
|
I can't figure out how to control the color of text drawn with CDC::TextOut. CFont or LOGFONT don't seem to have a color attribute, and none of the other crazy things I tried worked. Ideas?
thanks,
Jake
|
|
|
|
|
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.
|
|
|
|