How to use pttoggole button?

I try to use PtSetresource(widget,Pt_ARG_FLAGS,Pt_SET,0),
but it does’t work.

PtSetResource( widget, Pt_ARG_FLAGS, Pt_TRUE, Pt_SET)

That will do what you want.