hey,

sum of u'll may remember that a couple months back i said i wanted to make my own resource editor, well with whatever time i've had ive been working on it, here is the menu-creation part

http://coder.web1000.com/menuTree.zip

for sum reason it doesnt work on my win98 comp, but works fine on my other comp that has win98 second edition

the zip file includes instructions on how to use it...dont worry abt the edit boxes for now, those will hold the constant name and number

thanks
Posted on 2003-07-25 20:23:05 by AnotherWay83
well doesnt work on mine(XP) but from my debug of it seems USER32.DialogBoxParamA returns for some reason and the program exits. without the source i cant help you .
Posted on 2003-07-25 21:40:53 by Qages
why does a resrouce editor using hooks.. now that does not make since to me..
Posted on 2003-07-25 21:46:46 by devilsclaw
Generally, without source it's impossible to tell but from what Qages says it sounds like you have one of two problems:

1 common controls not properly initialized for the control you are using
2 a custom window class has a bad parameter and is not being created
Posted on 2003-07-25 21:49:02 by donkey
well i switched to compatibility mode to win 2000 on xp and the program loads up and i can add items in... but the preview does not show anything.
Posted on 2003-07-25 21:50:29 by devilsclaw
it would've made sense if u had experienced the problem i had =)

i had to trap the enter and escape keydowns, and subclassing the edit control just wasnt working, i dont know why, thats why i had to use the hook...besides, the performance hit is minimal, since all it really does is forward the keydown to the edit control procedure, and it gets unhooked as soon as editing of the item is complete

btw, i will post the code shortly, i dont know why its not working with win98, that sux, this program will be open source anyway

oh and yeah, the preview thing hasnt been implemented yet, and those 2 edit boxes there are also dead (no code implemented for them, that is), for now dont worry abt those please =)
Posted on 2003-07-25 21:51:04 by AnotherWay83
Does not work on 2k. After call to DialogBoxParam, the return value is -1 and the error code ERROR_CANNOT_FIND_WND_CLASS (0000057F).

Just as I had expected... You used SysTreeView32 without initising it. You need to call InitCommonControls to ensure that the common control dll is loaded.
Posted on 2003-07-25 21:55:46 by roticv
ok here is the whole package...whatever work i have done on it so far...i havent made any changes to it

include in it u will find -

matrix GUI - the main gui, the thing that will popup when the user starts the program...its really tiny, it mite get lost if u dont look carefully =) it works fine even on my win98 comp

menu creator - the reason this thread was created, i've included the source, it works on my win98 se comp. but not on my win98 comp, i will try what roticv said, thanks

feedback much appreciated :)

http://coder.web1000.com/matrix.zip
Posted on 2003-07-25 22:05:13 by AnotherWay83
it works on XP under windows 2000 compat mode when you right click on the exe and go to the compat tab and enable compat and select win 2000... which to me makes no since why it works.
Posted on 2003-07-25 23:02:39 by devilsclaw
i have done some debuging and it loops twice then on the third loop it dies... runing it in real mode...
Posted on 2003-07-25 23:04:01 by devilsclaw
arright the problem has been fixed...i just had to call InitCommonControls, as roticv suggested, thanks :grin:

please check it out at http://coder.web1000.com/matrix.zip

thanks!

btw, what tool did u guys use to trace the calls the exe was making?

and i just d/led hutch's masm32 v7 package...and i couldn't find the value TVM_ENDEDITLABELNOW in the windows.inc file...
Posted on 2003-07-26 02:07:37 by AnotherWay83
Hi.
Unfortunatelly I can't download it from your site, because I have "SurfControl" on my workplace computer. Can you simply attach the file in the forum?

Regards.
Posted on 2003-07-26 02:14:51 by JohnFound
hope this works
Posted on 2003-07-26 02:23:14 by AnotherWay83
Yes, the download works, but unfortunately the program did not work at all. It runs but I can't create any menu (even small ;) )
My computer: Win95 OSR 2 Pentium II 400MHz

Regards. John Found
Posted on 2003-07-26 02:32:54 by JohnFound
hmm...i really dont know how to fix that, i can only really test it on my own win98 and win98 se comps...:(
Posted on 2003-07-26 02:47:33 by AnotherWay83
OK, actually my fault. But it's not obviously, that I must use popup menu to add items. :)

The tree is OK. The Buttons did not works. But I don't know is it normal or not.
Posted on 2003-07-26 03:25:46 by JohnFound
there is MASM32 V8 out now and the new windows.inc that has that info is at. http://masmforum.com/viewforum.php?f=18&sid=ca82580379d67a3ced96e0cc0af9805c
Posted on 2003-07-26 12:02:05 by devilsclaw