Recent

Author Topic: C++ conversion : what is the def for "POSITION"  (Read 605 times)

jamie

  • Hero Member
  • *****
  • Posts: 6670
C++ conversion : what is the def for "POSITION"
« on: September 14, 2024, 09:42:17 pm »
as stated:

 I Find this in the CDocument, CFile at times etc.

I cannot find a definition for it.

The way it's being used, I would say it's a 32-bit integer, but I can't be sure.

it is "POSITION" in all caps.
The only true wisdom is knowing you know nothing

Thaddy

  • Hero Member
  • *****
  • Posts: 15923
  • Censorship about opinions does not belong here.
Re: C++ conversion : what is the def for "POSITION"
« Reply #1 on: September 15, 2024, 07:09:07 am »
Bit long since I used MFC but POSITION has different meanings for CFile and CDocument.
1.in CFille it if the file position
2. in CDocument it is the position/index in the collection/list of document views, e.g. GetFirstViewPosition or GetNextView.
It is the size of a pointer so it differs per platform.
If I smell bad code it usually is bad code and that includes my own code.

jamie

  • Hero Member
  • *****
  • Posts: 6670
Re: C++ conversion : what is the def for "POSITION"
« Reply #2 on: September 15, 2024, 03:38:35 pm »
Ok, So I changed it to a PtrUint, that seems to work all around.

Thank you.
The only true wisdom is knowing you know nothing

jamie

  • Hero Member
  • *****
  • Posts: 6670
Re: C++ conversion : what is the def for "POSITION"
« Reply #3 on: September 15, 2024, 04:24:47 pm »
I found this for those that need a reference to the MFC.
https://elhacker.info/manuales/Lenguajes%20de%20Programacion/C++/C++%20-%20MFC%20Bible.pdf

its 2600+ pages and all indexable search etc. very nice find. :o
The only true wisdom is knowing you know nothing

Thaddy

  • Hero Member
  • *****
  • Posts: 15923
  • Censorship about opinions does not belong here.
Re: C++ conversion : what is the def for "POSITION"
« Reply #4 on: September 18, 2024, 05:44:34 am »
I can better that, over 100.000 pages: learn.microsoft.com probably well over a million and indexed.
( nowadays there is no real need to have an msdn subscription )
Note that regarding Windows all other sites are second hand news, that is why I had an msdn subscription for more than 25 years. Still useful if you are a pro, but I am retired.
« Last Edit: September 18, 2024, 05:49:37 am by Thaddy »
If I smell bad code it usually is bad code and that includes my own code.

 

TinyPortal © 2005-2018