#DEFINE GS_MSGBOX_CENTER 1 #DEFINE GS_MSGBOX_KILLTIMER 2 #DEFINE GS_MSGBOX_CENTER_TEXT 4 #DEFINE GS_MSGBOX_CHECKBOX 8 #DEFINE GS_MSGBOX_RIGHT_BUTTONS 16 #DEFINE GS_MSGBOX_SET_POS 32 lcCrLf = CHR(13) + CHR(10) PUBLIC oMb AS MessageBoxX OF MbxClass.prg oMb = NEWOBJECT("MessageBoxX", "MbxClass.fxp") oMb.nType = 4+16 oMb.cText = "Message Text Message Text Message " + lcCrLf + "Text Message Text " oMb.cCaption = "Window Title" oMb.cCheckboxText = "Click me!" oMb.nCheckBoxValue = 1 *oMb.nTimeout = 5 ? oMb.Show(), oMb.nCheckBoxValue RETURN ... * MbxClass.prg #DEFINE GS_MSGBOX_CENTER 1 #DEFINE GS_MSGBOX_KILLTIMER 2 #DEFINE GS_MSGBOX_CENTER_TEXT 4 #DEFINE GS_MSGBOX_CHECKBOX 8 #DEFINE GS_MSGBOX_RIGHT_BUTTONS 16 #DEFINE GS_MSGBOX_SET_POS 32 DEFINE CLASS MessageBoxX AS Custom oHeap = Null * Center Message Box in The Parent Window (hWnd property) lCentered = .F. * Center Message Box text for multi-line message lCenteredText = .F. * Right aligned buttons lRightButtons = .F. * Timeout nTimeout = 0 * Check box text cCheckboxText = "" * Check box value - 0 or 1 nCheckboxValue = 0 * Checkbox positio X and Y. Cannot be used with lCentered nXpos = 0 nYpos = 0 hWnd = 0 cText = "" cCaption = "" nType = 0 nFlags = 0 PROCEDURE Show LOCAL lnCheckBoxText, lnChekboxValue, lnResult, lcMsgBoxOpt DO CASE CASE This.lCentered This.nFlags = BITOR(This.nFlags, GS_MSGBOX_CENTER) CASE This.nXpos > 0 OR This.nYpos > 0 This.nFlags = BITOR(This.nFlags, GS_MSGBOX_SET_POS) ENDCASE IF This.lRightButtons This.nFlags = BITOR(This.nFlags, GS_MSGBOX_RIGHT_BUTTONS) ENDIF IF This.lCenteredText This.nFlags = BITOR(This.nFlags, GS_MSGBOX_CENTER_TEXT) ENDIF IF This.nTimeout > 0 This.nFlags = BITOR(This.nFlags, GS_MSGBOX_KILLTIMER) ENDIF IF NOT EMPTY(This.cCheckboxText) This.nFlags = BITOR(This.nFlags, GS_MSGBOX_CHECKBOX) ENDIF IF BITAND(This.nFlags, GS_MSGBOX_CHECKBOX) > 0 lnCheckBoxText = This.oHeap.AllocString(This.cCheckboxText) lnChekboxValue = This.oHeap.AllocBlob(NumToLong(This.nCheckboxValue)) ELSE lnCheckBoxText = 0 lnChekboxValue = 0 ENDIF lcMsgBoxOpt = NumToLong(28) + ; NumToLong(This.nFlags) + ; NumToLong(This.nTimeout) + ; NumToLong(lnCheckBoxText) + ; NumToLong(lnChekboxValue) + ; NumToLong(This.nXpos) + ; NumToLong(This.nYpos) lnResult = GSMessageBox(This.hWnd, ; This.cText, This.cCaption, This.nType, lcMsgBoxOpt) IF BITAND(This.nFlags, GS_MSGBOX_CHECKBOX) > 0 This.nCheckboxValue = LongToNum(This.oHeap.CopyFrom(lnChekboxValue )) This.oHeap.Dealloc(lnChekboxValue) This.oHeap.Dealloc(lnCheckBoxText) ENDIF RETURN lnResult ENDPROC PROCEDURE INIT DECLARE Long GSMessageBox IN GSMessageBox.dll ; Long hWnd, String lpText, String lpCaption, ; Long uType, STRING @ lpMsgBoxOpt SET PROCEDURE TO clsHeap ADDITIVE This.oHeap = NEWOBJECT("heap", "clsheap.fxp") ENDPROC PROCEDURE Destroy This.oHeap = Null ENDPROC ENDDEFINE>Hi,