Click here to Skip to main content
15,902,016 members

Comments by Michael Melkonian (Top 12 by date)

Michael Melkonian 7-Apr-11 1:14am View    
I agree. Tony needs to explain a bit more - lets see what the real situation is - I am curious :)
Michael Melkonian 6-Apr-11 23:38pm View    
I think you misunderstand the devices you are describing, SA. They take serial data packets from a serial port, encapsulate them in an UDP/TCP/IP packet(typically TCP) and send it to another similar device via Ethernet/Internet. The receiver strips the packet off TCP/IP header, and shoves the raw data into the serial line of device #2. To the end devices the communications looks exactly the same as if the two were connected via RS485, or RS232 or TTL or whatever, they don't even know they are connected through Ethernet/Internet.

What Tony wants is totally different.
Michael Melkonian 6-Apr-11 21:56pm View    
Ahh, the CRecordView. I had some trouble with OnRecordNext and OnRecordPrev too, so in one project I had to do my own handlers for the move buttons. It only had 6-8 lines and I think replicates the default framework-generated ones. Let me know if you the code I can dig it out.

Probably too much trouble if you only have (a smallish) problem with losing focus.

Have you tried handling First Last Next and Prev toolbar buttons in CMainFrame instead? Find the CRecordView and call View's handler? That way, the buttons should always be enabled.
Michael Melkonian 6-Apr-11 21:41pm View    
This is quite an unusual setup. You would expect data proprietary protocol (e.g. over RS485) to be encapsulated in TCP/IP, not the other way around.

In addition, RS485 is a multidrop party line type arrangement, and not common for use with 2 stations only.

The key question is : what is carried inside the TCP packets?

Do the two devices establish a TCP connection and send some prorietary application data through it?
Michael Melkonian 5-Apr-11 20:34pm View    
Well it is going to look heavy either way I think - you are, in effect, you are overriding what framework does when it sets the focus. To be honest, I am struggling to see why would you ever want to do that - much easier to just ignore the input even if the focus is set - if thats what your application requires.