Hi Ami, My problem has been resolved. your given suggestion worked out. **Thanks a lot once again..... :)**
AJ83
Posts
-
How to implement Tab order to the controls in a MFC Dialog box -
How to implement Tab order to the controls in a MFC Dialog boxWell, In first round it is working but once it comes to OK or CANCEL button is not going back to edit box. I am trying for that... I will post code after few minutes or if you do have idea of why is it not coming back to edit box, you can let me know.. Regards, Anshul
-
How to implement Tab order to the controls in a MFC Dialog boxHey Ami,
**Thanks a lot for your valuable suggestion. It is working now. great :) !!!**
Now my another task is: There is one Static GRPbox which has been created in CFormView by using ToolBox. Now in Static Groupbox, I am creating "n" number of dynamic GrpBox. In Dynamic GrpBox, I am creating dynamic Edit Box (few are READ ONLY too). Now I have to set taborder for that also. Any suggestion on this.? Regards, Anshul -
How to implement Tab order to the controls in a MFC Dialog boxThis is my modified compilable code but tab order is not working as GRPBox -> Edit 1 -> Edit 2 -> Edit 3 -> OK -> CANCEL.
It is still working as **GRPBox -> OK -> CANCEL.**
#define ID_CURRENT_SN_EDIT 1003
m_gbGroupBox = (CStatic*)GetDlgItem(IDC_GROUPBOX);
m_gbGroupBox->ModifyStyleEx( 0, WS_EX_CONTROLPARENT);m_btnOK = (CButton*)GetDlgItem(IDC_OK);
m_btnCancel = (CButton*)GetDlgItem(IDC_CANCEL);int pointY = 0;
int i = 0;for (int x = 0; x < m_vecpData->size(); x++, i++)
{
pointY = 30 + (i * 35);
m_ceEdit = new CEdit;
m_ceEdit->Create(WS_VISIBLE| WS_BORDER |ES_READONLY, CRect(10, pointY, 130, pointY + 25), m_gbGroupBox, ID_CURRENT_SN_EDIT + i);
m_ceEdit>SetWindowText(m_vecpData->at(x).c_str());
int nCtlrID = ID_CURRENT_SN_EDIT + i;if (x > 0)
{
CEdit* pEdit = (CEdit*)GetDlgItem(nCtlrID - 1);
m_ceEdit->SetWindowPos(pEdit, 10, pointY, 130, pointY + 25, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE );
}
m_ceEdit->ShowWindow(SW_SHOWNORMAL);
}Any Help or Suggestion!! I do not know what to do now.
-
How to implement Tab order to the controls in a MFC Dialog boxHi Ami, I am creating edit box in Group box as:
#define ID_CURRENT_SN_EDIT 2000
m_gbGroupBox = (CStatic*)GetDlgItem(IDC_GROUPBOX);
int pointY = 0;
int i = 0;for (int x = 0; x < m_vecpData->size(); x++, i++)
{
pointY = 30 + (i * 35);
m_ceEdit = new CEdit;
m_ceEdit->Create(WS_VISIBLE| WS_BORDER |ES_READONLY | WS_TABSTOP, CRect(10, pointY, 130, pointY + 25), m_gbGroupBox, ID_CURRENT_SN_EDIT + i);
m_ceEdit->SetWindowText(m_vecpData->at(x).c_str());
m_ceEdit->SetWindowPos(m_gbGroupBox, HWND_BOTTOM , 10, pointY, 130, pointY + 25, SWP_NOSIZE); // This line is not working.:confused:
m_ceEdit->ShowWindow(SW_SHOWNORMAL);
} -
How to implement Tab order to the controls in a MFC Dialog boxHi ns Ami, I am creating dynamic edit box in Group Box. My current Tab order is Group Box, OK, Cancel button. Now I want tab order as: Group box-> Edit Box 1 -> Edit Box 2 -> Edit Box 3 -> OK -> Cancel. How can i achieve this? do you have any idea? Regards, Anshul