Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Now the icons are automatically linked in; I don't have to worry about adding anything to the project or shipping .ico files with the product. 

For your reference, here is the class header:

Code Block
    include('CML_IncludeInAllClassHeaderFiles.inc'),once

CML_UI_ListCheckbox                             Class,Type,Module('CML_UI_ListCheckbox.CLW'),Link('CML_UI_ListCheckbox.CLW',_CML_Classes_LinkMode_),Dll(_CML_Classes_DllMode_)
ListFEQ                                             long
Initialize                                          procedure(long listFEQ)
                                                End

And the class code:

Code Block
                                            Member
                                            Map
                                            End
    Include('CML_UI_ListCheckbox.inc'),Once
    !include('CML_System_Diagnostics_Logger.inc'),once
!dbg                                     CML_System_Diagnostics_Logger
CML_UI_ListCheckbox.Initialize                  procedure(long listFEQ)
    code
    self.ListFEQ = ListFeq
    self.ListFEQ{PROPLIST:Icon,1} = 1
    self.ListFEQ{PROP:IconList,1} = '~CML_UnChecked.ico'
    self.ListFEQ{PROP:IconList,2} = '~CML_Checked.ico'  
    self.ListFEQ{PROPLIST:Picture,1} = '@p p'
    pragma('link (CML_Checked.ico)')
    pragma('link (CML_UnChecked.ico)')

Next time: Making the Initialize call more flexible, and turning checkboxes on and off.