C/Visual C - Ayuda urgente por favor soy principiante

 
Vista:

Ayuda urgente por favor soy principiante

Publicado por Magna (4 intervenciones) el 27/10/2006 12:52:57
Bueno empece solo hace 3 dias con un libro de Sams Teach Your Self Visual C++ y tengo un problema en la segunda clace q no entiendo q esta mal revise mas de 10 veces todo y esta perfecto y el debugger me tira error en 3 lugares , no se q pueda ser las variables estan bien declaradas y todo esta bien a ver si me pueden decir en q me equivoque.

Desde ya gracias
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:Ayuda urgente por favor soy principiante

Publicado por Magna (4 intervenciones) el 27/10/2006 12:54:33
Es algo muy simple el codigo:

void CDay2Dlg::OnCkenblmsg()
{
// TODO: Add your control notification handler code here

// Get the current values from the screen
UpdateData(TRUE);

// Is the enable Message action check box checked?
if (m_bEnableMsg == TRUE)
{
// Yes , so enable all controls that have anything
// to do with showing the user message
GetDlgItem(IDC_MSG) ->EnableWindow(TRUE);
GetDlgItem(IDC_SHWMSG) ->EnableWindow(TRUE);
GetDlgItem(IDC_DFLTMSG) ->EnableWindow(TRUE);
GetDlgItem(IDC_CLRMSG) ->EnableWindow(TRUE);
GetDlgItem(IDC_STATICMSG) ->EnableWindow(TRUE);
}
else
{
// No , so disable all controls that hace anything
// to do with showing the user message
GetDlgItem(IDC_MSG) ->EnableWindow(FALSE);
GetDlgItem(IDC_SHWMSG) ->EnableWindow(FALSE);
GetDlgItem(IDC_DFLTMSG) ->EnableWindow(FALSE);
GetDlgItem(IDC_CLRMSG) ->EnableWndow(FALSE);
GetDlgItem(IDC_STATICMSG) ->EnableWindow(FALSE);
}

}

void CDay2Dlg::OnCkshwmsg()
{
// TODO: Add your control notification handler code here

// Get the current values from the screen
UpdateData(TRUE);

// Is the Show message check box checked?
if (m_bShowMsg == TRUE)
{
// Yes , so show all controls that have anything
// to do with showing the user message
GetDlgItem(IDC_MSG) ->ShowWindow(TRUE);
GetDlgItem(IDC_SHWMSG) ShowWindow(TRUE);
GetDlgItem(IDC_DFLTMSG) ->ShowWindow(TRUE);
GetDlgItem(IDC_CLRMSG) ->ShowWndow(TRUE);
GetDlgItem(IDC_STATICMSG) ->ShowWindow(TRUE);
}
else
{
// No , so hide all controls that have anything
// to do with showing the user message
GetDlgItem(IDC_MSG) ->ShowWindow(FALSE);
GetDlgItem(IDC_SHWMSG) ->ShowWindow(FALSE);
GetDlgItem(IDC_DFLTMSG) ->ShowWindow(FALSE);
GetDlgItem(IDC_CLRMSG) ->ShowWindow(FALSE);
GetDlgItem(IDC_STATICMSG) ->ShowWindow(FALSE);
}

}

Gracias.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:Ayuda urgente por favor soy principiante

Publicado por Tom (619 intervenciones) el 27/10/2006 14:04:15
Bueno, pues la verdad es que ayudaría muchísimo que nos dijeras en qué tres lugares te "tira" error el debugger.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:Ayuda urgente por favor soy principiante

Publicado por Magna (4 intervenciones) el 27/10/2006 14:14:17
Si no es mucho pedir me gustaria que me agregaras al msn por que tengo varias dudas y demas cosas que no se sacan con un libro o un manual mi msn es: [email protected]
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

Esto es lo que me sale en el debuger

Publicado por Magna (4 intervenciones) el 27/10/2006 18:32:56
Day2Dlg.cpp(229) : warning C4390: ';' : empty controlled statement found; is this the intent?
Day2Dlg.cpp(238) : error C2181: illegal else without matching if
Day2Dlg.cpp(244) : error C2065: 'GetDlfItem' : undeclared identifier
Day2Dlg.cpp(244) : error C2227: left of '->EnableWindow' must point to class/struct/union
Day2Dlg.cpp(245) : error C2065: 'ID_CLRMSG' : undeclared identifier
Day2Dlg.cpp(245) : error C2227: left of '->EnableWindow' must point to class/struct/union
Day2Dlg.cpp(246) : error C2065: 'FLSE' : undeclared identifier
Error executing cl.exe.

Day2.exe - 6 error(s), 1 warning(s)

Lo peor de todo es que lo saque de un libro Sams Teach Your Self Visual C++ in 21 Days

Aca dejo el libro y el codigo fuente de este programita:

http://www.uploading.com/files/WX2IDIRU/Libro_y_Codigo_Fuente.rar.html
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:Esto es lo que me sale en el debuger

Publicado por Tom (619 intervenciones) el 30/10/2006 12:22:25
No puedo acceder a la dirección que dejas, algo así como que está sobrecargado el server.
Todos los errores que comentas, son de sintaxis, casi con toda seguridad.

El de la línea 238 está claro ¿no? tendrás que revisar los if y else de esa zona, porque te faltará alguna '{' o '('.
En la 244, has escrito mal el nombre de la función, casi seguro. Prueba con GetDiffItem. El error siguiente, de la misma línea es por lo mismo, soluciona el primero y ya está.
En la línea 245, revisa también los nombres de objetos y constantes.
Y el de la 246, es obvio.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar