Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


dynamic list
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Thu Jul 09, 2009 12:07 pm    Post subject: dynamic list Reply with quote

i wanna make a dynamic list like CE's address list. the user can add entries one by one and delete them. the implementation of the 'list' will be a linked list which i need to code.

i was wondering how CE does it.. for its GUI

edit : i think it's a listbox.. gotta figure out how to use it

awesome figured it out. but how does CE make it so there's multiple 'fields' for each row ?

edit : fck that i was wasting my time. it's list-view i want, not listbox

oh wow gay.. just realised dialog units aren't the same as pixels and the column width needs to be given in pixels. OMG GAYYYYYY

okay i actually have a question now. if i want to split the listview into 2 columns then i need to add each column with LVM_INSERTCOUMN where a width is specified. let's say the control's entire width is 150 DLU. now i tried converting 100 DLU and 50 DLU to pixels and then creating those columns with the converted lengths but it always ends up a tiny bit too big so then it generates a lame little horizontal scroll at the bottom of the control. i then tried converting 100 DLU and 150 DLU then creating a column with index 0 of width 'converted 100 DLU' and the colum with index 1 of width 'converted 150 DLU - converted 100 DLU' but the same thing happens and i get the horizontal bar. any ideas anyone ?!
Back to top
View user's profile Send private message
BanMe
Master Cheater
Reputation: 0

Joined: 29 Nov 2005
Posts: 375
Location: Farmington NH, USA

PostPosted: Thu Jul 09, 2009 6:52 pm    Post subject: Reply with quote

Ive accomplished something similar to this But in a "Native" way using the HandleTable functions which are "forbidden" cause they are *screams* "undocumented" but what i got works so far Wink

http://www.woodmann.com/forum/showthread.php?t=12819

This is the link to that specific posting which contains the code and comments about how I did it and why I did things "differently".. sorry I couldn't further answer your question, But I tried to provide a valid similar solution Wink(albeit with minor modifications and coding on your part) and if this isn't interesting to you, then i suggest looking at how DB did it in his source code.. Smile

regards BanMe

_________________
don't +rep me..i do not wish to have "status" or "recognition" from you or anyone.. thank you.
Back to top
View user's profile Send private message MSN Messenger
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Fri Jul 10, 2009 6:06 pm    Post subject: Reply with quote

hey thanks for that but i really, really hate using undocumented functions.. i keep thinking back to it and it's like an itch that won't go away till i change it LOL

i guess i will have to root around in CE source sometime..

btw in case what i said was unclear to anyone, here is what i mean :



see how under the list view there is a gay little horizontal scrollbar..
Back to top
View user's profile Send private message
tombana
Master Cheater
Reputation: 2

Joined: 14 Jun 2007
Posts: 456
Location: The Netherlands

PostPosted: Sat Jul 11, 2009 2:39 am    Post subject: Reply with quote

Remember that the dialog size (and size of controls in the dialog) depends on the font size you are using for the dialog.
Back to top
View user's profile Send private message
DoomsDay
Grandmaster Cheater
Reputation: 0

Joined: 06 Jan 2007
Posts: 768
Location: %HomePath%

PostPosted: Sat Jul 11, 2009 4:50 am    Post subject: Reply with quote

If my memory serves me right there shoud be an example of how to use a listview in the masm32 examples.
Back to top
View user's profile Send private message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Sat Jul 11, 2009 5:51 am    Post subject: Reply with quote

i'm okay with using listview for the time being, just trying to get rid of that horizontal bar..

it seems to disappear when i include a manifest during building o_O



top example is with manifest included of course.
Back to top
View user's profile Send private message
DoomsDay
Grandmaster Cheater
Reputation: 0

Joined: 06 Jan 2007
Posts: 768
Location: %HomePath%

PostPosted: Sat Jul 11, 2009 10:30 am    Post subject: Reply with quote

It also depends on the frame then.
Back to top
View user's profile Send private message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Sat Jul 11, 2009 4:42 pm    Post subject: Reply with quote

DoomsDay wrote:
It also depends on the frame then.

what frame o_O
Back to top
View user's profile Send private message
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Sat Jul 11, 2009 4:59 pm    Post subject: Reply with quote

How about allocating a block of memory around 1024 Bytes, than write the addresses there?
Back to top
View user's profile Send private message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Sat Jul 11, 2009 5:29 pm    Post subject: Reply with quote

wat
Back to top
View user's profile Send private message
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Sat Jul 11, 2009 11:51 pm    Post subject: Reply with quote

My asm sucks...

Code:

dwAddr dd ?

push 0
push 512 ;How big you want it
push MEM_COMMIT
push PAGE_EXECUTE_READWRITE
call VirtualAlloc
mov [dwAddr], eax


When you want the address you could do...
Code:

mov eax, dword ptr ds:[addrIndex]
xor ebx, ebx

@@:
cmp ebx, 512
jge @f
mov ecx,[dwAddr+4]
add ebx, 4
jmp @b

@@:
test ecx, ecx
jnz Win
;lose

Neutral


Edit:
Oh, you guys are talking about something else, nvm. Feel free to criticize my shiz.
Back to top
View user's profile Send private message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Sun Jul 12, 2009 5:41 am    Post subject: Reply with quote

i would criticize but i have no clue what you're even trying to do and i have no clue why you thought we were trying to do anything even vaguely related to addresses

Code:
@@:
cmp ebx, 512
jge @f
mov ecx,[dwAddr+4]
add ebx, 4
jmp @b

@@:
test ecx, ecx
jnz Win


since dwAddr does not change in that first loop at all there is no point in having that so you could move it down to have :

Code:
@@:
mov ecx, dword ptr ds:[dwAddr+4]
test ecx, ecx
jnz Win


in which case you could just do :

Code:
@@:
cmp dword ptr ds:[dwAddr+4], 0
jnz Win


so now the top part of your loop is like this :

Code:
@@:
cmp ebx, 512
jge @f
add ebx, 4
jmp @b


which you can convert to be less inefficient..

Code:
sub ebx, 4

@@:

add ebx, 4 ; not sure if lea ebx, [ebx+4] is faster
cmp ebx, 512 ; could be converted to a test i think ?!
jl @b


so..

Code:
mov eax, dword ptr ds:[addrIndex]
xor ebx, ebx

@@:
cmp ebx, 512
jge @f
mov ecx,[dwAddr+4]
add ebx, 4
jmp @b

@@:
test ecx, ecx
jnz Win
;lose


can be converted to..

Code:
mov ebx, -4

@@:
add ebx, 4 ; not sure if lea ebx, [ebx+4] is faster
cmp ebx, 512 ; could be converted to a test i think ?!
jl @b
cmp dword ptr ds:[dwAddr+4], 0
jnz Win


your first line of code also does nothing useful since eax is never used in the loop

actually what the hell are you even doing with the ebx. in my loop it's more 'clear'. you're doing nothing but counting up LOL. wowwwww you're pro ; )

in fact after 'optimizing' your code we can all see that you can't code and were in fact talking out of your ass ^_^

good game
Back to top
View user's profile Send private message
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Sun Jul 12, 2009 10:09 am    Post subject: Reply with quote

Ohhhh, ok. I can still see you're still an immature out of place faggot who's trying to prove he's worth something in the world, but really, he's not worth shit.

inb4spencer

You'd probably show this to spencer, because you couldn't have an argument with me without inviting someone else.
Back to top
View user's profile Send private message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Sun Jul 12, 2009 11:04 am    Post subject: Reply with quote

what... you posted some obsolete and useless code. i pointed it out and even kindly gave you an optimized version regardless of its functionality as a learning exercise to you and you throw it back in my face by attacking me ?

what are you void, a rabid dog ?
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Sun Jul 12, 2009 3:37 pm    Post subject: Reply with quote

can you chodes ever not get into a stupid argument about anything?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites