hi, i did search this but havent found anything:(

i have "app.exe" which is small dos file, running from ms-dos prompt.
you write as:
app.exe var1 var2 var3

and it returns:
yourVar1= "var1"
yourVar2= "var2"
yourVar3= "var3"
followed by a list of 7 strings generated from the input variables.

what i would like to do is make a gui/shell for this app..
with editbox for i/p and o/p of variables/strings

how is this possible?
which api, and how to give/receive the values?

Posted on 2003-07-27 08:54:39 by wilson
Create a dialog box, with 3 single-line Edit controls, 1 multiline Edit control, and 1 button.
when the button gets pressed (on WM_COMMAND) , get the values from the first three Edit controls, using "GetWindowText()". Process the data, as you processed it before in the dos app. Then use SetWindowText() with the handle to the multiline Edit control , to return the processed data. When the user wants to exit, he presses the x button on the top-right corner, and the message WM_CLOSE gets generated, on which you exit the app with ExitProcess(0).
Posted on 2003-07-27 11:12:03 by Ultrano
Here ya go, pal :grin:
I made the app you need. See attachment
Posted on 2003-07-27 11:45:40 by Ultrano
hi, thanks mate but its not really what i need :(
the dos app performs calulations on the input variables and returns 7 new strings based on those.
i cant reverse the algo in the original app so i hoped to just make a shell for it..

appreciate your effort:alright:
Posted on 2003-07-27 11:54:55 by wilson
I gave you only the skeleton of an app. You have to code it further so that you achieve your exact goal, mate ;) . If you give me the code of the DOS app, I'll gladly make the whole app
Posted on 2003-07-27 12:40:28 by Ultrano
i can make that ;)
but to run the dos file from command prompt, with values passed from asm form, then have the calculated values put back in the asm app- is where i am stuck :)
with vb, you can do shell "c:\dosapp.exe"..

anyway i uploaded the app here, hope you can see what i mean.
thanks man!
Posted on 2003-07-27 13:45:58 by wilson
ah :) I understand now (finally). I'm working on the problem....
Posted on 2003-07-27 13:52:44 by Ultrano
10x thanks:grin:
Posted on 2003-07-27 14:10:09 by wilson
I'm ready . Enjoy :alright:
Posted on 2003-07-27 14:47:39 by Ultrano
man, top work!
best i could ever hope for, working example for me to study :)

i had guessed it was possible when first reading icezelions "process" chapter last night, but didnt see how to get the returned values in to an edit box..

many thanks,
Posted on 2003-07-27 17:54:02 by wilson
attached is my finished work for today, i rewrite the whole this as i prefer to use window instead of dialog box..
at the moment, thats all i understand (thanks icezelion- not sarcastic) :)
thanks for the idea to use "pipes"
Posted on 2003-07-28 16:33:55 by wilson
It crashes on load on Win XP home edition sp1.

I could give you the debugger dump if needed.
Posted on 2003-07-28 17:37:07 by RobotBob
yea someone else just told me that (win 2k..)
can you upload please?
any ideas why? like common causes in win98 code not running on xp?

Posted on 2003-07-28 17:40:55 by wilson
My debugger says the error is external, the result of an improper parameter to an api.
I could hunt this down for you.
I dont need the source, for this however.

Gimme a few :)
Posted on 2003-07-28 17:47:14 by RobotBob
thanks mate :)

just checked myself, maybe its the handle to menu (or lack of..)
Posted on 2003-07-28 17:52:35 by wilson
Its (you'll never believe this) the parameters being passed to LoadIcon.

I altered this code (ehem :) ) and it loaded fine.
I could be wrong, it may also be a stack problem in that area since I see, alot of locals.

either way your problem is in that block lol.

Posted on 2003-07-28 18:05:54 by RobotBob
oops, i had
invoke loadicon,lpicon,IDC_APPLICATION :rolleyes:
can you try this please..
Posted on 2003-07-28 18:13:02 by wilson
Different problem this time.
You are passing as the second argument the resource ID of the icon right?
I edited it to push the resource ID and it worked fine.

Oh I just saw what is happening! you are passing a pointer to "iconid" string and not
the ID number. It should be loadicon,hinstance,1001 ; if 1001 is the resource id of your icon.
The menu isnt displaying either and I suspect its the same problem.

Posted on 2003-07-28 18:21:14 by RobotBob
hmm ok i see the hInstance push now, but the pointers are to the name as defined in the resource file. id's are put in there so i thought this should work?
i changed offset to menuname to addr as a last ditch for today (its 20 to 1 morning here, i started this at 10am yesterday lolz)

appreciate the feedback, thanks:alright:
Posted on 2003-07-28 18:34:25 by wilson
BINGO! it works perfect. Sleep now :)
Posted on 2003-07-28 18:38:59 by RobotBob