|
Hey Friends
Is it possible to read data from another application's owner draw control?
Regards
|
|
|
|
|
1. get the pixels
2. use OCR to figure out what letters they represent
|
|
|
|
|
Thanks a lot
Here the disadvantage i see is that the screen must be displayed always
Is OCR the only way out?
|
|
|
|
|
unles you can convince that application to draw to an off-screen DC< you don't have a choice.
|
|
|
|
|
Hello,
I'm trying to stream data from a microcontroller and I think I have found problem. The data does not stream consistently so it will sometimes send a bunch of packets(5 byte packet) at once and then sometimes send them individual. When the speed at which they come in changes the data seems to become corrupted as only a couple of packets are wrong and then the data continues streaming properly again. I have no idea of what is going wrong here.
I'm using the CSerial library and using the CSerialMFC for the notifications, and just a simply read on event received. Any idea of what could be going wrong here would be great.
Thanks
Simon
|
|
|
|
|
I'm also using a baudrate of 115200, thought that might help a bit cause I have heard and read people have problems with higher baudrates.
|
|
|
|
|
Well yes and no. Serial anything, especially low level serial port, can be problematic, but data corruption is highly unusual. I can only tell you what I would do. I would write a small test program (or use the current program - easier) that creates/opens a file during start up and then add code that writes to it every time you receive any data at the lowest level. If there is corruption at that level then you have a major problem, which only the current programmer (you) can solve, usually by writing your own version of that unknown piece of code. If there is no corruption at that level (normal), then you need to start working you way up, adding new code to write to the file, until you see corruption. At that point you can limit the file writing code to what shows good data and bad data. Keep adding file writing code until you have the offending code in sight and then add file writing code to each line of the offending function (if you do not see the problem).
I suspect that you know all that already, but it is the best I can do without the code.
P.S. Remember to delete the temporary file after you have found the problem and post the results (to the author of CSerial or what ever).
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
do{
SerialLib.Read(recvbuf, 5, &BytesRead);
if(BytesRead == 0)
return 0;
for(i=0; i<int(BytesRead); i++)
storebuf[i] = recvbuf[i];
TotalBytes = int(BytesRead);
while(TotalBytes <5){
BytesNeeded = 5 - BytesRead;
SerialLib.Read(recvbuf, BytesNeeded, &BytesRead);
for(i=TotalBytes; i<int(TotalBytes+BytesRead); i++)
storebuf[i] = recvbuf[i];
TotalBytes += int(BytesRead);
}
recievedbytepackage.byte0 = storebuf[0];
recievedbytepackage.byte1 = storebuf[1];
recievedbytepackage.byte2 = storebuf[2];
recievedbytepackage.byte3 = storebuf[3];
recievedbytepackage.byte4 = storebuf[4];
TotalBytes = 0;
}
while(BytesRead > 0);
This is the code that I'm using to read the data, and the problem is being caused in here as we have another program written in TCL that recieves that date from the controller just fine so we know it's not a hardware issue.
Any help would be great thanks.
|
|
|
|
|
Hi all,
I have CListBox with selection set to Extended in resource editor.
In my prog I need to set selection to single.
Please point me, how can I do this?
|
|
|
|
|
Remove the LBS_MULTIPLESEL style.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
* waiting for the other shoe *
|
|
|
|
|
This one doesn't work
m_listFiles.ModifyStyle( 0, LBS_EXTENDEDSEL | LBS_MULTIPLESEL );
|
|
|
|
|
Romiks wrote: This one doesn't work
How are you verifying this? After this runs, you should be able to use Spy++ to see the list of styles that particular control has. You should see LBS_EXTENDEDSEL and LBS_MULTIPLESEL in that list. Of course if you want the control to be single-select, I doubt that adding the LBS_MULTIPLESEL style will work.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Ok, I did single select ListBox and trying to add styles like this:
m_listFiles.ModifyStyle( 0, LBS_EXTENDEDSEL | LBS_MULTIPLESEL );<br />
m_listFiles.UpdateWindow();
SPY shows me LBS_EXTENDEDSEL and LBS_MULTIPLESEL styles present, but actually the list is single select
|
|
|
|
|
Then you may have found a style that cannot be altered at run-time. There are several.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
What about not using ModifyStyle?
I mean get the style, style = style | ~NonDesiredMode and SetStyle (style) another time... can it work?
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
|
|
|
|
|
Nelek wrote: can it work?
Why not try it and see?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
You are quite right, thanks
I'll try to find another way.
|
|
|
|
|
Can anybody tell me with VC++ 6.0 which latest version of MFC we use and release
date of MFC 4.0???
ThankXXX
There Is Nothing Right & Wrong
|
|
|
|
|
|
Fish see here.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
NOOOOO! Now we have three (you, me and Mark), is that enough to start a club?
Oh frack I guess I should have googled that[^]!
|
|
|
|
|
Hi -
I have a problem that's been bothering me for quite a while. I really hope that someone can help me...
I'm writing my code in visual C++, which seems to have very poor documentation for the datagrid. I've seen some C# code to do this, but it can't really be transferred to C++, it seems.
I have a DataGrid with 2 checkbox columns. I also have a button called "update". The goal is the following:
1) When the user clicks the update button, the application scans through the datagrid and determines which checkboxes are currently checked (for both columns)
2) This information is then used for something else, which is not relavant here.
Thanks in advance.
Kim
|
|
|
|
|
|
please help me i want read some of hardware serial ?
hamed
|
|
|
|