|
I'm not sure what they're trying to say - "Hex format"? It could many several things.
The IEEE format for representing a floating point number is
S EEEEEEEE FFFFFFFFFFFFFFFFFFFFFFF
0 1 8 9 31
where S = the sign bit, EEEEEEEE = the exponent, and FFF...F = the fractional mantissa. In this format each bit has meaning, and on the receiving end the consumer has to expect and recognize this format. When you send it in hex, you're just sending bits in groups of 4, or
SEEE EEEE EFFF FFFF FFFF FFFF FFFF FFFF
Hex0 Hex1 Hex2 Hex3 Hex4 Hex5 Hex6 Hex7
It's up to the receiver to combine the 8 hex characters' bit pattern into a single 32-bit value and correctly interpret it as a floating point value.
On the other hand, if your application requires you to send text data only, using the ascii characters that represent the hex characters that are equivalent to your floating point value, you have a real challenge. First you'll have to convert the float into a collection of 4-bit chunks, then determine the hex character for each chunk, then convert each hex character to text. I wouldn't know how to begin that, I'm afraid, though almost everyone here is smarter than I about such things and may be able to guide you.
Hopefully you're dealing with the first case...
"Welcome to Arizona! Drive Nice - We're Armed..." - Proposed Sign at CA/AZ Border
|
|
|
|
|
Anyone know how to use the ip control?? Maybe get the current machine's ip as an example... I would appreciate it.
<marquee>Universal Project
|
|
|
|
|
Getting a machine's IP address and using the IP control are mutually exclusive things.
gethostname();<br />
gethostbyname();<br />
CIPAddressCtrl::SetAddress();
are what you need to look at.
|
|
|
|
|
Let's pretend that you are talking to somebody that does not know anything about the IP Control. Examples are really nice things you know.
<marquee>Universal Project
|
|
|
|
|
And they are plentiful!
http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=cipaddressctrl&btnG=Google+Search
|
|
|
|
|
1) DWORD addr;
((CIPAddressCtrl*)GetDlgItem(IDC_IPIDDRESS1))->GetAddress(addr);
2) BYTE b1,b2,b3,b4;
((CIPAddressCtrl*)GetDlgItem(IDC_IPIDDRESS1))->GetAddress(b1,b2,b3,b4);
If address is 212.176.73.161, b1=212, b2=176, b3=73, b4=161.
yiy
|
|
|
|
|
I have a dialog application which hosts several sub dialogs. I need to send a message from one of the sub dialogs which can be received by all of the other sub dialogs. What's the best way to do this in MFC?
Todd Smith
|
|
|
|
|
Are the dialogs modeless?
|
|
|
|
|
Yes, the dialogs are modeless.
Todd Smith
|
|
|
|
|
If they are all children of a certain window use CWnd::SendMessageToDescendants
John
|
|
|
|
|
Good call, John. I was cooking up something much harder for him.
|
|
|
|
|
My first thought was to save a list of hwnds... But then I remembered about child windows...
John
|
|
|
|
|
SendMessageToDescendants works great except that it sends the message to the current window as well as the children. Annoying but I worked around it.
thx
Todd Smith
|
|
|
|
|
Does anybody know the best way/tool to merge source codes when
you are working with a lot of programmer except VSS?
|
|
|
|
|
sdfdsfa wrote:
...working with a lot of programmer except VSS?
What does this mean? Are you wanting to merge the source code from several different programmers but you are not using VSS?
|
|
|
|
|
Hi,
How can I delete a saved bitmap using the dfile name??
Ehsan Behboudi
|
|
|
|
|
Use DeleteFile() , SHFileOperation() , or CFile::Remove() .
|
|
|
|
|
All of the above + _unlink
John
|
|
|
|
|
Is there a way to properly display the new "XP" transparent 32-bit bitmaps (24b color + 8b alpha channel) as "normal" masked 24-bit bitmaps in Windows 2000/98?
I would like to avoid having to create 2 versions of every bitmap (XP version, Win2000/98 version), however the result I get is that the transparent sections in the 32-bit bitmap are displayed as a black background in Windows 2000/89. I would like to be able to choose the color in which the transparancy is converted into.
|
|
|
|
|
Hi All,
I was wondering if someone could tell me the reason why my project builds every single file in my project everytime I try to execute the exe file? After i build the code, make no changes and hit the execute it says all the .obj file are out of date. It never did this before, but all of a sudden it is making me build all the .obj and exe twice.
I already did a clean and it still does it. I thought if i don't make any changes, the file would know this and not build them all again.
Many thanks in advance
|
|
|
|
|
Try generating a make file. If the same problem occurs with nmake, maybe you'll be able to spot the dependency loop in the make file.
Brad
|
|
|
|
|
This might sound like a stupid suggestion, but check the date/times on all the source modules. If any of them are in the future, this will happen. Happened to me once when someone screwed up the machine we used as a time server, when it got temporarily set to some time in 2007...
Steve S
|
|
|
|
|
Why Transparrent blt not works in following code:
works with usual ::BitBlt()
<br />
works:<br />
::BitBlt(di.hdcDraw,<br />
0,0,100,100,<br />
m_hMemDC,<br />
0,0,
SRCCOPY );<br />
<br />
<br />
::TransparentBlt(di.hdcDraw,<br />
0,0,100,100,<br />
m_hMemDC,<br />
0,0,100,100,<br />
RGB(0,0,128) );<br />
<br />
__________________<br />
<br />
m_hMemDC = CreateCompatibleDC(0);<br />
<br />
HANDLE hOLDBitmap;<br />
<br />
hOLDBitmap=SelectObject(m_hMemDC, hBitmap);<br />
... code at above<br />
<br />
:DeleteDC(m_hMemDC);<br />
<br />
|
|
|
|
|
I never could get TransparentBlt to work on win 9x, so I just use the true mask method which I found at http://www.codeguru.com/bitmap/CISBitmap.shtml[^]
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|