Skip to content


DSkinlite Tip of the Day #3:MessageBox

image

DSkinLite V3.2 supports MessagBox, you can call the API dsMessageBox to show a message box skinned by dskinlite. The  parameters of dsMessageBox function are same as  the parameters  of windows API MessageBox , and users can directly replace the MessageBox in existing application with  dsMessageBox.

Tag <messagebox> in XML.

    First, you need to configure  messagebox information in the XML document. As following table:

   1:  <messagebox>
   2:      <font id="default" />
   3:      <button width="70" height="30" checkboxHeight=""/>
   4:      <space leftSpace="0" topSpace="20" buttonSpace="20" 
   5:      verticalSpace="20" iconSpace="0" />
   6:      <dialogstyle id="dialog" />    
   7:  <ico>
   8:      <information file="#messagebox.info" />
   9:      <error file="#messagebox.error" />
  10:      <question file="#messagebox.question" />
  11:      <warning file="#messagebox.warning" />
  12:  </ico>
  13:  <lang>
  14:      <Abort value="Abort"></Abort>
  15:      <Cancel value="Cancel"></Cancel>
  16:      <Continue value="Continue"></Continue>
  17:      <DoNotAskAgain value="Do not ask again!"></DoNotAskAgain>
  18:      <!--Not implement in current version-->
  19:      <DoNotTellAgain value="Do not tell again!"></DoNotTellAgain>
  20:      <!--Not implement in current version-->
  21:      <DoNotShowAgain value="Do not show again!"></DoNotShowAgain>
  22:      <!--Not implement in current version-->
  23:      <Help value="Help"></Help>
  24:      <Ignore value="Ignore"></Ignore>
  25:      <IgnoreAll value="Ignore All"></IgnoreAll>
  26:      <No value="No"></No>
  27:      <NoToAll value="No to All"></NoToAll>
  28:      <Ok value="OK"></Ok>
  29:      <Report value="Report"></Report>
  30:      <Retry value="Retry"></Retry>
  31:      <Skip value="Skip"></Skip>
  32:      <SkipAll value="Skip All"></SkipAll>
  33:      <TryAgain value="Try Again"></TryAgain>
  34:      <Yes value="Yes"></Yes>
  35:      <YesToAll value="Yes to All"></YesToAll>
  36:  </lang>        
  37:          
  38:  </messagebox>


Explaining the above tags as following:

  • <font>

    The definition of fonts, this font for characters is used in MessageBox and this don’t  contain the font in the  button, dialog.
  • <button>

    width: the width of button.

    height: the height of  button. 
    checkboxHeight: Checkbox button height. The current version does not  support  CheckBox

  • <space>

    MessageBox specifies the gap between regions. As shown below:

    image

  • <dialogstyle>

    Specifies Messagebox the dialog style, this dialog style is defined in the xml.
  • <ico>

    If you need to use a custom ico images, you can define four types images, the "id" is defined in the "dsimage" tag. If this value is not defined, the messagebox will use the Windows default icon.

  • <lang>

    Defining language, if you need to use dsMessagebox in non-English-speaking environment, you should define the corresponding language string in the tag "<lang>".

         

      Calling dsMessageBox in Application

      Calling dsMessageBox to display a skinned messagebox, the parameters of dsMessageBox are same as the parameters of Windows API MessageBox.

      int nRet = dsMessageBox (GetSafeHwnd (), strText, _T ( "Hint"), MB_OK | MB_ICONSTOP);

      To sum up, it is easy to use dsMessageBox in the application, and we will add more features to the MessageBox.

      Posted in DSkinLite.

      Tagged with , .


      3 Responses

      Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

      Continuing the Discussion

      1. CHARLES linked to this post on July 15, 2010


        PillSpot.org. Canadian Health&Care.Special Internet Prices.Best quality drugs.No prescription online pharmacy. High quality pills. Buy pills online

        Buy:Viagra Super Force.Viagra Super Active+.Propecia.Viagra.Levitra.Maxaman.Viagra Professional.Cialis Super Active+.Super Active ED Pack.Tramadol.Viagra Soft Tabs.Cialis Soft Tabs.Zithromax.Soma.VPXL.Cialis Professional.Cialis….

      2. RAUL linked to this post on July 21, 2010


        MedicamentSpot.com. Canadian Health&Care.No prescription online pharmacy.Best quality drugs.Special Internet Prices. High quality drugs. Buy drugs online

        Buy:Lipitor.Prozac.Seroquel.Cozaar.Advair.Wellbutrin SR.Ventolin.Aricept.Acomplia.SleepWell.Lipothin.Nymphomax.Buspar.Zocor.Female Cialis.Lasix.Amoxicillin.Zetia.Female Pink Viagra.Benicar….

      3. sony linked to this post on August 29, 2010

        sony http://xmoomeh5odyr.APTAUTOPARTS.INFO/tag/2+10+sony+system/ : 10…

        system…

      You must be logged in to post a comment.