About Palm Foundation Classes
Highlevel C++ Application Framework for PalmOS development.C++ Builder VCL like deployment aid C++ Builder programmers with PalmOS ready tools. Programming PalmOS without learning basic knowledge of PalmOS SDK.[Zip download is the TRIAL VERSION ONLY]Rapid Application Development (RAD)In Form1.cpp it only shows roughly 50 lines of codes which made up a basic Palm Application (Screen Shot As above), and that is the magic of PFC. The programmers only need to know how to use the components in the PFC, and no need to know how it is done. This has proven that PFC provide Rapid Application Development (RAD) for PalmOS programming in C++ language. Form1.cpp#include "PCL.h"
#include "Form1.h"
//----------------------------------------------------------------------------------------------
PForm1 *Form1;
//----------------------------------------------------------------------------------------------
PForm1::PForm1(UInt16 FormID ):PForm( FormID )
{
FirstButton = new PButton( this, GetUniqueControlID(),"Button",10,20,40,15 );
CheckBox = new PCheckBox( this, GetUniqueControlID(),"CheckBox",10,35,60,15,1 );
CheckBox1 = new PCheckBox( this,GetUniqueControlID(), "CheckBox1",10,45,60,15,1 );
ListBox = new PListBox(this, GetUniqueControlID(),0,10,65,60,45,3 );
Label = new PLabel( this ,GetUniqueControlID(),"Label",10,100 );
ComboBox = new PComboBox( this, GetUniqueControlID(), GetUniqueControlID(),"ComboBox", 10, 110 );
TrackBar = new PTrackBar( this,GetUniqueControlID(),NULL,NULL,20,130);
ListBox->AddItem("Item 1");
ListBox->AddItem("Item 2");
ListBox->AddItem("Item 3");
ListBox->AddItem("Item 4");
ComboBox->AddItem("Popup 1" );
ComboBox->AddItem("Popup 2" );
ComboBox->AddItem("Popup 3" );
CheckBox->SetChecked( true );
Label->SetText("--- Changed ---");
FirstButton->OnClick = IN_CLASS_EVENT_HANDLER ( PForm1,OnClick );
CheckBox->OnChecked = IN_CLASS_EVENT_HANDLER ( PForm1, OnClick );
TrackBar->OnChangePosition = IN_CLASS_EVENT_HANDLER ( PForm1, OnChange );
}
//----------------------------------------------------------------------------------------------
void PForm1::OnClick( PObject *Sender, void* )
{
AnsiString Str;
PControl *Ctrl = dynamic_cast< PControl* >( Sender );
If( Ctr )
{
Str.sprintf("Click control \"%s\"",Ctrl->GetCaption().c_str());
ShowMessage("Message" , Str );
}
}
//----------------------------------------------------------------------------------------------
void PForm1::OnChange( PObject *Sender, void* Pos )
{
AnsiString Str;
Str.sprintf( "Value = %d" , (UInt16) Pos );
Label->SetText( Str );
Label->Paint();
}
//----------------------------------------------------------------------------------------------
void PForm1::OnMenuCommand( UInt16 ItemID )
{
ShowMessage( "About PFC 1.5" ,"Copyright(c) 2002 MD Development." );
}
//----------------------------------------------------------------------------------------------


