Click here to Skip to main content
15,923,689 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: parent doesn't let the child to be visible in mfc Pin
sepehr_vision19-Sep-06 21:03
sepehr_vision19-Sep-06 21:03 
QuestionDisplaying arabic characters in excel Pin
pac2819-Sep-06 20:08
pac2819-Sep-06 20:08 
QuestionOwnerDraw ListCtrl with CheckBox Pin
Nishad S19-Sep-06 19:57
Nishad S19-Sep-06 19:57 
AnswerRe: OwnerDraw ListCtrl with CheckBox Pin
Hamid_RT19-Sep-06 20:31
Hamid_RT19-Sep-06 20:31 
GeneralRe: OwnerDraw ListCtrl with CheckBox Pin
Nishad S19-Sep-06 20:48
Nishad S19-Sep-06 20:48 
QuestionSparse Tables Pin
nyteryder7919-Sep-06 19:46
nyteryder7919-Sep-06 19:46 
AnswerRe: Sparse Tables Pin
_AnsHUMAN_ 19-Sep-06 20:00
_AnsHUMAN_ 19-Sep-06 20:00 
QuestionHow to display data in controls for the second time Pin
vc++_fragrance19-Sep-06 19:09
vc++_fragrance19-Sep-06 19:09 
Hi,
I have created a propertysheet with two property pages.
In the first property page i displayed 'employee names ' from the database and displayed in the grid lines.

I select on name and activate another property page.Using querysiblings i got the name in the second property page.
And using that ,employeename' i write a query to get the data from the database and displayed in the controls.

First time it is running fine.
Second time if i select another emplyoee name I am getting the correct results from database but the old data is displayed in the controls.

BOOL CCampaignDataEntryDlg::OnInitDialog()
{
CPropertyPage::OnInitDialog();
setUpODBC();// establish database connection
long x=QuerySiblings(1,(long)&m_querySibling);

CString* pString=(CString*)x;
pStr=*pString;

AfxMessageBox(pStr); //display employee name say 'tejaswini'

SQLRETURN sr;
SQLHSTMT hstmt;

CString campid;
campid.Format("SELECT empName,empID FROM EMPLOYEEDETAILS WHERE EMPNAME= '%s'",pStr);
SQLCHAR* SQL = (SQLCHAR*)(LPCSTR)campid;

I read the empName into roow.EmpName;
and empID into roow.EmpID;
CEdit *Name;
Name= reinterpret_cast<cedit *="">(GetDlgItem(IDC_EMPNAME));
Name->SetWindowText(roow.EmpName);
CEdit *EmpId;
EmpId= reinterpret_cast<cedit *="">(GetDlgItem(IDC_EMPID));
EmpId->SetWindowText(roow.EmpID);


}

BOOL CCampaignDataEntryDlg::OnSetActive()
{
if(m_Status!="") //m_Status is to used to know whether the
//property page is activated or not
OnInitDialog();
/*One of our friends told not to call OnInitDialog()here and he suggested to write the code here instead writing in OnInitDialog().I did like that and in the first control that is Edit box is not displaying the text. Other controls are displaying it.*/
return CPropertyPage::OnSetActive();
}
BOOL CCampaignDataEntryDlg::OnKillActive()
{
m_Status="abc";

return CPropertyPage::OnKillActive();
}

Can u plz say How can I solve this problem?
Thanks in advance.
QuestionMFC Question - How can I tell if a button has been pressed, not a specific button, but just the event of a button press? Pin
skyapie19-Sep-06 18:27
skyapie19-Sep-06 18:27 
AnswerRe: MFC Question - How can I tell if a button has been pressed, not a specific button, but just the event of a button press? Pin
Rinu_Raj19-Sep-06 18:33
Rinu_Raj19-Sep-06 18:33 
GeneralRe: MFC Question - How can I tell if a button has been pressed, not a specific button, but just the event of a button press? Pin
Stephen Hewitt19-Sep-06 18:57
Stephen Hewitt19-Sep-06 18:57 
GeneralRe: MFC Question - How can I tell if a button has been pressed, not a specific button, but just the event of a button press? Pin
Rinu_Raj19-Sep-06 19:01
Rinu_Raj19-Sep-06 19:01 
GeneralRe: MFC Question - How can I tell if a button has been pressed, not a specific button, but just the event of a button press? Pin
ANIL KUMAR SHARMA (INDIA)14-Jul-09 19:17
ANIL KUMAR SHARMA (INDIA)14-Jul-09 19:17 
AnswerRe: MFC Question - How can I tell if a button has been pressed, not a specific button, but just the event of a button press? Pin
Naveen19-Sep-06 18:48
Naveen19-Sep-06 18:48 
AnswerRe: MFC Question - How can I tell if a button has been pressed, not a specific button, but just the event of a button press? Pin
Stephen Hewitt19-Sep-06 18:51
Stephen Hewitt19-Sep-06 18:51 
GeneralRe: MFC Question - How can I tell if a button has been pressed, not a specific button, but just the event of a button press? Pin
skyapie19-Sep-06 23:34
skyapie19-Sep-06 23:34 
GeneralRe: MFC Question - How can I tell if a button has been pressed, not a specific button, but just the event of a button press? Pin
skyapie21-Sep-06 1:11
skyapie21-Sep-06 1:11 
GeneralRe: MFC Question - How can I tell if a button has been pressed, not a specific button, but just the event of a button press? Pin
Stephen Hewitt21-Sep-06 13:49
Stephen Hewitt21-Sep-06 13:49 
Questionsubclass a button, how let it know CLICK event Pin
HOW WHAT19-Sep-06 16:47
HOW WHAT19-Sep-06 16:47 
AnswerRe: subclass a button, how let it know CLICK event Pin
Naveen19-Sep-06 17:13
Naveen19-Sep-06 17:13 
GeneralRe: subclass a button, how let it know CLICK event Pin
HOW WHAT19-Sep-06 18:21
HOW WHAT19-Sep-06 18:21 
GeneralRe: subclass a button, how let it know CLICK event Pin
Naveen19-Sep-06 19:14
Naveen19-Sep-06 19:14 
AnswerRe: subclass a button, how let it know CLICK event Pin
Stephen Hewitt19-Sep-06 18:07
Stephen Hewitt19-Sep-06 18:07 
QuestionHow Do I Incorporate mySQL into my web CGI app made in C++ Pin
S0uthy19-Sep-06 16:01
S0uthy19-Sep-06 16:01 
AnswerRe: How Do I Incorporate mySQL into my web CGI app made in C++ Pin
Christian Graus19-Sep-06 16:07
protectorChristian Graus19-Sep-06 16:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.