synch with widget/nsWindow.cpp rev 3.272. code by roc+moz@cs.cmu.edu

This commit is contained in:
danm%netscape.com 2000-04-27 00:25:54 +00:00
Родитель 35b481f220
Коммит 139cc240d5
1 изменённых файлов: 5 добавлений и 2 удалений

Просмотреть файл

@ -105,6 +105,7 @@ nsresult nsTextWidget::QueryInterface(const nsIID& aIID, void** aInstancePtr)
// -----------------------------------------------------------------------
void nsTextWidget::SubclassWindow(BOOL bState)
{
if (NULL != mWnd) {
NS_PRECONDITION(::IsWindow(mWnd), "Invalid window handle");
if (bState) {
@ -113,12 +114,14 @@ void nsTextWidget::SubclassWindow(BOOL bState)
(LONG)nsTextWidget::TextWindowProc);
NS_ASSERTION(mPrevWndProc, "Null standard window procedure");
// connect the this pointer to the nsWindow handle
::SetWindowLong(mWnd, GWL_USERDATA, (LONG)this);
SetNSWindowPtr(mWnd, this);
}
else {
(void) ::SetWindowLong(mWnd, GWL_WNDPROC, (LONG)mPrevWndProc);
SetNSWindowPtr(mWnd, NULL);
mPrevWndProc = NULL;
}
}
}
//-------------------------------------------------------------------------
@ -295,7 +298,7 @@ NS_METHOD nsTextWidget::Paint(nsIRenderingContext& aRenderingContext,
aRenderingContext.DrawString(mText, x, y);
} else {
nsString astricks;
PRInt32 i;
PRUint32 i;
for (i=0;i<mText.Length();i++) {
astricks.AppendWithConversion("*");
}