Beruflich Dokumente
Kultur Dokumente
#include "stdafx.h"
#include "Tema_2.h"
#include "Tema_2Dlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CTema_2Dlg dialog
BEGIN_MESSAGE_MAP(CTema_2Dlg, CDialog)
#if defined(_DEVICE_RESOLUTION_AWARE) && !defined(WIN32_PLATFORM_WFSP)
ON_WM_SIZE()
#endif
//}}AFX_MSG_MAP
ON_BN_CLICKED(m_dateText, &CTema_2Dlg::OnBnClickeddatetext)
ON_BN_CLICKED(m_dateReale, &CTema_2Dlg::OnBnClickeddatereale)
ON_BN_CLICKED(m_dateIntregi, &CTema_2Dlg::OnBnClickeddateintregi)
ON_BN_CLICKED(m_ascunde, &CTema_2Dlg::OnBnClickedascunde)
ON_BN_CLICKED(m_valideaza, &CTema_2Dlg::OnBnClickedvalideaza)
END_MESSAGE_MAP()
BOOL CTema_2Dlg::OnInitDialog()
{
CDialog::OnInitDialog();
// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
void CTema_2Dlg::OnBnClickeddatetext()
{
v_edit1.GetWindowTextW(myInTxt);
myOutTxt.Format(_T("Textul este: %s "),myInTxt);
v_edit2.SetWindowTextW(myOutTxt);
void CTema_2Dlg::OnBnClickeddatereale()
{
char v;
v_edit1.GetWindowTextW(myInTxt);
//rez = _wtof (myInputText.GetBuffer());
rez_1 = wcstoul (myInTxt.GetBuffer(), '\0', 10);
rez_1 = rez_1 *2;
myOutTxt.Format(_T("Dublul este: %d "), rez_1);
v_edit2.SetWindowTextW(myOutTxt);
}
void CTema_2Dlg::OnBnClickeddateintregi()
{
v_edit1.GetWindowTextW(myInTxt);
//rez_1 = _wtof(myInputText.GetBuffer());
rez_2 = wcstoul (myInTxt.GetBuffer(), '\0', 10);
rez_2 = rez_2 *3;
myOutTxt.Format(_T("Triplul este: %d "), rez_2);
v_edit2.SetWindowTextW(myOutTxt);
}
void CTema_2Dlg::OnBnClickedascunde()
{
int ascunde;
ascunde = v_ascunde.GetCheck();
if (ascunde == 0)
v_dateText.ShowWindow(1);
else
v_dateText.ShowWindow(0);
}
void CTema_2Dlg::OnBnClickedvalideaza()
{
int valideaza;
valideaza = v_valideaza.GetCheck();
if (valideaza == 0)
v_dateText.EnableWindow(1);
else
v_dateText.EnableWindow(0);
}
#include "stdafx.h"
#include "Tema_2.h"
#include "Tema_2Dlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CTema_2App
BEGIN_MESSAGE_MAP(CTema_2App, CWinApp)
END_MESSAGE_MAP()
// CTema_2App construction
CTema_2App::CTema_2App()
: CWinApp()
{
// TODO: add construction code here,
// Place all significant initialization in InitInstance
}
BOOL CTema_2App::InitInstance()
{
// SHInitExtraControls should be called once during your application's
initialization to initialize any
// of the Windows Mobile specific controls such as CAPEDIT and SIPPREF.
SHInitExtraControls();
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need
// Change the registry key under which our settings are stored
// TODO: You should modify this string to be something appropriate
// such as the name of your company or organization
SetRegistryKey(_T("Local AppWizard-Generated Applications"));
CTema_2Dlg dlg;
m_pMainWnd = &dlg;
INT_PTR nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
}
// Since the dialog has been closed, return FALSE so that we exit the
// application, rather than start the application's message pump.
return FALSE;
}