My program needed to print a couple lines of txt. What i did was using a listbox (without the LBS_SORT) and printed to screen using invoke SendMessage, hOutputWind, LB_ADDSTRING, NULL, ADDR szResult It works fine, but i would like to know if there isn't an easy way to add text to what's on the screen using a regular edit box instead of the listbox. There doesn't seem to be any AddWindowText proc ;) Thanks.
Posted on 2001-02-23 20:37:00 by Fogger
im not sure if this is what you needed but SendMessage with WM_SETTEXT will put text in an editbox
Posted on 2001-02-23 20:52:00 by hehe
No, it works the same as the SetWindowText proc, it prints the new txt and deletes whatever was in the box before. Unless i'm using it wrong :confused: I want to print some txt, process the next input and print the next line(s) under the previous txt. The number of printed lines is (depending on input) between 5 and 100 lines.
Posted on 2001-02-24 11:57:00 by Fogger
Public Const EM_LINESCROLL = &HB6 In vb I use this flag to send a Message to an edit control to scroll the edit control, if it returns false then your edit control is not multi-line, you could also use the drawtext function, then you could draw directly to the window and set up the way you want it to in code. Hope this helps? :)
Posted on 2001-02-24 13:06:00 by JDog
Try this ... SendMessage(edit,EM_SETSEL,(WPARAM)-1,(LPARAM)-2); SendMessage(edit,EM_REPLACESEL,(WPARAM)FALSE,(LPARAM)Msg); if you don't understand, search in the sdk.
Posted on 2001-03-03 21:30:00 by blackhorus