• Welcome to Jose's Read Only Forum 2023.
 

Translating PB PTR to O2

Started by Chris Chancellor, November 11, 2018, 07:13:05 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Chris Chancellor

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



Charles Pegge

#1
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.)

Chris Chancellor

Thanxx Charles

the following works

      Local lplvcd As NMLVCUSTOMDRAW Ptr
    &lpLvCd =  LParam