Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Otros entornos y lenguajes > C++ Builder
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

 
 
Herramientas Buscar en Tema Desplegado
  #2  
Antiguo 05-06-2017
Avatar de _Leo
_Leo _Leo is offline
Miembro
 
Registrado: ene 2017
Ubicación: Lanzarote (Islas Canarias)
Posts: 38
Poder: 0
_Leo Va camino a la fama
Hola, prueba del siguiente modo:

(Añade las siguientes cabeceras: #include<utilcls.h> #include<mshtml.h>)

Código:
void __fastcall TFrmMain::WebBrowser1CommandStateChange(TObject *ASender,
        int Command, WordBool Enable)
{
    if (Command != ::CSC_UPDATECOMMANDS) return;

    String Lat, Lng;
    TComInterface<IHTMLDocument3> doc;
    TComInterface<IHTMLElement> tag;
    TVariant value;

    OleCheck(WebBrowser1->Document->QueryInterface<IHTMLDocument3>(&doc));
    doc->getElementById(TVariant("LatValue"), &tag);
    if (tag) { tag->getAttribute(TVariant("value"), 0, value);  Lat = value; }
    tag.Reset();
    doc->getElementById(TVariant("LngValue"), &tag);
    if (tag) { tag->getAttribute(TVariant("value"), 0, value);  Lng = value; }

    if (!Lat.IsEmpty() && !Lng.IsEmpty()
        && (Lat != Latitude->Text || Lng != Longitude->Text))
    {
        Latitude->Text = Lat;
        Longitude->Text = Lng;
        AddLatLngToList(Lat, Lng);
    }
}
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Api de google , google maps en c++ builder 6 JM1985 C++ Builder 1 01-04-2016 21:10:17
GPS y Google Maps MAXIUM Internet 5 15-03-2011 18:15:05
Google Maps madiazg Varios 4 26-10-2008 22:03:41
Google maps y php halizia PHP 2 16-03-2007 17:04:49
Google Maps .es Neftali [Germán.Estévez] Noticias 0 27-04-2006 13:32:54


La franja horaria es GMT +2. Ahora son las 19:14:00.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi