Kaydet (Commit) 803bff58 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

-Werror,-Wint-to-pointer-cast

Appart from the by-design type-punned use in CreateWindowEx, m_uID is (only)
used in a call to MAKEWPARAM (to create a WPARAM to pass into a SendMessage
call), so the most realistic type to use seems to be WORD.  And
CHatchWindow::Init is only called with a value of 2000 (from docholder.cxx),
anyway.

Change-Id: I4b6554d1ca9bb3926378c9e25a5473609f5951c5
üst 2195299a
...@@ -186,7 +186,7 @@ CHatchWin::~CHatchWin() ...@@ -186,7 +186,7 @@ CHatchWin::~CHatchWin()
* *
* Parameters: * Parameters:
* hWndParent HWND of the parent of this window * hWndParent HWND of the parent of this window
* uID UINT identifier for this window (send in * uID WORD identifier for this window (send in
* notifications to associate window). * notifications to associate window).
* hWndAssoc HWND of the initial associate. * hWndAssoc HWND of the initial associate.
* *
...@@ -194,14 +194,14 @@ CHatchWin::~CHatchWin() ...@@ -194,14 +194,14 @@ CHatchWin::~CHatchWin()
* BOOL TRUE if the function succeeded, FALSE otherwise. * BOOL TRUE if the function succeeded, FALSE otherwise.
*/ */
BOOL CHatchWin::Init(HWND hWndParent, UINT uID, HWND hWndAssoc) BOOL CHatchWin::Init(HWND hWndParent, WORD uID, HWND hWndAssoc)
{ {
m_hWndParent = hWndParent; m_hWndParent = hWndParent;
m_hWnd=CreateWindowEx( m_hWnd=CreateWindowEx(
WS_EX_NOPARENTNOTIFY, SZCLASSHATCHWIN WS_EX_NOPARENTNOTIFY, SZCLASSHATCHWIN
, SZCLASSHATCHWIN, WS_CHILD | WS_CLIPSIBLINGS , SZCLASSHATCHWIN, WS_CHILD | WS_CLIPSIBLINGS
| WS_CLIPCHILDREN, 0, 0, 100, 100, hWndParent, (HMENU)uID | WS_CLIPCHILDREN, 0, 0, 100, 100, hWndParent
, m_hInst, this); , reinterpret_cast<HMENU>(UINT_PTR(uID)), m_hInst, this);
m_uID=uID; m_uID=uID;
m_hWndAssociate=hWndAssoc; m_hWndAssociate=hWndAssoc;
......
...@@ -146,7 +146,7 @@ protected: ...@@ -146,7 +146,7 @@ protected:
int m_dBorder; int m_dBorder;
int m_dBorderOrg; int m_dBorderOrg;
UINT m_uID; WORD m_uID;
HWND m_hWndParent; HWND m_hWndParent;
HWND m_hWndKid; HWND m_hWndKid;
HWND m_hWndAssociate; HWND m_hWndAssociate;
...@@ -157,7 +157,7 @@ protected: ...@@ -157,7 +157,7 @@ protected:
CHatchWin(HINSTANCE,const DocumentHolder*); CHatchWin(HINSTANCE,const DocumentHolder*);
~CHatchWin(); ~CHatchWin();
BOOL Init(HWND, UINT, HWND); BOOL Init(HWND, WORD, HWND);
HWND HwndAssociateSet(HWND); HWND HwndAssociateSet(HWND);
HWND HwndAssociateGet(); HWND HwndAssociateGet();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment