Comments welcome.
The autocomplete is (somewhat) correct.
You can check this by setting the cursor on ImageDosHeader^.
Press Alt+Up.
Set the cursor on the type PIMAGE_DOS_HEADER and press Alt+Up.
Set the cursor on the type ^TIMAGE_DOS_HEADER and press Alt+Up.
Then you see you end up in struct.inc.
So you have this line and expect the ^TIMAGE_DOS_HEADER points to YOUR new TIMAGE_DOS_HEADER.
But is doesn't. It points to the TIMAGE_DOS_HEADER in struct.inc according to the autocompleter (which isn't actually correct).
Why are you redefining types and not renaming them?
Now you have two TIMAGE_DOS_HEADER in your project (which gets confusing).
Rename it to something else and you have no problems.
I agree... the autocompleter should look at forward definition before going down the tree... but it gets confused by the already defined definition.
BTW. So it's not only the autocompleter but also the code-browser (Alt+Up etc) which does this incorrectly (but maybe those are the same
).