Author Topic: Translating PB PTR to O2  (Read 120 times)

0 Members and 1 Guest are viewing this topic.

Offline Chris Chancellor

  • Sr. Member
  • ****
  • Posts: 269
Translating PB PTR to O2
« on: November 11, 2018, 07:13:05 AM »
Hello Charles

i tried translating the below  PB pointer statements to O2  but not successful

Code: [Select]
    Case %NM_CustomDraw                   
           ' (list view) notification to parent re drawing operations
            ' Structure contains info re identifier of item being drawn etc
                    Local lplvcd As NMLVCUSTOMDRAW Ptr       
                    lpLvCd = Cb.LParam



First attempt which GPF  in O2
Code: [Select]
Case  NM_CustomDraw                   
           ' (list view) notification to parent re drawing operations
            ' Structure contains info re identifier of item being drawn etc
            NMLVCUSTOMDRAW ptr  lpLvCd at (Lparam)   


second attempt which is not successful as it just exit function
Code: [Select]
Case  NM_CustomDraw                   
           ' (list view) notification to parent re drawing operations
            ' Structure contains info re identifier of item being drawn etc
         NMLVCUSTOMDRAW   lpLvCd at (Lparam)



so what's the best way to translate these PB statements to O2 ?
Code: [Select]
       Local lplvcd As NMLVCUSTOMDRAW Ptr       
                    lpLvCd = Cb.LParam

Thanxx



Offline Charles Pegge

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 665
    • Charles Pegge
Re: Translating PB PTR to O2
« Reply #1 on: November 11, 2018, 05:07:38 PM »
Hi Chris,
I think it should be:

Local lplvcd As NMLVCUSTOMDRAW Ptr       


 @lpLvCd = Cb.LParam

or
&lpLvCd = Cb.LParam


(PB's '@'  has the opposite meaning, so it is a bit confusing.)
« Last Edit: November 11, 2018, 09:54:31 PM by Charles Pegge »

Offline Chris Chancellor

  • Sr. Member
  • ****
  • Posts: 269
Re: Translating PB PTR to O2
« Reply #2 on: November 13, 2018, 01:32:35 AM »
Thanxx Charles

the following works

      Local lplvcd As NMLVCUSTOMDRAW Ptr
    &lpLvCd =  LParam