Hello,
I want to developping application with Airplay studio UI builder, I follwing instruction to create calcultor sample. But I try to figure how i can program event when I clik button.
Question his,
When user interface is created where I put code to handling event.
I have visual studio 2005 and 2008 on my PC
Work under XP and Vista.
Regards
Michel,
PS. Sorry for my english. :)
Hi Michel,
There are various options as to to where you can place event handling code. In the case of the calculator tutorial, it is intended you use the same arrangement as the IwUICalculator example.
Try adding the following to you project:
class CController
{
public:
CController()
{
IW_UI_CREATE_VIEW_SLOT1(this, "CController", CController,
OnClickButton_mc, CIwUIElement*)
}
~CController()
{
IW_UI_DESTROY_VIEW_SLOTS(this)
}
private:
void OnClickButton_mc(CIwUIElement*)
{
IwAssertMsg(UI, false, ("Replace with button handling"));
}
};
Then, in your startup code, create a
CControllerobject at startup:new CIwUIView;
new CIwUIController;
// Register button handlers
new CController;
Cheers,
Steven