I tried doing it like quick pad, but it gave me a conflictive error when Invoking edit window:
Qikpad.asm(368) : error A2137: too few arguments to INVOKE
Qikpad.asm(444) : error A2111: conflicting parameter definition
Qikpad.asm(510) : error A2137: too few arguments to INVOKE
Qikpad.asm(535) : error A2137: too few arguments to INVOKE
in my richedit proggie it gives me the same errors
I tried Sending a msg to richedit with word wrap but i saw in the winapi help file, that is only for jap text.
Qikpad.asm(368) : error A2137: too few arguments to INVOKE
Qikpad.asm(444) : error A2111: conflicting parameter definition
Qikpad.asm(510) : error A2137: too few arguments to INVOKE
Qikpad.asm(535) : error A2137: too few arguments to INVOKE
in my richedit proggie it gives me the same errors
I tried Sending a msg to richedit with word wrap but i saw in the winapi help file, that is only for jap text.
You've just to do like following:
invoke SendMessage, hwndRichEdit,EM_SETTARGETDEVICE, NULL, 500000
to set WordWrap off.
And put 0 as last argument to set it on.
I think that is what you want.
invoke SendMessage, hwndRichEdit,EM_SETTARGETDEVICE, NULL, 500000
to set WordWrap off.
And put 0 as last argument to set it on.
I think that is what you want.
hehe, the errors where wrong, it was different.
i tried to do it again and i got it, but when the window updated the text was deleted. i tried other code and it crashed.
well, i think ill use that message, thx vom
i tried to do it again and i got it, but when the window updated the text was deleted. i tried other code and it crashed.
well, i think ill use that message, thx vom
word wrap is done, thanks for your help. :D :D
just in case you wanna know this is how i did it
in the include file:
WordWrap PROTO
.data
WrapFlag dd 0
in the main asm file:
.elseif wParam == 1109
invoke WordWrap
and this is the proc
; #########################################################################
WordWrap proc
.if WrapFlag == 0
mov WrapFlag,1
invoke SendMessage, hRichEd,EM_SETTARGETDEVICE, NULL, 0
szText WrapON," Wrap ON"
invoke SendMessage,hStatus,SB_SETTEXT,1,ADDR WrapON
.elseif WrapFlag == 1
mov WrapFlag,0
invoke SendMessage, hRichEd,EM_SETTARGETDEVICE, NULL, 500000
szText WrapOFF1," Wrap OFF"
invoke SendMessage,hStatus,SB_SETTEXT,1,ADDR WrapOFF1
.endif
ret
WordWrap endp
; #########################################################################
just in case you wanna know this is how i did it
in the include file:
WordWrap PROTO
.data
WrapFlag dd 0
in the main asm file:
.elseif wParam == 1109
invoke WordWrap
and this is the proc
; #########################################################################
WordWrap proc
.if WrapFlag == 0
mov WrapFlag,1
invoke SendMessage, hRichEd,EM_SETTARGETDEVICE, NULL, 0
szText WrapON," Wrap ON"
invoke SendMessage,hStatus,SB_SETTEXT,1,ADDR WrapON
.elseif WrapFlag == 1
mov WrapFlag,0
invoke SendMessage, hRichEd,EM_SETTARGETDEVICE, NULL, 500000
szText WrapOFF1," Wrap OFF"
invoke SendMessage,hStatus,SB_SETTEXT,1,ADDR WrapOFF1
.endif
ret
WordWrap endp
; #########################################################################
Hi there,
it is just a thought of my rusty asm brain but if you do this:
wouldn't this cause your proggy to create the string WrapON or WrapOFF1 everytime you change the state of your RichEdit?
Dunno, maybe I am wrong here, but I would either add these two strings to DATA Section or I would put these two into a "secure place" which only runs for the first time using a flag.
YaWNS
it is just a thought of my rusty asm brain but if you do this:
.if WrapFlag == 0
mov WrapFlag,1
invoke SendMessage, hRichEd,EM_SETTARGETDEVICE, NULL, 0
szText WrapON," Wrap ON" <-----
invoke SendMessage,hStatus,SB_SETTEXT,1,ADDR WrapON
.elseif WrapFlag == 1
mov WrapFlag,0
invoke SendMessage, hRichEd,EM_SETTARGETDEVICE, NULL, 500000
szText WrapOFF1," Wrap OFF" <-----
invoke SendMessage,hStatus,SB_SETTEXT,1,ADDR WrapOFF1
wouldn't this cause your proggy to create the string WrapON or WrapOFF1 everytime you change the state of your RichEdit?
Dunno, maybe I am wrong here, but I would either add these two strings to DATA Section or I would put these two into a "secure place" which only runs for the first time using a flag.
YaWNS