I have a Box with certain width and height. The box has to contain a certain text that should be visible inside the box no matter how long it is.
So, if the text is too small then it should take as much space in the box as possible. Its size should be inversly proportional to the text length. But I have to maintain its actual characters proportion too.
Any body who has ever done it in MFC. I am using VC 8
Is there any command that gets all the details of the device connected to the serial port ??
Actually i connect a smart card reader to a serial COM port, i send some data to it using WriteFile (), in return it gives some response, i read the response using ReadFile().
Now if i donot connect the reader and simply connect the serial cable to computers serial port i send the data to the handle of the serial port using WriteFile(), the computer(or ReadFile ()) waits infinitely for receiving response !
In order to solve above problem i use COMMTIMEOUTS, so if the specified time expires the ReadFile() executes successfully although it doesn't get the response!!
Actually i donot want to use COMMTIMEOUTS since i donot know the exact time in which the reader sends a response !!
if i use maximum delay it decreases the performance of my application, if i use completely less time delay, the ReadFile() expires even before it receives respone from the reader!!