flat assembler
Message board for the users of flat assembler.

Index > Windows > Console and GUI app in 1

Author
Thread Post new topic Reply to topic
Chewy509



Joined: 19 Jun 2003
Posts: 297
Location: Bris-vegas, Australia
Chewy509 28 Jun 2006, 05:54
Hi Guys,

I'm having a few problems with Windows, well what I'm coding should be working but isn't. (test9.b0 compiles into test9.asm).

Basically the second string isn't printing... Any clues on why? (Real newbie Windows question). Do I have to clean up the stack or does the called proc do that for me (sorry I generally code for other platforms). I've tried both (no cleanup and cleanup), without any success?

Also since Windows is GUI centric, and my application is a console based one, is it possible to use GUI components from an application that has been assembled as a console application? What I'm thinking is, that if a user doesn't specify any command line arguments then display a MessageBox with the help, rather than printing the help to the console. (In case a user double clicks on the application assuming it's a GUI application).

PS. Target is WinXP x64


Description: B0 Source Code
Download
Filename: test9_b0.asm
Filesize: 1.52 KB
Downloaded: 251 Time(s)

Description: FASM source from b0 compiler
Download
Filename: test9.asm
Filesize: 4.58 KB
Downloaded: 266 Time(s)

Post 28 Jun 2006, 05:54
View user's profile Send private message Visit poster's website Reply with quote
0x4e71



Joined: 25 Feb 2004
Posts: 50
0x4e71 29 Jun 2006, 22:17
Quote:
hat I'm thinking is, that if a user doesn't specify any command line arguments then display a MessageBox with the help, rather than printing the help to the console. (In case a user double clicks on the application assuming it's a GUI application).

Absolutely, no problem at all. You can use any GUI function you can think of Smile. (the console vs gui app is just a mark in the exe header to tell windows whether it should open a console and associate it to the process)

Can't test your code as I don't have x64, yet Confused

Cheers,
/L
Post 29 Jun 2006, 22:17
View user's profile Send private message Reply with quote
Chewy509



Joined: 19 Jun 2003
Posts: 297
Location: Bris-vegas, Australia
Chewy509 30 Jun 2006, 01:33
0x4e71 wrote:
Quote:
What I'm thinking is, that if a user doesn't specify any command line arguments then display a MessageBox with the help, rather than printing the help to the console. (In case a user double clicks on the application assuming it's a GUI application).

Absolutely, no problem at all. You can use any GUI function you can think of Smile. (the console vs gui app is just a mark in the exe header to tell windows whether it should open a console and associate it to the process)

Thanks, good to know.
Post 30 Jun 2006, 01:33
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
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


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.