|
Continuation of above reply ....
you can use overlapped-IO operation for communication with serial com port.
Read code snippet for overlapped-IO is given below:
DWORD dwRead;
BOOL fWaitingOnRead = FALSE;
OVERLAPPED osReader = {0};
osReader.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
if (osReader.hEvent == NULL)
if (!fWaitingOnRead) {
if (!ReadFile(hComm, lpBuf, READ_BUF_SIZE, &dwRead, &osReader)) {
if (GetLastError() != ERROR_IO_PENDING)
else
fWaitingOnRead = TRUE;
}
else {
HandleASuccessfulRead(lpBuf, dwRead);
}
}
buntyrolln
|
|
|
|
|
Hi all,
I m working on VC++ 2005, MFC-SDI type application, I m using ODBC for connection of Access Database.
CRecordset use as Derived class of Database.
Here i want to get the index of Currently save Record.
Please tell me how can i do this.
I m waiting for your valuable suggestions.
Thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
ThatsMe. wrote: CRecordset use as Derived class of Database.
CRecordset is derived from CObject not Database . If you have something different, perhaps that is the cause of your problem.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
|
Hi all,
In VC++ 2005, How can use keyboard on ListCtrl.
Because when i use Tab Key then the control not goes to ListCtrl.
please help me for this.
Thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
Did u specify the Tab stop style( WS_TABSTOP ) to list control?
|
|
|
|
|
Yes sir.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
Well even if the list control, got keyboard focus, there will not be any difference in the apperance unless one item is selected. so select one item and try pressing tab.
modified on Thursday, June 12, 2008 2:22 AM
|
|
|
|
|
Thanks.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
Hi all,
In my application after calculation i m get value in this form "2606.451613".
i want the after "." two digit value like "2606.45".
how can i do this.
Help me for this.
Thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
CString::Format helps.
CString str;
str.Format("%.02f",f);
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
thanks.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
The other answer you got was correct, but you don't need a CString object to do this. The format specification[^] (%.02f) is the one that does the trick.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
Fixed link - June 12, 2008 3:47 AM
|
|
|
|
|
How does format specifiers for debugger solve the OP's problem?
-Saurabh
|
|
|
|
|
I got it now. I linked him to the format specifications recognized by the debugger. Link fixed, thanks for pointing out. And, my post was to emphasize that a CString object is not required to do something like that.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
No problem. You are welcome.
-Saurabh
|
|
|
|
|
|
Yes VC++ do allow to put variables anywhere within function body. You are getting this error because you are compiling this code from a .c file. In C variables are allowed only at the begining of a function. Just change the file extension from c to cpp and it will compile.
-Saurabh
|
|
|
|
|
is there anywhere in the registry or using one of the wmi classes that i can get the gpu core, memory, shader speed?
if no. does anyone know how to get this info?
|
|
|
|
|
For basic information like Name of the gpu card, memory, etc you can use Win32_VideoController class in WMI. For number of shaders, texture units, etc you will have to use directx or opengl.
-Saurabh
|
|
|
|
|
i need core speed shader speed and memory speed only. the rest dont matter
|
|
|
|
|
Hi,
How to get rid of reference to MSJAVA.DLL in Visual C++?
I am building x64 bit COM object and for some reason the DLL depends on MSJAVA.DLL (which is x86); therefore, I am unable to debug this on runtime.
I got this error when turned on "Enabled unmanaged code debugging" in C#:
Error while trying to run project: Unable to start program 'C:\Temp\COM\TestDriver\TestDriver.exe'.
The debugger does not support debugging managed and native code at the same time on this platform.
Anyone know how to remove this reference? I am using Visual Studio 2005.
Cheers
|
|
|
|
|
Hi Masters!
I've a window without titlebar; So it doesn't have any text on its taskbar button. Can i set a title to it?
|
|
|
|
|
Usef Marzbani wrote: Can i set a title to it?
Yes, Call SetWindowText( _T( "New title" ));
For e.g. If I have a dialog without a caption bar I would call SetWindowText in OnInitDialog to avoid a blank button in the windows taskbar.
Nibu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
|
|
|
|
|
Yes you can do.
-@SuDhIrKuMaR@-
|
|
|
|