Red de conocimiento informático - Problemas con los teléfonos móviles - Preguntas de introducción a VC MFC

Preguntas de introducción a VC MFC

// Genere esta función haciendo clic derecho en la clase CDatetoNMETDlg

// Seleccione Agregar identificador de mensaje de ventana

// Luego seleccione WM_TIMER y haga doble clic para generar

void CDatetoNMETDlg::OnTimer( UINT nIDEvent)

{

// TODO: agregue su código de controlador de mensajes y/o llame al valor predeterminado aquí

if ( 1==nIDEvent) //correspondencia numerada

{

COleDateTime GKTime(2011, 6, 7, 0, 0, 0) // base de tiempo

COleDateTimeSpan daytemp=GKTime-COleDateTime::GetCurrentTime(); // Diferencia horaria

CDC* pDC= this-gt() // Identificador de dibujo

CString strtemp; //Variable de carácter

CFont ft; //Variable de fuente

ft.CreatePointFont(300, "Bold", pDC); //establecer fuente

pDC); - gt;SelectObject(ft);//Enlaza la fuente

strtemp.Format("d Daysd Hoursd Minutesd Seconds", daytemp.GetDays(),

daytemp.GetHours () , daytemp.GetMinutes(), daytemp.GetSecond()).GetSeconds()); //formato de salida

pDC-gt; SetBkMode(TRANSPARENT); pDC-gt; SetTextColor(RGB(255, 0, 0)); //color de fuente

strtemp); //palabra "Dibujar"

DeleteDC(pDC-gt ; m_hDC ); //eliminar identificador

}

CDialog::OnTimer(nIDEvent);

}

También debería haber un SetTimer. definido como 1S

El programa se empaqueta y se coloca en el espacio temporal

Agregar un comentario Debido a que lleva mucho tiempo enviar el enlace publicado por Baidu, se le envía el mensaje .