Jose's Read Only Forum 2023

IT-Consultant: Charles Pegge => OxygenBasic => Topic started by: Chris Chancellor on November 11, 2018, 07:13:05 AM

Title: Translating PB PTR to O2
Post by: Chris Chancellor on November 11, 2018, 07:13:05 AM
Hello Charles

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


    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

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

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 ?

       Local lplvcd As NMLVCUSTOMDRAW Ptr       
                    lpLvCd = Cb.LParam


Thanxx


Title: Re: Translating PB PTR to O2
Post by: Charles Pegge 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.)
Title: Re: Translating PB PTR to O2
Post by: Chris Chancellor on November 13, 2018, 01:32:35 AM
Thanxx Charles

the following works

      Local lplvcd As NMLVCUSTOMDRAW Ptr
    &lpLvCd =  LParam