NS_IMETHODIMP nsListBox::Create(nsIWidget *aParent, const nsRect &aRect, EVENT_CALLBACK aHandleEventFunction, nsIDeviceContext *aContext, nsIAppShell *aAppShell, nsIToolkit *aToolkit, nsWidgetInitData *aInitData) { Handle resH = ::NewHandleClear(sizeof(ldesRsrc)); if (resH) { ldesRsrc** ldesH = (ldesRsrc**)resH; (*ldesH)->cols = 1; (*ldesH)->vertScroll = 1; short resID = mValue = 2222; ::AddResource(resH, 'ldes', resID, "\p"); }  nsresult res = Inherited::Create(aParent, aRect, aHandleEventFunction, aContext, aAppShell, aToolkit, aInitData); if (resH) { ::RemoveResource(resH); ::DisposeHandle(resH); }  if (res == NS_OK) { Size actualSize; ::GetControlData(mControl, kControlNoPart, kControlListBoxListHandleTag, sizeof(ListHandle), (Ptr)&mListHandle, &actualSize); if (mListHandle) { SetMultipleSelection(mMultiSelect); ::SetControlMinimum(mControl, 0); ::SetControlMaximum(mControl, 0); ::SetControlValue(mControl, 0); ::LSetDrawingMode(mVisible, mListHandle); } else res = NS_ERROR_FAILURE; }  return res; }
BASE_IWIDGET_IMPL
NS_IMETHODIMP nsListBox::Create(nsIWidget *aParent,                      const nsRect &aRect,                      EVENT_CALLBACK aHandleEventFunction,                      nsIDeviceContext *aContext,                      nsIAppShell *aAppShell,                      nsIToolkit *aToolkit,                      nsWidgetInitData *aInitData) {	Handle resH = ::NewHandleClear(sizeof(ldesRsrc));	if (resH)	{		ldesRsrc** ldesH = (ldesRsrc**)resH;		(*ldesH)->cols = 1;		(*ldesH)->vertScroll = 1;		short resID = mValue = 2222;		::AddResource(resH, 'ldes', resID, "\p");	}	nsresult res = Inherited::Create(aParent, aRect, aHandleEventFunction,						aContext, aAppShell, aToolkit, aInitData);	if (resH)	{		::RemoveResource(resH);		::DisposeHandle(resH);	}  	if (res == NS_OK)  	{		Size actualSize;		::GetControlData(mControl, kControlNoPart, kControlListBoxListHandleTag, sizeof(ListHandle), (Ptr)&mListHandle, &actualSize);		if (mListHandle)		{			SetMultipleSelection(mMultiSelect);			::SetControlMinimum(mControl, 0);			::SetControlMaximum(mControl, 0);			::SetControlValue(mControl, 0);			::LSetDrawingMode(mVisible, mListHandle);		}		else  			res = NS_ERROR_FAILURE;  	}	return res;}