Fungus Posted March 25, 2008 Posted March 25, 2008 I'd like to create a log (in an edit box or?)Like in dup2's patch window, and ImpREC's log window.How do I go about doing this, I've searched and searched and can find no src on how to do this.I'd also like to be able to save the log to a file, and be able to scroll the log up and down.thnx in advance =)
What Posted March 25, 2008 Posted March 25, 2008 (edited) You have to use SendMessage commands. There is a bunch of different ways to use the command. For instance using invoke SendMessage, eax, LB_ADDSTRING, -1h, offset bufferwhere eax = handle of window, buffer = text to be addedwill keep adding lines of text. But there is a lot of different ways to go about doing that. I hope this at least points you in the right direction. Edited March 25, 2008 by What
Ufo-Pu55y Posted March 25, 2008 Posted March 25, 2008 I never used it, but I think I would prefer a simple multiline editbox instead of a listbox.(ES_AUTOVSCROLL + ES_MULTILINE + WS_VSCROLL)Then simply using lstrcat for adding text with 13,10 at the end.Saving the whole stuff will be easier, too, coz you only got 1 string in the end.Something like:szInfoText db 'hello',0sz_13_10 db 13,10,0invoke lstrcat,addr szLog,addr szInfoTextinvoke lstrcat,addr szLog,addr sz_13_10invoke SetDlgItemText,hWnd,IDC_EDITBOX,addr szLoginvoke SendDlgItemMessage,hWnd,IDC_EDITBOX,EM_LINESCROLL,0,7FFFFFFFh; for always seeing the last added lineTho it might be kinda slow way, if the log's getting really huge...
HVC Posted March 25, 2008 Posted March 25, 2008 Here's a crude example of using a list-box to perform the task.LOG.zip
mia Posted March 25, 2008 Posted March 25, 2008 This topic may help uhttp://www.winasm.net/forum/index.php?showtopic=2040mia...
Fungus Posted March 25, 2008 Author Posted March 25, 2008 Thanks much for the examples, I think I can make use of one or the other.You guys rock as always =)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now