13.07.2015 Views

REFERENCE GUIDE

REFERENCE GUIDE

REFERENCE GUIDE

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

SetDlgltemTextSets the caption or text of an item to astring.Uses for dialogboxesModeless dialog boxModal dialog boxFor convenience and to keep from introducing device-dependentvalues into the application code, applications use dialog boxesinstead of creating their own windows. This device independenceis maintained by using logical coordinates in the dialog-boxtemplate. Dialog boxes are convenient to use because all aspectsof the dialog box, except how to carry out its tasks, arepredefined. Dialog boxes supply a window class and procedure,and create the window for the dialog box automatically. Theapplication supplies a dialog function to carry out tasks and adialog-box template that describes the dialog style and content.A modeless dialog box allows the user to supply information tothe dialog box and return to the previous task without cancelingor removing the dialog box. Modeless dialog boxes are typicallyused as a way to let the user continually supply information aboutthe current task without having to select a command from a menueach time. For example, modeless dialog boxes are often usedwith a text-search command in word-processing applications. Thedialog box remains displayed while the search is carried out. Theuser can then return to the dialog box and search for the sameword again, or change the entry in the dialog box and search for anew word.An application with a modeless dialog box processes messages forthat box by using the IsDialogMessage function inside the mainmessage loop.The dialog function of a modeless dialog box must send amessage to the parent window when it has input for the parentwindow. It must also destroy the dialog box when it is no longerneeded. A modeless dialog box can be destroyed by using theDestroyWindow function. An application must not call theEnd Dialog function to destroy a modeless dialog box.A modal dialog box requires the user to respond to a requestbefore the application continues. Typically, a modal dialog box isused when a chosen command needs additional informationbefore it can proceed. The user should not be able to continueChapter 1, Window manager interface functions 59

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!