Click here to Skip to main content
15,076,465 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: edit control how to get deleted text Pin
harsha_123419-Sep-06 22:55
Memberharsha_123419-Sep-06 22:55 
GeneralRe: edit control how to get deleted text Pin
Rinu_Raj19-Sep-06 23:08
MemberRinu_Raj19-Sep-06 23:08 
AnswerRe: edit control how to get deleted text Pin
toxcct19-Sep-06 22:48
Membertoxcct19-Sep-06 22:48 
QuestionHow to display CStatic Pin
gomez_a19-Sep-06 22:33
Membergomez_a19-Sep-06 22:33 
AnswerRe: How to display CStatic Pin
Rinu_Raj19-Sep-06 22:39
MemberRinu_Raj19-Sep-06 22:39 
GeneralRe: How to display CStatic Pin
gomez_a19-Sep-06 23:58
Membergomez_a19-Sep-06 23:58 
AnswerRe: How to display CStatic Pin
Rinu_Raj20-Sep-06 0:03
MemberRinu_Raj20-Sep-06 0:03 
GeneralRe: How to display CStatic Pin
gomez_a20-Sep-06 1:19
Membergomez_a20-Sep-06 1:19 
I think there is steel something wrong.

Please look at my source code. My dialog window is MOkno.h

public:
CStatic lblRecno; // for displaying recno
CButton btnStart; // button Start
int iLicznik; // increment variable
CString newTxt; // new value of the text = iLicznik as a Text

MOkno.cpp:

BOOL MOkno::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO:
SetTimer(ID_TIMER1, 1000, NULL); // my Timer is running every 1 s
return TRUE;
}

HBRUSH MOkno::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr;
if(nCtlColor == CTLCOLOR_STATIC )
{
pDC->SetBkMode(TRANSPARENT);
pDC->SetTextColor(clBlue);

hbr = (HBRUSH) GetStockObject( NULL_BRUSH );
}
else
{
hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
}

return hbr;
}

void MOkno::OnClose()
{
KillTimer(ID_TIMER1);
CDialog::OnClose();
}

On the dialog window tehre is a Start button. When user click on the button:
void MOkno::OnBnClickedButtonStart()
{
iLicznik = 0;
newTxt = "";
// suppose: It is a database, and I am reading records
// and display the current recno number
for(iLicznik = 1; iLicznik <= 1000; iLicznik++)
{
newTxt.Format("%d", iLicznik);
}
}

void MOkno::OnTimer(UINT nIDEvent)
{
CDialog::OnTimer(nIDEvent);
lblRecno.SetWindowText(newTxt);
}

Regards
mwgomez
GeneralRe: How to display CStatic Pin
Rinu_Raj20-Sep-06 1:49
MemberRinu_Raj20-Sep-06 1:49 
GeneralRe: How to display CStatic Pin
gomez_a20-Sep-06 2:34
Membergomez_a20-Sep-06 2:34 
GeneralRe: How to display CStatic Pin
David Crow20-Sep-06 2:53
MemberDavid Crow20-Sep-06 2:53 
QuestionRe: How to display CStatic Pin
David Crow20-Sep-06 2:56
MemberDavid Crow20-Sep-06 2:56 
QuestionSQL Server [modified] Pin
Bravoone_200619-Sep-06 22:31
MemberBravoone_200619-Sep-06 22:31 
QuestionRe: SQL Server Pin
David Crow20-Sep-06 3:43
MemberDavid Crow20-Sep-06 3:43 
Questionproblem with pointer Pin
zizzzz19-Sep-06 22:15
Memberzizzzz19-Sep-06 22:15 
QuestionRe: problem with pointer Pin
prasad_som19-Sep-06 22:34
Memberprasad_som19-Sep-06 22:34 
AnswerRe: problem with pointer Pin
zizzzz19-Sep-06 22:43
Memberzizzzz19-Sep-06 22:43 
GeneralRe: problem with pointer Pin
Cedric Moonen19-Sep-06 22:54
MemberCedric Moonen19-Sep-06 22:54 
QuestionMFC and MySQL problem Pin
DDeliyiannis19-Sep-06 22:15
MemberDDeliyiannis19-Sep-06 22:15 
QuestionVC++ Setting Background as BMP Pin
arti mujumdar19-Sep-06 21:27
Memberarti mujumdar19-Sep-06 21:27 
AnswerRe: VC++ Setting Background as BMP Pin
Naveen19-Sep-06 21:43
MemberNaveen19-Sep-06 21:43 
AnswerRe: VC++ Setting Background as BMP Pin
_AnsHUMAN_ 19-Sep-06 21:53
Member_AnsHUMAN_ 19-Sep-06 21:53 
AnswerRe: VC++ Setting Background as BMP Pin
Anilkumar K V19-Sep-06 22:37
MemberAnilkumar K V19-Sep-06 22:37 
AnswerRe: VC++ Setting Background as BMP Pin
Nibu babu thomas19-Sep-06 22:53
MemberNibu babu thomas19-Sep-06 22:53 
AnswerRe: VC++ Setting Background as BMP Pin
Hamid_RT19-Sep-06 23:17
MemberHamid_RT19-Sep-06 23:17 

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.