diff --git a/.gitignore b/.gitignore index faea445..7e5ece8 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ # Built Visual Studio Code Extensions *.vsix *.obj +*.res diff --git a/.vscode/tasks.json b/.vscode/tasks.json index cbffe87..b8d22bb 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -27,7 +27,7 @@ } } }, - { + { "label": "compile-resources", "type": "shell", "command": "rc.exe", @@ -35,12 +35,10 @@ "res/rsrc.rc" ], "problemMatcher": [], - "group": { - "kind": "build", - "isDefault": true - }, - "dependsOn": [ - "assemble"] + "group": "build", + "dependsOn": [ + "assemble" + ] }, { "label": "link", @@ -64,7 +62,10 @@ "label": "execute", "type": "shell", "command": "${workspaceFolder}/${fileBasenameNoExtension}.exe", - "group": "build", + "group": { + "kind": "build", + "isDefault": true + }, "dependsOn": "link", "problemMatcher": [] } diff --git a/Puer.exe b/Puer.exe index 483f65d..58852d2 100644 Binary files a/Puer.exe and b/Puer.exe differ diff --git a/include/template.inc b/include/template.inc index 81a4b5f..d1c4a8a 100644 --- a/include/template.inc +++ b/include/template.inc @@ -6,6 +6,8 @@ WinMain proto :HINSTANCE,:HINSTANCE,:LPSTR,:QWORD myPaint proto :HWND ;Обработка сообщения WM_PAINT myDraw proto nSegment:DWORD ;принимаю параметр с колличеством сегментов (в HIWORD) и номером данного сегмента (в LOWORD) + +WM_SHELLNOTIFY equ WM_USER+5 ;_______________________________________________________ .data? hInstance HINSTANCE ? ; Хэндл нашей пpогpаммы @@ -14,11 +16,11 @@ hIcon dq ? ; icon handle NOTIFYICONDATAW STRUCT cbSize DWORD ? - hwnd DWORD ? + hwnd QWORD ? uID DWORD ? uFlags DWORD ? uCallbackMessage DWORD ? - hIcon DWORD ? + hIcon QWORD ? szTip WORD 64 dup (?) WORD 64 dup (?) dwState DWORD ? @@ -31,7 +33,7 @@ NOTIFYICONDATAW STRUCT szInfoTitle WORD 64 dup(?) dwInfoFlags DWORD ? guidItem GUID <> - hBalloonIcon DWORD ? + hBalloonIcon QWORD ? NOTIFYICONDATAW ENDS BITMAPINFOHEADER STRUCT @@ -57,14 +59,12 @@ BITMAPINFO STRUCT bmiHeader BITMAPINFOHEADER <> bmiColors RGBQUAD <> BITMAPINFO ENDS - -note NOTIFYICONDATAW <> hPopupMenu dq ? ;_______________________________________________________ .data szClassName db "CocaClass",0 ; Имя нашего класса окна -AppName db "Cocaine - no sleeping on the job!",0 ; Имя нашего окна +AppName db "Pu'er tea: no sleeping on the job!",0 ; Имя нашего окна ELAPSE_UPDTIMER EQU 20 IDT_UPDTIMER EQU 111 wc WNDCLASSEX @@ -72,7 +72,7 @@ bmi BITMAPINFO <> rc RECT <> RestoreString db "&Restore",0 ExitString db "E&xit Program",0 - +note NOTIFYICONDATAW <> IDI_TRAY equ 0 IDM_RESTORE equ 1000 diff --git a/res/rsrc.rc b/res/rsrc.rc index 054f192..8d0b35d 100644 --- a/res/rsrc.rc +++ b/res/rsrc.rc @@ -21,7 +21,7 @@ BEGIN BLOCK "041904B0" BEGIN VALUE "CompanyName", "Friends of Svetopaper\000" - VALUE "FileDescription", "Pu'er tea executable file\000" + VALUE "FileDescription", "Pu'er tea: no sleeping on the job!\000" VALUE "FileVersion", "1.0\000" VALUE "InternalName", "Pu'er tea\000" VALUE "OriginalFilename", "Puer.exe\000" diff --git a/res/rsrc.res b/res/rsrc.res index bad3ced..f1f9c81 100644 Binary files a/res/rsrc.res and b/res/rsrc.res differ