[prev in list] [next in list] [prev in thread] [next in thread]
List: hugs-cvs
Subject: Re: Offer to help with WinHugs
From: Neil Mitchell <ndmitchell () gmail ! com>
Date: 2005-05-20 14:42:05
Message-ID: 404396ef0505200742167f5a76 () mail ! gmail ! com
[Download RAW message or body]
Hi,
An additional patch to the Windows version to change from using a
customised status line implementation, to using the standard windows
one. After this patch is merged, Winstln.{c,h} can be removed as they
are no long required.
I would like to do this to some of the other parts of WinHugs,
particularly the toolbar and tooltip/hint windows. By using the
standard Windows versions, it makes WinHugs smaller, less code, and it
can use the standard versions which are styled differently on
different platforms - i.e. to take advantage of the new XP style
interface.
This code will not work on Win3.1, but will work with Win95 and beyond.
Thanks
Neil
["winghugs_statusbar.patch" (application/octet-stream)]
Index: src/prelude.h
===================================================================
RCS file: /cvs/hugs98/src/prelude.h,v
retrieving revision 1.73
diff -u -r1.73 prelude.h
--- src/prelude.h 28 Mar 2005 00:13:23 -0000 1.73
+++ src/prelude.h 20 May 2005 14:21:41 -0000
@@ -200,6 +200,7 @@
#if HUGS_FOR_WINDOWS
#include <windows.h> /* Misc. Windows hackery */
+#include <commctrl.h>
#if __MSDOS__
# define INT int
Index: src/winhugs/Winframe.c
===================================================================
RCS file: /cvs/hugs98/src/winhugs/Winframe.c,v
retrieving revision 1.6
diff -u -r1.6 Winframe.c
--- src/winhugs/Winframe.c 27 Nov 2003 02:11:34 -0000 1.6
+++ src/winhugs/Winframe.c 20 May 2005 14:30:55 -0000
@@ -62,9 +61,6 @@
/* Register tool bar class */
TBRegisterClass(hInstance);
- /* Register status line class */
- STLNRegisterClass(hInstance);
-
/* Register frame window class */
wc.style = CS_VREDRAW | CS_HREDRAW;
wc.lpfnWndProc = FRAMEWndProc;
@@ -165,7 +161,7 @@
hFRAME->hWndChild = hWndChild;
/* Create its status line */
- hFRAME->hWndSTLN = STLNCreateWindow(hInstance, hWnd, ResizeBitmapName);
+ hFRAME->hWndSTLN = CreateStatusWindow(WS_CHILD | WS_VISIBLE, "", hWnd, 0);
if (!hFRAME->hWndSTLN)
return NULL;
Index: src/winhugs/winhugs.c
===================================================================
RCS file: /cvs/hugs98/src/winhugs/winhugs.c,v
retrieving revision 1.23
diff -u -r1.23 winhugs.c
--- src/winhugs/winhugs.c 30 Nov 2003 15:36:10 -0000 1.23
+++ src/winhugs/winhugs.c 20 May 2005 14:33:34 -0000
@@ -14,6 +14,7 @@
#define STRICT 1
#include <windows.h>
+#include <commctrl.h>
#include <shellapi.h>
#include <commdlg.h>
#include <time.h>
@@ -37,7 +38,6 @@
#include "WinFrame.h"
#include "WinToolB.h"
-#include "WinSTLN.h"
#include "WinUtils.h"
/* --------------------------------------------------------------------------
@@ -861,6 +861,8 @@
INT APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, INT nCmdShow)
{
INT i;
+
+ InitCommonControls();
/* Save application instance */
hThisInstance = hInstance;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic