Author:ggiloyan
Posted: Tue Sep 01, 2015 6:29 am (GMT+1)
this->m_comboModels defined in .h file
like this
in your cpp file you can fill it by this way
If you need to catch on selected change event of your popup control then you should inherit your dialog or pallete class from public DG::PopUpObserver
and use like this
.h
.cpp
Posted: Tue Sep 01, 2015 6:29 am (GMT+1)
this->m_comboModels defined in .h file
like this
Code: |
DG::PopUp m_comboModels; |
in your cpp file you can fill it by this way
Code: |
this->m_comboModels.DeleteItem(DG::PopUp::AllItems); for (int i = 0; i < <your array>; i++) { this->m_comboModels.AppendItem(); this->m_comboModels.SetItemText (DG::PopUp::BottomItem, GS::UniString::Printf("%s", <display member>)); this->m_comboModels.SetItemValue (DG::PopUp::BottomItem, <value member>); } |
If you need to catch on selected change event of your popup control then you should inherit your dialog or pallete class from public DG::PopUpObserver
and use like this
.h
Code: |
void PopUpChanged(const DG::PopUpChangeEvent& e); |
.cpp
Code: |
void PopUpChanged(const DG::PopUpChangeEvent& e) { Int32 selValue = TruncateTo32Bit(e.GetSource()->GetItemValue(this->m_comboModels.GetSelectedItem ())); } |