|
|
|
Hi,
I have a dialog application where user enters hex values in CEditbox.
Is there a editbox where we can create a member variable of type HEX??
for CEDIT, only int, long, byte etc are possible but not HEX.
the hex value can range from 0x00 to 0xFFFFFFFFFFFFFFFF
in this case.
Any clues on how to do this????
- KK
|
|
|
|
|
|
I thought about that, but not sure of how to do that. Is there a code I can refer or has someone done something similar to this?
- KK
|
|
|
|
|
|
I did check that.
It validates the user entry and makes sure that user enters valid hex code, but does not solve my problem. It does not have a member variable which can give me hex value.
- KK
|
|
|
|
|
|
Thank you for your time, although I was looking for help from someone who can give easy to follow help for beginers too !
- KK
|
|
|
|
|
|
kk_vp wrote: It validates the user entry and makes sure that user enters valid hex code...
Actually it says it will do that but it is missing several key points.
kk_vp wrote: ...It does not have a member variable which can give me hex value.
What do you mean by this?
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
|
|
|
|
|
there's no particuliar type to store hexadecimal values.
the answers of Owner Drawn are good enough. if you'r not satisfied, please detail the points you need help on, because nobody will do the whole job for you...
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VCalc 3.0 soon...]
-- modified at 8:09 Tuesday 31st January, 2006
|
|
|
|
|
|
|
Dont worry tox, Owern Darwn is a cool guy, he wont mind
VuNic
|
|
|
|
|
|
how you use this Hexa numbers, in ur program
|
|
|
|
|
I like to say that better give CString for member variable. How you use this Hexa numbers in ur code?? will you use bthem as hexa numbers or convert them as decimal numbers?
|
|
|
|
|
hi all,
sorry for this late reply. got in to something else.
I got it working.
the input required from edit box is hex value.
since this has a , b etc a value of type int does not work.
so as mentioned by one of you, I used value type string.
and then converted string to hex value using
sscanf(temp,"%x",&value);
now value has hex what ever user entered.
I still have a problem.
I need a 6 byte hex number from user in some cases.
so the 'value' is UCHAR[6] for that case.
for such big values, this is not working. I get some junk values after conversion.
Another thing,
I usually use messagebox to check intermediate values. but with CHAR[6] containing a hex value how do I make it to string and pass to mesagebox..
I hope I am clear and I'll get some help.
- KK
|
|
|
|
|
Hi,
Is there any way I can get the actual content type of a URL without downloading the file completely ?
1. I tried CHttpFile::QueryInfo with HTTP_QUERY_CONTENT_TYPE, But for that to work, I must call SendRequest, which will download the complete file.
2. I tried FindMimeFromData(...) with Url option, But its not even connecting to the internet to get the Mime type, instead I believe it checks only in the url. Sometimes the url may not be having any information about this and the server might set the mime type, so I need a method which will download only the Http response header and extract this information.
Thanks
Jugs
"A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."
|
|
|
|
|
You could ask the server - The response of a HTTP request gives the MIME type. To see what I'm talking about try this:
1. Open a command prompt and enter "telnet www.thecodeproject.com 80".
2. Now type the following, exactly (you will not be able to see what you're typing - The blank line at the end is important):
HEAD /images/standard/logotop.gif HTTP/1.1
Host: www.thecodeproject.com
The response from the server will indicate the content type (see the "Content-Type" header field).
I'm not saying you have to do all this manually at the socket level (although to do so would not be hard), but if you can figure out how to send a HTTP "HEAD" request to the server and read the response using whatever framework or API you're into you should be able to do it.
Steve
|
|
|
|
|
Hi Steve,
That was indeed very helpful. I used plain sockets and got this to work.
Thanks a TON!!!
Jugs
"A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."
|
|
|
|
|
Hi everybody,
I'm looking for a possibility to monitor file access via a windows hook
but couldn't find anything on the MSDN page.
Isn't it possible to monitor and modify file open, read, write and close events?
Please help.
|
|
|
|
|
There are various techniques ranging from kernel patching, user mode API hooking, filter drivers, etc. Which you choose would depend on the scope of the hook - is it just one process or the system as a whole?
Steve
|
|
|
|
|
I only want to control file access from a single application.
Every time the app want to read from a file on disk it should provide the data from within a encrypted archive.
|
|
|
|