Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide to Clip-4-Win version 3.0 - Norton Guide http://www.X-Hacker.org [^^Up^^] [Menu] [About The Guide]
 WDialog                Dialog window class
 ----------------------------------------------------------------------------
 WDialog
 Dialog window class
 ----------------------------------------------------------------------------
 
 Properties
 cnId_aDlg      The dialog's resource id or dynamic dialog data
 HelpText       Assigns help text to the parent's HelpText property
 hInst          The instance of the application or dll containing the resource
 Result         Holds the result after the dialog terminates
 Valid          A logical indicating whether the dialog's state is valid
 Visible        A logical indicating whether the dialog is visible
 WndProc        A code block to handle messages (WM_*) for the dialog
 WndStyle       The control's usual style (a combination of WS_* values)
 
 Methods
 WDialog:Add()         Add a control to those handled by the dialog
 WDialog:AddWindow()   For internal use.
 WDialog:Cancel()      Undo changes made, where possible, and dismiss the dialog
 WDialog:Create()      Create a dialog
 WDialog:DefaultMessage()   Default handler for messages
 WDialog:DelWindow()   For internal use.
 WDialog:EndDialog()   Terminate a dialog
 WDialog:HandleMessage() Handle/dispatch messages
 WDialog:Init()         Construct a dialog object
 WDialog:KeepingFocus() A logical indicating whether a control is keeping the focus
 WDialog:Move()        Re-position and/or change size of a dialog
 WDialog:MsgBox()      Convenient MessageBox() wrapper
 WDialog:Ok()          Confirm any changes made and try to close the dialog
 WDialog:OnChar()      Handles keyboard characters
 WDialog:OnClose()     Handles requests to close the dialog
 WDialog:OnCommand()   Handles menu, toolbar & accelerator messages
 WDialog:OnCreate()    Handles window creation messages
 WDialog:OnCtlColor()  Handles colour selection for controls
 WDialog:OnDestroy()   Pre-destruction of a dialog
 WDialog:OnDrawItem()  Requests to draw an owner-draw item
 WDialog:OnDropFiles() Drag and drop file messages
 WDialog:OnGetDlgCode() Identify the characteristics of a control
 WDialog:OnHScroll()   Horizontal scroll bar messages
 WDialog:OnInitDialog() Dialog initialisation message
 WDialog:OnKeyDown()   Keyboard key press messages
 WDialog:OnKillFocus() Input focus lost messages
 WDialog:OnLDblClick() Mouse left button double-click
 WDialog:OnLBtnDown()  Mouse left button click
 WDialog:OnLBtnUp()    Mouse left button release
 WDialog:OnMenuSelect() Selection (highlighting) of a menu item
 WDialog:OnMouseMove() Notification of mouse movement
 WDialog:OnNCDestroy() Post-destruction of a dialog
 WDialog:OnPaint()     Request to draw a dialog
 WDialog:OnQueryEndSession()     Windows shut-down request
 WDialog:OnRBtnDown()  Mouse right button click
 WDialog:OnRBtnUp()    Mouse right button release
 WDialog:OnSetFocus()  Input focus gained message
 WDialog:OnSize()      Size of dialog set/changed
 WDialog:OnSysCommand() A System command request
 WDialog:OnTimer()     Timer message
 WDialog:OnVBXFireEvent()   Handle an event from a VBX control
 WDialog:OnVScroll()   Vertical scroll bar message
 WDialog:Paint()       Draw/re-draw a dialog
 WDialog:PreInitDialog()    Do pre-initialisation just before the main
 WDialog:dialog initialisation
 WDialog:SeriousError()     Handle a serious error
 WDialog:SetFocus()    Recommend a position for the input focus
 WDialog:WantFocus()   A logical indicating whether a control wants the input focus
 WDialog:Warning()     Output a warning sound and/or message
 
 Inherits From
 WWindowBase
 
 Inherited By
 WDBrowse
 WProgressDialog
 WToolbarDialog
 WVBXDialog
 
 Description
 This class is suitable for simple dialogs (without menu,
 toolbar, status bar, etc.), which are not controls.  For more
 complex dialogs, see WFrameWindow and its sub-classes.  For
 controls, see WControlWindow and its sub-classes.
 
 Many of the methods are simply "stubs" which return NIL, to
 allow them to be easily defined in a sub-class.
 
 Example
 // From SOURCE\OO\CLASSES\PROGBAR.PRG:
 CLASS WProgressDialog INHERIT WDialog
      PROTECT oPBar      AS OBJECT // AS WProgressBar
 // . . .
      PROTECT lCancelled AS LOGIC   // .t. if user has asked to cancel
 // . . .
      METHOD Cancel()                                   ;
      INLINE ; // You might like to use super:Cancel()
             ::lCancelled := .t., 1
      MESSAGE Init(oParent, cnId_aDlg, lCreate) METHOD InitDlg()
 
      ACCESS Max                    INLINE ::oPBar:Max
      ASSIGN Max(n)                 INLINE ::oPBar:Max
 // . . .
 ENDCLASS
 
 
 METHOD InitDlg(oParent, cnId_aDlg, lCreate) CLASS WProgressDialog
 default lCreate to .t.
 
 super:Init(oParent, /*cTitle,*/ cnId_aDlg, .f., .f.)
 
 ::lCancelled = .f.
 
 if cnId_aDlg == nil
 
      INIT DIALOG self                             ;
           Title ""  Style ::WndStyle  At 20,20  Size 120,55
 
      /*
       *  Id -1 is often used when you don't care what the Id is
       *  (typically for static text).
       */
      @ Id -1  Blackframe  At 8,8  Size 104,19
 
      @ Id IDD_BAR  Obj ::oPBar  ProgressBar  At 10,10  Size 100,15
 
      if ::lBtn
           @ Id IDCANCEL  Button Cancel  Title ::cBtn  At 40,35 Size 40,12
      endif
 
      cnId_aDlg = ::cnId_aDlg
 else
      @ Id IDD_BAR  Obj ::oPBar  ProgressBar
 
      if ::lBtn
           @ Id IDCANCEL  Button Cancel
      endif
 endif
 
 if lCreate
      ::Create(cnId_aDlg)
 endif
 
 return self
 
 See Also  (press Enter)

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson