diff --git a/lcl/include/customnotebook.inc b/lcl/include/customnotebook.inc index fa9c0a88d8..ac859b1ca5 100644 --- a/lcl/include/customnotebook.inc +++ b/lcl/include/customnotebook.inc @@ -851,7 +851,7 @@ begin (csDestroyingHandle in ControlState) then begin OldPageIndex := FPageIndex; - FPageIndex := NMHDR^.idfrom; + FPageIndex := PtrInt(NMHDR^.idfrom); if FPageIndex >= PageCount then FPageIndex := -1; //debugln(['TCustomNotebook.CNNotify ',DbgSName(Self),' A Old=',OldPageIndex,' fPageIndex=',fPageIndex,' FLoadedPageIndex=',FLoadedPageIndex]); diff --git a/lcl/interfaces/qt/qtwidgets.pas b/lcl/interfaces/qt/qtwidgets.pas index 3f7717e2ac..75641c1edd 100644 --- a/lcl/interfaces/qt/qtwidgets.pas +++ b/lcl/interfaces/qt/qtwidgets.pas @@ -6304,7 +6304,7 @@ begin Hdr.hwndFrom := LCLObject.Handle; Hdr.Code := TCN_SELCHANGE; - Hdr.idFrom := TQtTabWidget(LCLObject.Handle).GetLCLPageIndex(Index); + Hdr.idFrom := PtrUInt(TQtTabWidget(LCLObject.Handle).GetLCLPageIndex(Index)); Msg.NMHdr := @Hdr; Msg.Result := 0; DeliverMessage(Msg);