flat assembler
Message board for the users of flat assembler.

Index > Projects and Ideas > Alarm - System tray clock / reminder [DONE]

Goto page Previous  1, 2
Author
Thread Post new topic Reply to topic
OzzY



Joined: 19 Sep 2003
Posts: 1029
Location: Everywhere
OzzY 20 Apr 2007, 20:35
This is a very big and complete project.
I wonder how you don't get lost your own source code.
What IDE are you using?
Post 20 Apr 2007, 20:35
View user's profile Send private message Reply with quote
hidden



Joined: 14 Feb 2007
Posts: 49
hidden 21 Apr 2007, 03:03
You don't use main window, that's the problem.
You wouldn't need to hide dialog's window after it opens(call DialogBoxParam only when you have to show it and then just close it instead of hiding) and you would easily find out if you program is already running and then activate it.
Piece of an example:
Code:
  start:
        xor     ebx, ebx

        invoke  FindWindow, _class, ebx
        test    eax, eax
        jnz     .activate_window

        invoke  GetModuleHandle, ebx
        mov     [wc.hInstance], eax
        invoke  LoadIcon, eax, 21
        mov     [wc.hIcon], eax
        mov     [wc.lpfnWndProc], WindowProc
        mov     [wc.lpszClassName], _class
        invoke  RegisterClass, wc
        test    eax, eax
        jz      .error

        invoke  CreateWindowEx, ebx, _class, ebx, ebx, ebx, ebx, ebx, ebx, ebx, ebx, [wc.hInstance], ebx
        test    eax, eax
        jz      .error
        mov     [hWnd], eax

  .msg_loop:
        invoke  GetMessage, msg, ebx, ebx, ebx
        cmp     eax, 1
        jb      exit
        jne     .msg_loop
        invoke  TranslateMessage, msg
        invoke  DispatchMessage, msg
        jmp     .msg_loop

  .activate_window:
        invoke  SendMessage, eax, WM_SHELLNOTIFY, IDI_TRAY, WM_LBUTTONDBLCLK
        jmp     exit

  .error:
        invoke  MessageBox, NULL, _error, NULL, MB_ICONERROR + MB_OK

  exit:
        invoke  ExitProcess, [msg.wParam]

proc WindowProc uses ebx esi edi, hwnd, wmsg, wparam, lparam
        cmp     [wmsg], WM_DESTROY
        je      .wmdestroy
        cmp     [wmsg], WM_SHELLNOTIFY
        je      .wmshellnotify
  .defwndproc:
        invoke  DefWindowProc, [hwnd], [wmsg], [wparam], [lparam]
        jmp     .finish
  .wmshellnotify:
        ;...
        jmp     .finish_ok
  .wmdestroy:
        invoke  PostQuitMessage, 0
  .finish_ok:
        xor     eax, eax
  .finish:
        ret
endp    

It needs try button for "sound choosing", double(and maybe right) click in list box and using system defined fonts and colors.
And there is something strange with selection(one click) and deselection(double click).

_________________
Image Lang: (eng|рус)
Post 21 Apr 2007, 03:03
View user's profile Send private message Reply with quote
ATV



Joined: 31 Aug 2004
Posts: 109
Location: Finland
ATV 23 Apr 2007, 07:11
hidden, I was trying to add rightclick to open CreatePopupMenu on listbox, but I could not get it to work, thats why it uses add/edit button and double click to unselect. There was some other problem too, but I don't remember what it was. Creating hidden main window, that may be good idea, I have to try that, but it's big and painful job change almost everything in main dialog (current ListBox is filled when loading ini file). Testing sound is good idea too.

OzzY, It has been totally written with fasmw, only first "one alarm" version in 1995 was written with Visual Basic 3.0, really, but it was so terrible that I have to write everything from start. I don't have "full picture" anymore it's just too big for me. I just add one routine at time (look version history), then it just grows.
BTW, is your C source availabe after your project is finished. It would be nice to see different view from same kind of program.

pierre, I have not try to kill explorer before, but my program was not only one that disappear, there was some system stuff also missing.

Wow so many new ideas, I need lots of time to test them all.
Post 23 Apr 2007, 07:11
View user's profile Send private message Reply with quote
ATV



Joined: 31 Aug 2004
Posts: 109
Location: Finland
ATV 09 May 2007, 07:17
I have been testing hidden main window, but it gives new strange errors that I have to solve first.

So I update old dialog version (in first post) to test sound effect and handler for explorer kill.
Post 09 May 2007, 07:17
View user's profile Send private message Reply with quote
ATV



Joined: 31 Aug 2004
Posts: 109
Location: Finland
ATV 27 Jul 2007, 07:08
Above attachment updated

New features in v0.11
- added write2log button
- alarm message with MB_TOPMOST
- choose listbox colors
- day of week
- tabstops in ownerdrawn listbox
Post 27 Jul 2007, 07:08
View user's profile Send private message Reply with quote
ATV



Joined: 31 Aug 2004
Posts: 109
Location: Finland
ATV 27 Aug 2007, 07:15
Above attachment updated

New features in v0.12
- FindWindow
- show same day alarms in edit dialog
- confirm when delete alarm
- few bugs fixed

I think it has everything what I need. So this is last update, ..... until more bugs found.
Post 27 Aug 2007, 07:15
View user's profile Send private message Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo 29 Aug 2007, 00:19
ATV wrote:

I think it has everything what I need. So this is last update, ..... until more bugs found.


Same ol' song and dance! Laughing
Post 29 Aug 2007, 00:19
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4335
Location: Now
edfed 10 Mar 2008, 01:32
definitively adopted.
to put in important threads list
thanks ATV, with this, i can wake up with my favourite musics and simulate presence at home, to avoid stealers to come. Very Happy
Post 10 Mar 2008, 01:32
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:  
Goto page Previous  1, 2

< 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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.