From 26f70ab37bee8ffd70b662ff999613c643215605 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Thu, 14 Jul 2022 02:34:42 +0200 Subject: Initialize global variables in the right place. The rules for what messages are sent at window creation -- and in which order -- are neither intuitive or clear. WM_CREATE can NOT be relied upon to initialize global state required by handlers of other messages (such as WM_GETMINMAXINFO, which seems to be sent before WM_CREATE). Thus, the better solution is to initialize everything using a CBT hook before the window procedure is even run. Because CBTProc creates (child): windows of its own, though, one must be careful to only run the initialization once, which is done by checking g_hWnd. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 99b5f28..704c14d 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ PL = pl/cfg.pl pl/episode_data.pl pl/local_episodes.pl pl/track_episodes.pl OBJ = $(B)common.obj $(B)datalistview.obj $(B)episodelistview.obj $(B)listview.obj $(B)pl.obj $(B)resource.obj CC = swipl-ld -CFLAGS += -O -ld-options,-mwindows +CFLAGS += -Wall -Wpedantic -O -ld-options,-mwindows CFLAGS += -DUNICODE -D_UNICODE LDFLAGS += -lcomctl32 -luxtheme -- cgit v1.2.3