Necesito poner un editbox vacio (en visual c++),pero no se como.He intentado varias formas pero me dan errores o no me sale.
He probado esto:
CEdit* pEdit;
pEdit->GetDlgItem(hOutWnd,ID_OUTBOX);
pEdit->SetSel(0,-1);
pEdit->Clear();
y me dan los siguientes errores:
error C2065: 'CEdit' : undeclared identifier
error C2065: 'pEdit' : undeclared identifier
warning C4552: '*' : operator has no effect; expected operator with side-effect
error C2223: left of '->GetDlgItem' must point to struct/union
error C2223: left of '->SetSel' must point to struct/union
error C2223: left of '->Clear' must point to struct/union
tambien he probado esto y nada:
SetWindowText (hOutWnd, (char *)WM_CLEAR);
SendMessage(hOutWnd,WM_SETTEXT,0,"");
SetWindowText(hOutWnd,"");
pEdit->GetDlgItem (ID_OUTBOX);
pEdit->SetWindowText("");
¿me podrias ayudar?.Gracias.
urgenteeee!!!!!!!!!
Moderador: Moderadores
Re: urgenteeee!!!!!!!!!
Claro
seguramente estas utilizando a Visual C++ con un proyecto de tipo C y no C++.
Cuando tienes el error "error C2065: 'CEdit' : undeclared identifier" eso me dice que es un proyecto C.
Saludos
seguramente estas utilizando a Visual C++ con un proyecto de tipo C y no C++.
Cuando tienes el error "error C2065: 'CEdit' : undeclared identifier" eso me dice que es un proyecto C.
Saludos
inma escribió:Necesito poner un editbox vacio (en visual c++),pero no se como.He intentado varias formas pero me dan errores o no me sale.
He probado esto:
CEdit* pEdit;
pEdit->GetDlgItem(hOutWnd,ID_OUTBOX);
pEdit->SetSel(0,-1);
pEdit->Clear();
y me dan los siguientes errores:
error C2065: 'CEdit' : undeclared identifier
error C2065: 'pEdit' : undeclared identifier
warning C4552: '*' : operator has no effect; expected operator with side-effect
error C2223: left of '->GetDlgItem' must point to struct/union
error C2223: left of '->SetSel' must point to struct/union
error C2223: left of '->Clear' must point to struct/union
tambien he probado esto y nada:
SetWindowText (hOutWnd, (char *)WM_CLEAR);
SendMessage(hOutWnd,WM_SETTEXT,0,"");
SetWindowText(hOutWnd,"");
pEdit->GetDlgItem (ID_OUTBOX);
pEdit->SetWindowText("");
¿me podrias ayudar?.Gracias.