Encryption Program (help me please)
(To the moderators, please change the name to: Encryption Program (help me please), thank you!)
I navigate for 4 days the web and I haven't found nothing that could help me to solve my problem.
I re-created a keyboard on the screen, I have 26 buttons (letters form A-Z), two edit controls, one for the text that I write with the keyboard and one for the encrypted text, I also have re-created a second keyboard where I need to display the encrypted letter that in that moment is associated to the letter that I have pressed.
I thought to use this method: when I press Q button, for example, in the plain text I can read Q(did), in the encrypted I can read J, for example(did), and I have to see in the second keyboard the J letter, but I don't know how I can apply this last thought to my code!
Here there's the part of code of a pressed button (i.e. Q)
Code:
................
DDX_Control(pDX, IDC_CHECK1, m_Btn1);
................
ON_BN_CLICKED(IDC_BUTTON_Q, OnBnClickedButtonQ)
................
BOOL CTestDlg::OnInitDialog()
{
m_ToolTip.Create(this);
m_ToolTip.AddTool( &m_Btn1, IDS_TT_BTN1 );
................
//Set images
m_Btn1.SetImage( IDB_Q, 28 );
................
// set the initial state of buttons
m_Btn1.Depress(false);
................
}
void CTestDlg::OnBnClickedButtonQ()
{
// keybd_event(VkKeyScan('Q'),0x90,0 , 0); // ‘Q’ Press
m_Btn1.Depress(!m_Btn1.IsDepressed()); // when I press 'Q' in the second keyboard I see 'Q' instead of 'J', or another letter
//=========================
//Get the Pressed Letter
//=========================
LPTSTR item = "Q";
................
................
}
P.S.: on the second keyboard when I press the 'Q' button or other button, I have to see everytime a different letter, there's no a standard association between the pressed letter and the letter displayed in the encrypted field.
Hope in some important help, because I really don't know how can I do.