Roll back the win/win32 tree to the way it was before x64 attempt
This commit is contained in:
+9
-9
@@ -106,7 +106,7 @@ void mswin_map_stretch(HWND hWnd, LPSIZE lpsz, BOOL redraw)
|
||||
wnd_size.cy = client_rt.bottom - client_rt.top;
|
||||
|
||||
/* set new screen tile size */
|
||||
data = (PNHMapWindow)GetWindowLongPtr(hWnd, GWLP_USERDATA);
|
||||
data = (PNHMapWindow)GetWindowLong(hWnd, GWL_USERDATA);
|
||||
data->xScrTile =
|
||||
max(1, (data->bFitToScreenMode? wnd_size.cx : lpsz->cx) / COLNO);
|
||||
data->yScrTile =
|
||||
@@ -200,7 +200,7 @@ int mswin_map_mode(HWND hWnd, int mode)
|
||||
int oldMode;
|
||||
SIZE mapSize;
|
||||
|
||||
data = (PNHMapWindow)GetWindowLongPtr(hWnd, GWLP_USERDATA);
|
||||
data = (PNHMapWindow)GetWindowLong(hWnd, GWL_USERDATA);
|
||||
if( mode == data->mapMode ) return mode;
|
||||
|
||||
oldMode = data->mapMode;
|
||||
@@ -333,7 +333,7 @@ LRESULT CALLBACK MapWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPara
|
||||
{
|
||||
PNHMapWindow data;
|
||||
|
||||
data = (PNHMapWindow)GetWindowLongPtr(hWnd, GWLP_USERDATA);
|
||||
data = (PNHMapWindow)GetWindowLong(hWnd, GWL_USERDATA);
|
||||
switch (message)
|
||||
{
|
||||
case WM_CREATE:
|
||||
@@ -412,7 +412,7 @@ LRESULT CALLBACK MapWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPara
|
||||
case WM_DESTROY:
|
||||
if( data->hMapFont ) DeleteObject(data->hMapFont);
|
||||
free(data);
|
||||
SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG)0);
|
||||
SetWindowLong(hWnd, GWL_USERDATA, (LONG)0);
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -427,7 +427,7 @@ void onMSNHCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||
PNHMapWindow data;
|
||||
RECT rt;
|
||||
|
||||
data = (PNHMapWindow)GetWindowLongPtr(hWnd, GWLP_USERDATA);
|
||||
data = (PNHMapWindow)GetWindowLong(hWnd, GWL_USERDATA);
|
||||
switch(wParam) {
|
||||
case MSNH_MSG_PRINT_GLYPH:
|
||||
{
|
||||
@@ -575,7 +575,7 @@ void onCreate(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||
data->xScrTile = GetNHApp()->mapTile_X;
|
||||
data->yScrTile = GetNHApp()->mapTile_Y;
|
||||
|
||||
SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG)data);
|
||||
SetWindowLong(hWnd, GWL_USERDATA, (LONG)data);
|
||||
}
|
||||
|
||||
/* on WM_PAINT */
|
||||
@@ -590,7 +590,7 @@ void onPaint(HWND hWnd)
|
||||
int i, j;
|
||||
|
||||
/* get window data */
|
||||
data = (PNHMapWindow)GetWindowLongPtr(hWnd, GWLP_USERDATA);
|
||||
data = (PNHMapWindow)GetWindowLong(hWnd, GWL_USERDATA);
|
||||
|
||||
hDC = BeginPaint(hWnd, &ps);
|
||||
|
||||
@@ -750,7 +750,7 @@ void onMSNH_VScroll(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||
int yDelta;
|
||||
|
||||
/* get window data */
|
||||
data = (PNHMapWindow)GetWindowLongPtr(hWnd, GWLP_USERDATA);
|
||||
data = (PNHMapWindow)GetWindowLong(hWnd, GWL_USERDATA);
|
||||
|
||||
switch(LOWORD (wParam))
|
||||
{
|
||||
@@ -808,7 +808,7 @@ void onMSNH_HScroll(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||
int xDelta;
|
||||
|
||||
/* get window data */
|
||||
data = (PNHMapWindow)GetWindowLongPtr(hWnd, GWLP_USERDATA);
|
||||
data = (PNHMapWindow)GetWindowLong(hWnd, GWL_USERDATA);
|
||||
|
||||
switch(LOWORD (wParam))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user