win32_gui: gettting x64 build to work
This commit is contained in:
+9
-9
@@ -19,7 +19,7 @@ static WNDPROC editControlWndProc = 0;
|
||||
#define DEFAULT_COLOR_BG_TEXT COLOR_WINDOW
|
||||
#define DEFAULT_COLOR_FG_TEXT COLOR_WINDOWTEXT
|
||||
|
||||
BOOL CALLBACK NHTextWndProc(HWND, UINT, WPARAM, LPARAM);
|
||||
INT_PTR CALLBACK NHTextWndProc(HWND, UINT, WPARAM, LPARAM);
|
||||
LRESULT CALLBACK NHEditHookWndProc(HWND, UINT, WPARAM, LPARAM);
|
||||
static void onMSNHCommand(HWND hWnd, WPARAM wParam, LPARAM lParam);
|
||||
static void LayoutText(HWND hwnd);
|
||||
@@ -64,7 +64,7 @@ HWND mswin_init_text_window () {
|
||||
data = (PNHTextWindow)malloc(sizeof(NHTextWindow));
|
||||
if( !data ) panic("out of memory");
|
||||
ZeroMemory(data, sizeof(NHTextWindow));
|
||||
SetWindowLong(ret, GWL_USERDATA, (LONG)data);
|
||||
SetWindowLongPtr(ret, GWLP_USERDATA, (LONG_PTR)data);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ void mswin_display_text_window (HWND hWnd)
|
||||
{
|
||||
PNHTextWindow data;
|
||||
|
||||
data = (PNHTextWindow)GetWindowLong(hWnd, GWL_USERDATA);
|
||||
data = (PNHTextWindow)GetWindowLongPtr(hWnd, GWLP_USERDATA);
|
||||
if( data && data->window_text ) {
|
||||
HWND control;
|
||||
control = GetDlgItem(hWnd, IDC_TEXT_CONTROL);
|
||||
@@ -84,14 +84,14 @@ void mswin_display_text_window (HWND hWnd)
|
||||
mswin_popup_destroy(hWnd);
|
||||
}
|
||||
|
||||
BOOL CALLBACK NHTextWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
INT_PTR CALLBACK NHTextWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
HWND control;
|
||||
HDC hdc;
|
||||
PNHTextWindow data;
|
||||
TCHAR title[MAX_LOADSTRING];
|
||||
|
||||
data = (PNHTextWindow)GetWindowLong(hWnd, GWL_USERDATA);
|
||||
data = (PNHTextWindow)GetWindowLongPtr(hWnd, GWLP_USERDATA);
|
||||
switch (message)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
@@ -106,8 +106,8 @@ BOOL CALLBACK NHTextWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPara
|
||||
ReleaseDC(control, hdc);
|
||||
|
||||
/* subclass edit control */
|
||||
editControlWndProc = (WNDPROC)GetWindowLong(control, GWL_WNDPROC);
|
||||
SetWindowLong(control, GWL_WNDPROC, (LONG)NHEditHookWndProc);
|
||||
editControlWndProc = (WNDPROC)GetWindowLongPtr(control, GWLP_WNDPROC);
|
||||
SetWindowLongPtr(control, GWLP_WNDPROC, (LONG_PTR)NHEditHookWndProc);
|
||||
|
||||
SetFocus(control);
|
||||
|
||||
@@ -180,7 +180,7 @@ BOOL CALLBACK NHTextWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPara
|
||||
if( data ) {
|
||||
if( data->window_text ) free(data->window_text);
|
||||
free(data);
|
||||
SetWindowLong(hWnd, GWL_USERDATA, (LONG)0);
|
||||
SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR)0);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -192,7 +192,7 @@ void onMSNHCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
PNHTextWindow data;
|
||||
|
||||
data = (PNHTextWindow)GetWindowLong(hWnd, GWL_USERDATA);
|
||||
data = (PNHTextWindow)GetWindowLongPtr(hWnd, GWLP_USERDATA);
|
||||
switch( wParam ) {
|
||||
case MSNH_MSG_PUTSTR: {
|
||||
PMSNHMsgPutstr msg_data = (PMSNHMsgPutstr)lParam;
|
||||
|
||||
Reference in New Issue
Block a user