How to make phonton GUI Function safty in thread handle func

I create a thread ,and in the thread handle function ,I receive messages
and call phonton GUI Function ,such as PtSetResource( ) ,to modify GUI . But
the program shut down immediately, So can anyone help me to make phonton GUI
Function safty in thread , or other way to modify GUI in thread .

Check out PtEnter() and PtLeave()

“Bill chour” <zmc@263.net> wrote in message news:931ce2$8vn$1@inn.qnx.com

I create a thread ,and in the thread handle function ,I receive
messages
and call phonton GUI Function ,such as PtSetResource( ) ,to modify GUI .
But
the program shut down immediately, So can anyone help me to make phonton
GUI
Function safty in thread , or other way to modify GUI in thread .