SendMessage_
SendMessage_
How to use this command to make an editor gadget non-readonly? (#ReadOnly flag)
			
			
									
									
						- netmaestro
- PureBasic Bullfrog 
- Posts: 8452
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
Re: SendMessage_
Assuming your editor gadget is 0:
Pass #True for wParam to set it back to readonly.
			
			
									
									Code: Select all
SendMessage_(GadgetID(0), #EM_SETREADONLY, 0, 0)BERESHEIT
						Re: SendMessage_
Thanks but the editor is not a purebasic gadget.
Should i change GadgetID(0) to control id?
			
			
									
									
						Should i change GadgetID(0) to control id?
- netmaestro
- PureBasic Bullfrog 
- Posts: 8452
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
Re: SendMessage_
Use the hwnd of the control (large number) not the control ID (small number)
			
			
									
									BERESHEIT
						Re: SendMessage_
Hmm i use winspector and i found that control is named RichEdit20W & ID is 1153 but when i use the API 
nothing changes 
			
			
									
									
						Code: Select all
SendMessage_(1153, #EM_SETREADONLY, 0, 0) 
- netmaestro
- PureBasic Bullfrog 
- Posts: 8452
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
Re: SendMessage_
1153 is going to be the control id. Remember I told you you need the hwnd and that is going to be a large number, like 21593776 or such. It's the handle you want, surely Winspector provides that too.
			
			
									
									BERESHEIT
						Re: SendMessage_
Not sure why now works but i found 000104C4 at winspector and added a '$' in front of it.
 
works perfecty!
Thank you for your time my friend!
			
			
									
									
						Code: Select all
SendMessage_($000104C4, #EM_SETREADONLY, 0, 0)works perfecty!
Thank you for your time my friend!


