Hi. I have a simple app, explorer type, with treeview in left side, and listview in right side. On both of them, I handled OnRClick menu, and they are working fine. It is a possibility to fire them using [^]menu key from keyboard ?
In the list control, we have the function to get the top index in MFC, GetTopIndex(), but how can we have the index of the visible last row of the list control whether we scroll it or not? I am asking this question because I have to put a design on the bottom of the last row, even if I scroll it should stay on the last row's bottom. How should I refer to the last visible row programmatically?
From my point of view you are right that it looks like a definition for shared access and that is an error in the documentation. To verify this have a look at the register specifications in the data sheet.
From memory that breaks several other MISRA-C rules under section 11 ... 11.1 through 11.6 restrict what you can do with C casts.
Hardware related implementations usually involve coding that MISRA rules see as "dangerous". I can tell you from experience the easiest way around them is drag it down to included assembler blocks. The assembler blocks fall outside the scope of MISRA.
You could define two different extern's in a .h file to the same register with assembler which would essentially restore the use of the union yet be MISRA compliant
No those are still technically C and hence under MISRA rules.
It's a really weird standard adopted by some automobile manufacturers and a few telco's as some sort of we will get better code think-tank. The reality is all studies have shown it has almost zero improvement on software bug numbers or severity.
As I said, the few times I have run across it, I do what most do ... drop to assembler and go around the rubbish. That in itself tells you how good the standard is.
Other than that you can go thru the process to raise a deviation (section 5.3.2) but that means documenting and getting approval for the variation which is far more red tape than most can handle.
The standard libraries are also exempt from MISRA under a special rule 6.6 and so you can implement your own special standard library function to get around it. Think about it memcpy and memmove take void* and you have a specific register address target