Greetings! :)

I want to to a simple program to exercise my recently learned skills. All it does is to send a randomly selected message (wich algo. will be extracted from other posts) to the user, from time to time. This program doesn't have a window.

My doubts:
-how a program without a window of its own would be controled? The only alternative he user has is to terminate it from windows' task managers?? Is this a such good idea then?

-the raw code algo for the time checking for sending new message is:



label: GetLocalTime ;API
;returns current time

CompareWithLastTimeChecked
;check

IfTimeOut then SendRandomMessage
;S.E.

GoTo label
;infinite loop


Posted on 2002-09-16 18:53:36 by wicr0s0ft
You can setup a hotkey so that users could close your app.
Posted on 2002-09-16 19:26:15 by Will
My solution was to acknowledge Microsoft had a good thing going.

Setup a normal single document interface window, but no one ever said you had to show it, so don't. Then program the WndProc with the message filters you want.

This solved a message callback from a socket for me. To e-mail a error report via a winsock SMTP code to the e-mail server without the client having a normal e-mail program installed. Processed in the background of the client machine.

Enjoy your work, P1
Posted on 2002-09-17 08:27:56 by Pone
if you use a windows timer you don't have to create a window for this...
just setup a timer with hwnd=0 and create the typical messageloop.

it would look like this:



INVOKE SetTimer,0,0,10000,0

_START: INVOKE GetMessage,ADDR msg, NULL, 0, 0
CMP EAX, WM_TIMER
JNZ _START

;every 10 seconds you're HERE...

JMP _START
Posted on 2002-09-17 08:40:15 by mob
Thanks for the ideas and suggestions! :)

I'llprobably start coding it this week, and if everything goes smoothly, I'll publish it here for whoever is interested.

I only have few doubts now on how do we tell Windows how much resources (processor in this case) we want to use in our tasks.
Posted on 2002-09-17 18:56:41 by wicr0s0ft