fixed icon and added version number
This commit is contained in:
+6
-3
@@ -7,13 +7,12 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
#include <wctype.h>
|
#include <wctype.h>
|
||||||
|
#include "resource.h"
|
||||||
|
|
||||||
#ifndef swprintf_s
|
#ifndef swprintf_s
|
||||||
int swprintf_s(wchar_t *buffer, size_t sizeOfBuffer, const wchar_t *format, ...);
|
int swprintf_s(wchar_t *buffer, size_t sizeOfBuffer, const wchar_t *format, ...);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define IDI_APP 101
|
|
||||||
|
|
||||||
#define IDM_FILE_NEW 1001
|
#define IDM_FILE_NEW 1001
|
||||||
#define IDM_FILE_OPEN 1002
|
#define IDM_FILE_OPEN 1002
|
||||||
#define IDM_FILE_SAVE 1003
|
#define IDM_FILE_SAVE 1003
|
||||||
@@ -36,6 +35,8 @@ int swprintf_s(wchar_t *buffer, size_t sizeOfBuffer, const wchar_t *format, ...)
|
|||||||
|
|
||||||
#define IDM_HELP_ABOUT 4001
|
#define IDM_HELP_ABOUT 4001
|
||||||
|
|
||||||
|
static const WCHAR APP_VERSION[] = L"1.1.0";
|
||||||
|
|
||||||
static HWND g_hEdit = NULL;
|
static HWND g_hEdit = NULL;
|
||||||
static HFONT g_hFont = NULL;
|
static HFONT g_hFont = NULL;
|
||||||
static HMENU g_hMenu = NULL;
|
static HMENU g_hMenu = NULL;
|
||||||
@@ -834,7 +835,9 @@ static void ChooseFontAndApply(HWND hwnd)
|
|||||||
|
|
||||||
static void ShowAbout(HWND hwnd)
|
static void ShowAbout(HWND hwnd)
|
||||||
{
|
{
|
||||||
MessageBoxW(hwnd, L"ClassicNotepad\nBuilt with Win32 API in C.\ngithub.com/acidburnmonkey/ClassicNotepad", L"About", MB_OK | MB_ICONINFORMATION);
|
WCHAR message[256];
|
||||||
|
swprintf_s(message, ARRAYSIZE(message), L"ClassicNotepad v%s\nBuilt with Win32 API in C.\ngithub.com/acidburnmonkey/ClassicNotepad", APP_VERSION);
|
||||||
|
MessageBoxW(hwnd, message, L"About", MB_OK | MB_ICONINFORMATION);
|
||||||
}
|
}
|
||||||
|
|
||||||
static LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
static LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
#include "resource.h"
|
||||||
|
|
||||||
IDI_APP ICON "app.ico"
|
IDI_APP ICON "app.ico"
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
#ifndef CLASSICNOTEPAD_RESOURCE_H
|
||||||
|
#define CLASSICNOTEPAD_RESOURCE_H
|
||||||
|
|
||||||
|
#define IDI_APP 101
|
||||||
|
|
||||||
|
#endif
|
||||||
Reference in New Issue
Block a user