|
Thank you very much all of your response,
The approach Arun has suggested is i think the way i was looking for as best and fasted approach.
Thanks Arun to help me suggesting this approach, it's really nice and definitely fastest method uses full potential of C/C++ language.
Thanks again.
Vikas
vicky
|
|
|
|
|
One more advantage of this method i can change limits any time at one location for any if condition.
So to change the limits i need to see only at one place.
Thanks
Vikas
vicky
|
|
|
|
|
Hai!
Using MessageBox or AfxMessageBox we are able to display some message to the user during runtime, the message may include the value returned from a function etc.
Can we do the other way ??
I want the user should enter one byte data during run time, depending on the entered value i want to proceed my calculation .
Is it posible in MFC, if yes how to do it !!
Thanks!
|
|
|
|
|
kapardhi wrote: I want the user should enter one byte data during run time, depending on the entered value i want to proceed my calculation .
Is it posible in MFC, if yes how to do it !!
So why not just create a dialog box with an edit control?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Is there no other way other than creating a dialog !!!
Any inbuilt messagebox !!
thanks!
|
|
|
|
|
kapardhi wrote: Is there no other way other than creating a dialog !!!
No.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Instead of typing all these exclamation marks you could have already created that dialog.
|
|
|
|
|
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
What are you smoking today?
|
|
|
|
|
Do you want to join the party?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
|
hi,
I have to develop a user interface which will take an XSD file as input.I'll read this xsd file and get the elements from the xsd file and generate an xml file dynamically. also after generating the xml file i have to validate it with the xsd file. how can i achieve this....
I have thought of a solution but pls comment if it is an effecient way.
I already have a sample as to how the xml file would look. So is it fine if i generate the GUI with the controlls and allow the user to enter the datas and then parse it and generate the xml file (Statc one not a dynamic one)?? I prefer this method because in the xsd file the elements are classified as either required one or optional one... so it becomes difficult to read all the elements in the xsd and populate them as a control in the UI dynamically. Also i couldnt find any way to read the elements of an xsd file. I want only in VC++ not in any other tool (vb or .net).
Pls help
Regards
Jayaraman
|
|
|
|
|
Hi,
I need to take last two bytes from unsigned integer. How can i get it.
Ratheesh,
|
|
|
|
|
Hello Ratheesh,
You can use LOWORD()[^] macro to get the last two bytes together.
If you need last two bytes separately, then call LOWORD()[^] to get last two bytes together and then get bytes separately by calling LOBYTE()[^] and HIBYTE()[^] macros.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
modified on Friday, June 12, 2009 7:43 AM
|
|
|
|
|
ratheeshnair123 wrote: last two bytes
it is a bit ambiguous...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
You can also achieve the results using & and shift-operators. Something like unsigned-var & 3 (as last 2 bits are 1s and all others are 0s) and then do left-shift to get last 2 bits.
|
|
|
|
|
no need to left shift the bits. they are already in the required order.
regards
|
|
|
|
|
Another option is to use the modulus operator:
int i = 0;
int x = 0;
i = 1286439;
x = i % 65536;
Just another way to do the same thing.
Karl - WK5M
PP-ASEL-IA (N43CS)
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
|
|
|
|
|
Hii
I wanna open a logical partition and read all of its file using windows function
ReadFile().
I know
HANDLE handle= CreateFile( L"\\\\.\\D:",-------);
bool b= Readfile(handle,buffer,bytes to read ,bytes read,0);
if ((b && bytes read )==0)
My doubt is here we are getting the file as in the buffer.How to get the that file itself?
I wanna make some operation on that file.
So how to get that particular file?
Otherwise I've to create a new file with same name and write into it Using WriteFile() function ?
I've to read all file one-by-one..? how to perform this ?
Thanking you.
|
|
|
|
|
krish_kumar wrote: My doubt is here we are getting the file as in the buffer.How to get the that file itself?
You've to break the hard disk with a hammer, I suppose.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
krish_kumar wrote: How to get the that file itself?
Are you referring to the sectors on the disk that represent that file?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hii
In my application , wanna copy all files from one partition to another partition.
First I copied a file that I taken default and copied to another partition.
The above operation is done by using the control code "FSCTL_GET_RETRIEVAL_POINTERS".
The clusters used are read and wrote into destination volume using readfile() and writefile() windows functions.
Now I gotta copy all files.....
So how to proceed ....??
|
|
|
|
|
krish_kumar wrote: Now I gotta copy all files.....
So how to proceed ....??
If you can successfully copy one file, why can't you copy more than one?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|