Ver Mensaje Individual
  #16
Antiguo 12 de noviembre de 2024, 18:56
fastpho
El Foro es mi casa
Innovación: Por aportar innovaciones - Issue reason: SQLite + OO Cobol class Concurso: Primer puesto: Ganador/a del Primer puesto en un concurso - Issue reason: Acceso a datos Cobol vía web 
Última Actividad 30.09.2026 19:12
Posts Posts: 365
Likes enviados Enviados: 252
Likes recibidos Recibidos: 243

Hola , estoy implementado Arrastrar y soltar archivos (Drag and Drop) sin procedure-pointer
obteniendo la direccion de la funcion , la consulta cual seria la mejor forma de atrapar el nombre del archivo arrastrado , lo estoy haciendo con un cmtimer
pero no se si es la forma correcta
Código COBOL:
  1.  ENVIRONMENT     DIVISION.
  2.  DATA            DIVISION.
  3.  WORKING-STORAGE SECTION.
  4.  01  wsHwnd         pic s9(9) comp-5.
  5.  01  newWndProc     pic s9(9) comp-5.
  6.  01  OldWndProc     external pic s9(9) comp-5.
  7.  01  GWLP-WNDPROC   pic s9(9) comp-5 value -4.
  8.  01  hModule        pic s9(9) comp-5.
  9.  
  10.  PROCEDURE       DIVISION.      
  11.    
  12.                                                      
  13.                                                      
  14.                                                      
  15.      move "hwnd" of pow-self to wsHwnd.
  16.      move wsHwnd to  "Text" OF CmText1        
  17.  
  18.      call "GetModuleHandleA" with stdcall using by value 0 returning hModule
  19. *    DISPLAY "hModule: " , hModule.          
  20.      call "GetProcAddress" with stdcall using by value hModule
  21.                                               by content "_ProcDragFile@16" & X"00"
  22.                                               returning newWndProc.
  23.      
y la imagen con
Código COBOL:
  1.  01 EXP-FILE-NAME              PIC X(250) GLOBAL EXTERNAL. *> Retorno del Procedimiento    
  2.     *cmtimer*
  3.      IF EXP-FILE-NAME NOT = SPACES THEN
  4. *         display "Fichero TIMER: " EXP-FILE-NAME        
  5.           MOVE EXP-FILE-NAME TO "ImageName" OF CmImage1
  6.       END-IF.  
Saludos ....
fastpho is offline   Responder Con Cita