Windows Me and Windows XP.
This commit is contained in:
@@ -17,7 +17,7 @@ struct getlin_data {
|
|||||||
size_t result_size;
|
size_t result_size;
|
||||||
};
|
};
|
||||||
|
|
||||||
LRESULT CALLBACK GetlinDlgProc(HWND, UINT, WPARAM, LPARAM);
|
BOOL CALLBACK GetlinDlgProc(HWND, UINT, WPARAM, LPARAM);
|
||||||
|
|
||||||
int mswin_getlin_window (
|
int mswin_getlin_window (
|
||||||
const char *question,
|
const char *question,
|
||||||
@@ -47,7 +47,7 @@ int mswin_getlin_window (
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
LRESULT CALLBACK GetlinDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
BOOL CALLBACK GetlinDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
struct getlin_data* data;
|
struct getlin_data* data;
|
||||||
RECT main_rt, dlg_rt;
|
RECT main_rt, dlg_rt;
|
||||||
@@ -117,7 +117,7 @@ struct extcmd_data {
|
|||||||
int* selection;
|
int* selection;
|
||||||
};
|
};
|
||||||
|
|
||||||
LRESULT CALLBACK ExtCmdDlgProc(HWND, UINT, WPARAM, LPARAM);
|
BOOL CALLBACK ExtCmdDlgProc(HWND, UINT, WPARAM, LPARAM);
|
||||||
|
|
||||||
int mswin_ext_cmd_window (int* selection)
|
int mswin_ext_cmd_window (int* selection)
|
||||||
{
|
{
|
||||||
@@ -141,7 +141,7 @@ int mswin_ext_cmd_window (int* selection)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
LRESULT CALLBACK ExtCmdDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
BOOL CALLBACK ExtCmdDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
struct extcmd_data* data;
|
struct extcmd_data* data;
|
||||||
RECT main_rt, dlg_rt;
|
RECT main_rt, dlg_rt;
|
||||||
@@ -231,7 +231,7 @@ struct plsel_data {
|
|||||||
int* selection;
|
int* selection;
|
||||||
};
|
};
|
||||||
|
|
||||||
LRESULT CALLBACK PlayerSelectorDlgProc(HWND, UINT, WPARAM, LPARAM);
|
BOOL CALLBACK PlayerSelectorDlgProc(HWND, UINT, WPARAM, LPARAM);
|
||||||
static void plselInitDialog(HWND hWnd);
|
static void plselInitDialog(HWND hWnd);
|
||||||
static void plselAdjustLists(HWND hWnd, int changed_opt);
|
static void plselAdjustLists(HWND hWnd, int changed_opt);
|
||||||
static int plselFinalSelection(HWND hWnd, int* selection);
|
static int plselFinalSelection(HWND hWnd, int* selection);
|
||||||
@@ -258,7 +258,7 @@ int mswin_player_selection_window ( int* selection )
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
LRESULT CALLBACK PlayerSelectorDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
BOOL CALLBACK PlayerSelectorDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
struct plsel_data* data;
|
struct plsel_data* data;
|
||||||
RECT main_rt, dlg_rt;
|
RECT main_rt, dlg_rt;
|
||||||
|
|||||||
@@ -48,11 +48,11 @@ extern short glyph2tile[];
|
|||||||
|
|
||||||
#define NHMENU_IS_SELECTABLE(item) ((item).identifier.a_obj!=NULL)
|
#define NHMENU_IS_SELECTABLE(item) ((item).identifier.a_obj!=NULL)
|
||||||
|
|
||||||
LRESULT CALLBACK MenuWndProc(HWND, UINT, WPARAM, LPARAM);
|
BOOL CALLBACK MenuWndProc(HWND, UINT, WPARAM, LPARAM);
|
||||||
static void onMSNHCommand(HWND hWnd, WPARAM wParam, LPARAM lParam);
|
static void onMSNHCommand(HWND hWnd, WPARAM wParam, LPARAM lParam);
|
||||||
static LRESULT onMeasureItem(HWND hWnd, WPARAM wParam, LPARAM lParam);
|
static BOOL onMeasureItem(HWND hWnd, WPARAM wParam, LPARAM lParam);
|
||||||
static LRESULT onDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam);
|
static BOOL onDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam);
|
||||||
static LRESULT onListChar(HWND hWnd, HWND hwndList, WORD ch);
|
static BOOL onListChar(HWND hWnd, HWND hwndList, WORD ch);
|
||||||
static void LayoutMenu(HWND hwnd);
|
static void LayoutMenu(HWND hwnd);
|
||||||
static void SetMenuType(HWND hwnd, int type);
|
static void SetMenuType(HWND hwnd, int type);
|
||||||
static void SetMenuListType(HWND hwnd, int now);
|
static void SetMenuListType(HWND hwnd, int now);
|
||||||
@@ -210,7 +210,7 @@ int mswin_menu_window_select_menu (HWND hWnd, int how, MENU_ITEM_P ** _selected)
|
|||||||
return ret_val;
|
return ret_val;
|
||||||
}
|
}
|
||||||
|
|
||||||
LRESULT CALLBACK MenuWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
BOOL CALLBACK MenuWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
PNHMenuWindow data;
|
PNHMenuWindow data;
|
||||||
int nItem;
|
int nItem;
|
||||||
@@ -550,7 +550,7 @@ HWND GetMenuControl(HWND hWnd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
LRESULT onMeasureItem(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
BOOL onMeasureItem(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
LPMEASUREITEMSTRUCT lpmis;
|
LPMEASUREITEMSTRUCT lpmis;
|
||||||
TEXTMETRIC tm;
|
TEXTMETRIC tm;
|
||||||
@@ -578,7 +578,7 @@ LRESULT onMeasureItem(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
LRESULT onDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
BOOL onDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
LPDRAWITEMSTRUCT lpdis;
|
LPDRAWITEMSTRUCT lpdis;
|
||||||
PNHMenuItem item;
|
PNHMenuItem item;
|
||||||
@@ -688,7 +688,7 @@ LRESULT onDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
LRESULT onListChar(HWND hWnd, HWND hwndList, WORD ch)
|
BOOL onListChar(HWND hWnd, HWND hwndList, WORD ch)
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
PNHMenuWindow data;
|
PNHMenuWindow data;
|
||||||
|
|||||||
@@ -7,11 +7,13 @@
|
|||||||
#include "mhmsg.h"
|
#include "mhmsg.h"
|
||||||
#include "mhfont.h"
|
#include "mhfont.h"
|
||||||
|
|
||||||
|
PNHWinApp GetNHApp(void);
|
||||||
|
|
||||||
typedef struct mswin_nethack_text_window {
|
typedef struct mswin_nethack_text_window {
|
||||||
TCHAR* window_text;
|
TCHAR* window_text;
|
||||||
} NHTextWindow, *PNHTextWindow;
|
} NHTextWindow, *PNHTextWindow;
|
||||||
|
|
||||||
LRESULT CALLBACK TextWndProc(HWND, UINT, WPARAM, LPARAM);
|
BOOL CALLBACK TextWndProc(HWND, UINT, WPARAM, LPARAM);
|
||||||
static void onMSNHCommand(HWND hWnd, WPARAM wParam, LPARAM lParam);
|
static void onMSNHCommand(HWND hWnd, WPARAM wParam, LPARAM lParam);
|
||||||
static void LayoutText(HWND hwnd);
|
static void LayoutText(HWND hwnd);
|
||||||
|
|
||||||
@@ -71,7 +73,7 @@ void mswin_display_text_window (HWND hWnd)
|
|||||||
GetNHApp()->hMenuWnd = NULL;
|
GetNHApp()->hMenuWnd = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
LRESULT CALLBACK TextWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
BOOL CALLBACK TextWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
HWND control;
|
HWND control;
|
||||||
HDC hdc;
|
HDC hdc;
|
||||||
|
|||||||
@@ -16,13 +16,16 @@
|
|||||||
#define SHARED_DCL extern
|
#define SHARED_DCL extern
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
SHARED_DCL char orgdir[PATHLEN]; /* also used in pcsys.c, amidos.c */
|
|
||||||
|
|
||||||
extern void FDECL(nethack_exit,(int));
|
extern void FDECL(nethack_exit,(int));
|
||||||
|
|
||||||
// Global Variables:
|
// Global Variables:
|
||||||
NHWinApp _nethack_app;
|
NHWinApp _nethack_app;
|
||||||
|
|
||||||
|
#ifdef __BORLANDC__
|
||||||
|
#define _stricmp(s1,s2) stricmp(s1,s2)
|
||||||
|
#define _strdup(s1) strdup(s1)
|
||||||
|
#endif
|
||||||
|
|
||||||
// Foward declarations of functions included in this code module:
|
// Foward declarations of functions included in this code module:
|
||||||
BOOL InitInstance(HINSTANCE, int);
|
BOOL InitInstance(HINSTANCE, int);
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
//Microsoft Developer Studio generated resource script.
|
//Microsoft Developer Studio generated resource script.
|
||||||
//
|
//
|
||||||
|
#if defined(__BORLANDC__)
|
||||||
|
LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_US
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
|
|
||||||
#define APSTUDIO_READONLY_SYMBOLS
|
#define APSTUDIO_READONLY_SYMBOLS
|
||||||
|
|||||||
Reference in New Issue
Block a user