Tengo algo de código de como hice una simple, solo que te tienes q' imaginar los botones y demas pero tienen nombres muy sugestivos:
//---------------------------------------------------------------------------
#include <vcl\vcl.h>
#pragma hdrstop
#include<math.h>
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma resource "*.dfm"
TForm1 *Form1;
int op;
float Dig1, Dig2;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::btnSumarClick(TObject *Sender)
{
op = 1;
Dig1 = StrToFloat(edtDisplay -> Text);
edtDisplay -> Text = "";
}
//---------------------------------------------------------------------------
void __fastcall TForm1::btnRestarClick(TObject *Sender)
{
op = 2;
Dig1 = StrToFloat(edtDisplay -> Text);
edtDisplay -> Text = "";
}
//---------------------------------------------------------------------------
void __fastcall TForm1::btnMultiplicarClick(TObject *Sender)
{
op = 3;
Dig1 = StrToFloat(edtDisplay -> Text);
edtDisplay -> Text = "";
}
//---------------------------------------------------------------------------
void __fastcall TForm1::btnDividirClick(TObject *Sender)
{
op = 4;
Dig1 = StrToFloat(edtDisplay -> Text);
edtDisplay -> Text = "";
}
//---------------------------------------------------------------------------
void __fastcall TForm1::btnRaizClick(TObject *Sender)
{
op = 5;
Dig1 = StrToFloat(edtDisplay -> Text);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::btnPotClick(TObject *Sender)
{
op = 6;
Dig1 = StrToFloat(edtDisplay -> Text);
edtDisplay -> Text = "";
}
//---------------------------------------------------------------------------
void __fastcall TForm1::btnPiClick(TObject *Sender)
{
edtDisplay -> Text = "3,14169";
}
//---------------------------------------------------------------------------
void __fastcall TForm1::btnLimpiarClick(TObject *Sender)
{
edtDisplay -> Text = "";
}
//---------------------------------------------------------------------------
void __fastcall TForm1::btn1Click(TObject *Sender)
{
edtDisplay -> Text = (edtDisplay -> Text+1);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::btn2Click(TObject *Sender)
{
edtDisplay -> Text = (edtDisplay -> Text+2);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::btn3Click(TObject *Sender)
{
edtDisplay -> Text = (edtDisplay -> Text+3);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::btn4Click(TObject *Sender)
{
edtDisplay -> Text = (edtDisplay -> Text+4);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::btn5Click(TObject *Sender)
{
edtDisplay -> Text = (edtDisplay -> Text+5);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::btn6Click(TObject *Sender)
{
edtDisplay -> Text = (edtDisplay -> Text+6);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::btn7Click(TObject *Sender)
{
edtDisplay -> Text = (edtDisplay -> Text+7);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::btn8Click(TObject *Sender)
{
edtDisplay -> Text = (edtDisplay -> Text+8);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::btn9Click(TObject *Sender)
{
edtDisplay -> Text = (edtDisplay -> Text+9);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::btn0Click(TObject *Sender)
{
edtDisplay -> Text = (edtDisplay -> Text+0);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::btnComaClick(TObject *Sender)
{
edtDisplay -> Text = (edtDisplay-> Text+",");
}
//---------------------------------------------------------------------------
void __fastcall TForm1::FormCreate(TObject *Sender)
{
MessageBeep(MB_OK);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::btnSenClick(TObject *Sender)
{
op = 7;
Dig1 = StrToFloat(edtDisplay -> Text);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::btnCosClick(TObject *Sender)
{
op = 8;
Dig1 = StrToFloat(edtDisplay -> Text);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::btnTanClick(TObject *Sender)
{
op = 9;
Dig1 = StrToFloat(edtDisplay -> Text);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::btnLogNatClick(TObject *Sender)
{
op = 10;
Dig1 = StrToFloat(edtDisplay -> Text);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::btnLog10Click(TObject *Sender)
{
op = 11;
Dig1 = StrToFloat(edtDisplay -> Text);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::btnIgualClick(TObject *Sender)
{
if (op == 1)
{
Dig2 = StrToFloat(edtDisplay -> Text);
float Suma = Dig1 + Dig2;
edtDisplay -> Text = FloatToStr(Suma);
}
else if (op == 2)
{
Dig2 = StrToFloat(edtDisplay -> Text);
float Resta = Dig1 - Dig2;
edtDisplay -> Text = FloatToStr(Resta);
}
else if (op == 3)
{
Dig2 = StrToFloat(edtDisplay -> Text);
float Multiplica = Dig1 * Dig2;
edtDisplay -> Text = FloatToStr(Multiplica);
}
else if (op == 4)
{
Dig2 = StrToFloat(edtDisplay -> Text);
float Divide = Dig1 / Dig2;
edtDisplay -> Text = FloatToStr(Divide);
}
else if (op == 5)
{
float Raiz = sqrt(Dig1);
edtDisplay -> Text = FloatToStr(Raiz);
}
else if (op == 6)
{
Dig2 = StrToFloat(edtDisplay -> Text);
float Potencia = pow(Dig1, Dig2);
edtDisplay -> Text = FloatToStr(Potencia);
}
else if (op == 7)
{
float Sen = sin(Dig1);
edtDisplay -> Text = FloatToStr(Sen);
}
else if (op == 8)
{
float Cos = cos(Dig1);
edtDisplay -> Text = FloatToStr(Cos);
}
else if (op == 9)
{
float Tan = tan(Dig1);
edtDisplay -> Text = FloatToStr(Tan);
}
else if (op == 10)
{
float In = log(Dig1);
edtDisplay -> Text = FloatToStr(In);
}
else if (op == 11)
{
float Log10 = log10(Dig1);
edtDisplay -> Text = FloatToStr(Log10);
}
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
edtDisplay -> Text = "Hecha por Olman Arias Solano. Versión 1.1";
}
//---------------------------------------------------------------------------
Espero te sirva... ahi me avisas!