Have a sendmessage problem

Just starting out? Need help? Post your questions and find answers here.
User avatar
loadstone
User
User
Posts: 97
Joined: Wed Jan 16, 2008 11:28 am
Location: china

Have a sendmessage problem

Post by loadstone »

Code: Select all

txt$="Hello World!"
For i = 1 To Len(txt$)
   SendMessage_(456321,#WM_CHAR,Mid(txt$,i),0)
Next
Up code sendmessage , the destination window display "??????????" ,how can I use this api send message #WM_CHAR do it good ?
thanks :)
Diamond Sutra: all law I was into at, forbearance .
http://www.8do8.com
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Re: Have a sendmessage problem

Post by netmaestro »

do it good:

Code: Select all

OpenWindow(0,0,0,320,240,"", #PB_Window_SystemMenu|#PB_Window_ScreenCentered)
StringGadget(0,100,100,100,20,"")
txt$="Hello World!"
For i = 1 To Len(txt$)
   SendMessage_(GadgetID(0),#WM_CHAR,Asc(Mid(txt$,i)),0)
 Next
Repeat:Until WaitWindowEvent()=#PB_Event_CloseWindow
BERESHEIT
User avatar
loadstone
User
User
Posts: 97
Joined: Wed Jan 16, 2008 11:28 am
Location: china

Re: Have a sendmessage problem

Post by loadstone »

[quote="netmaestro"]do it good:
quote]

I'm from inside to outside both thank your help :P
Diamond Sutra: all law I was into at, forbearance .
http://www.8do8.com
Post Reply