|
#pragma once
extern CString PathApplication;
#define ANCHO 6
#define ALTO 10
static void DoEvents()
{
MSG msg;
// window message
while (PeekMessage(&msg,NULL,NULL,NULL,PM_REMOVE))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
static CString ObtenerEntre(CString CadDatos, CString CadInicio, CString CadFin)
{
CString CadResultado;
CString CadBuscar = CadInicio;
int Pos1 = CadDatos.Find(CadInicio);
int Pos2 = CadDatos.Find(CadFin, Pos1 + CadInicio.GetLength());
if (Pos1 < 0 || Pos2 < 0) return "";
CadResultado = CadDatos.Mid(Pos1 + CadInicio.GetLength(), Pos2 - Pos1 - CadInicio.GetLength());
return CadResultado.Trim();
}
static CString ObtenerAtributo(CString CadDatos, CString Nombre)
{
int Pos = CadDatos.Find(Nombre + "=\"");
int Inicio = Pos + Nombre.GetLength() + 2;
int PosFin = CadDatos.Find("\"", Inicio);
return CadDatos.Mid(Inicio, PosFin - Inicio);
}
static double ConvCoord(double A1, double A2, double B1, double B2, double B)
{
return (A2*(B - B1) + A1*(B2 - B)) / (B2 - B1);
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
System developer from Argentina.
Programmed in VB 5,6,.NET, C#, Java, PL-SQL, Transac-SQL, C, C++ and even some "calculator" language.
Love to build small, useful applications.
Usually building big and complicated apps based on solid, reliable components.
Hobbies: reading, photography, chess, paddle, running.