|
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
|
|
|
|
|
|
i am working on SDI based application. in view area i draw four square, i am reading the data from the file,and plot that data in separate square. the problem here is that that the graph which plot goes out of that square area.which is not desired. i want to plot that graph in the square area without any alternation in the graph,i mean i want to fix this graph within that square area without changing the size of the data.
kkkljj
|
|
|
|
|
I'm not a 100% sure if I understand what you want.
::SelectClipRgn() or CDC::SelectClipRgn() can be used on a device context to allow drawing only inside a specific shape (a rectangle in your case). Use ::CreateRectRgn() or CRgn::CreateRectRgn() to create your valid drawing area.
|
|
|
|
|
To map the data image to the window client area you need the following values
int xMinData;
int xMaxData;
int yMinData;
int yMaxData;
(as maximum and minimum values of the bounding rectangle of the data image)
then perform (assuming your client area is {0, 0, widthWnd-1, heightWnd-1}:
xWnd =(int) (((double) xData - xMinData) / (xMaxData-xMinData) * widthWnd + .5);
yWnd =(int) (((double) yData - yMinData) / (yMaxData-yMinData) * heightWnd + .5);
formula correctness test is left to the reader
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'm fairly new to VC++ and I'm trying to develop a device manager type of utility.The problem I'm facing is with SPDRP_INSTALL_STATE property. Whenever I try to retreive this property I get the following error at compile time.
error C2065: 'SPDRP_INSTALL_STATE' : undeclared identifier
My syntax is:
SetupDiGetDeviceRegistryProperty(dInfoSet,&devInfo,SPDRP_INSTALL_STATE,&dwT,(PBYTE)&dwIS,sizeof(dwIS),NULL);
where dwIS and dwT are both DWORD.
I also tried the following syntax:
SetupDiGetDeviceRegistryProperty(dInfoSet,&devInfo,SPDRP_INSTALL_STATE,NULL,NULL,0,&reqSz);
szBuf=(char *)malloc(reqSz);
SetupDiGetDeviceRegistryProperty(dInfoSet,&devInfo,SPDRP_INSTALL_STATE,NULL,(unsigned char *)szBuf,reqSz,&reqSz);
Both give the same compilation error.I should also like to point out that the latter snippet works with other properties like SPDRP_DEVICETYPE. I've hit a dead end because of this as I need to know if the device is working properly.Any ideas?? Do I need to use cfgmgr32.h ?(Although I doubt it) Please help
|
|
|
|