topic
stringlengths
1
63
text
stringlengths
1
577k
opos drivers for cash drawers mage strip readers printers
[img:1px2tavn]http://www.atzwanger.com/fw/dsp800.jpg[/img:1px2tavn]
opos drivers for cash drawers mage strip readers printers
Thanks Otto for all of your examples. What I am actually looking for is a way to interface to OPOS and UPOS com objects. OPOS and UPOS are Point-Of-Sale device standards this means that you can implement a function to open a cash drawer use the OPOS commands and now your application supports all cash drawers that have an OPOS or UPOS interface. Just think of how great it would be to interface to the OPOS Printer interface and instantly support all receipt printers. Currently the supported devices are- POS Keyboard POS Printer Cash Changer Tone Indicator Bump Bar Fiscal Printer Pin Pad Remote Order Display Scale Power Reporting Credit Authorization Terminal Point Card Reader/Writer Line Display Check Scanner Smart Card Reader/Writer Biometrics Bill Acceptor Bill Dispenser Coin Acceptor Image Scanner You can read about OPOS at <!-- m --><a class="postlink" href="http://www.monroecs.com/oposreleases.htm">http://www.monroecs.com/oposreleases.htm</a><!-- m --> And UPOS at <!-- m --><a class="postlink" href="http://www.monroecs.com/unifiedpos.htm">http://www.monroecs.com/unifiedpos.htm</a><!-- m --> Here is what I have tried for cash drawer. Procedure Opendrawer(oWnd,dr) hie:=TActiveX():New( oWnd,"OPOS.CashDrawer" ) if dr = 1 hie:do("Open","cdrwr1") //cdrwr1 is the name that was set for drawer 1 in the OPOS interface else hie:do("Open","cdrwr2") //cdrwr2 is the name that was set for drawer 2 in the OPOS interface endif hie:do("ClaimDevice",1000) hie:do("DeviceEnabled",.t.) hie:do("OpenDrawer") hie:do("WaitForDrawerClose",10000,2000,100,1000) hie:do("ReleaseDevice") hie:do("Close") Currently the above code executes properly on a Panasonic pos station and errors on a Partner Tec pos station.
opos drivers for cash drawers mage strip readers printers
Thank you for the information. Didn't knew of this driver. Regards, Otto
opos drivers for cash drawers mage strip readers printers
Mike, >Currently the above code executes properly on a Panasonic pos station and errors on a Partner Tec pos station. What statement does it error out on? What is the error? James
opposite of HB_FUNC( REGISTERDRAGDROP ) ?
hi, Fivewin can use REGISTERDRAGDROP() to use App "as Target" where i can drop to i´m searching how to use App "as Source" to drag Data to "external" App, how <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
opposite of HB_FUNC( REGISTERDRAGDROP ) ?
Dear Jimmy, Is this what you are looking for ? [code=fw:1jo6uxu2]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <windows.h><br /><span style="color: #00D7D7;">#include</span> <ole2.h><br /><span style="color: #00D7D7;">#include</span> <shlobj.h><br /><br /><span style="color: #B900B9;">// Definir una estructura para almacenar los datos del destino de arrastre</span><br />typedef struct <span style="color: #000000;">&#123;</span><br />  IDropTargetVtbl *lpVtbl; <span style="color: #B900B9;">// Puntero a la tabla de funciones virtuales</span><br />  DWORD refCount; <span style="color: #B900B9;">// Contador de referencias</span><br />  HWND hwnd; <span style="color: #B900B9;">// Control de ventana asociado al destino de arrastre</span><br />  BOOL isOver; <span style="color: #B900B9;">// Indica si el cursor está sobre el destino de arrastre</span><br />  BOOL allowDrop; <span style="color: #B900B9;">// Indica si se permite soltar el objeto</span><br />  IDataObject *dataObject; <span style="color: #B900B9;">// Puntero al objeto de datos arrastrado</span><br /><span style="color: #000000;">&#125;</span> DropTarget;<br /><br /><span style="color: #B900B9;">// Definir las funciones de la interfaz IDropTarget</span><br />HRESULT STDMETHODCALLTYPE QueryInterface <span style="color: #000000;">&#40;</span>IDropTarget *, REFIID, void **<span style="color: #000000;">&#41;</span>;<br />ULONG STDMETHODCALLTYPE AddRef <span style="color: #000000;">&#40;</span>IDropTarget *<span style="color: #000000;">&#41;</span>;<br />ULONG STDMETHODCALLTYPE <span style="color: #0000ff;">Release</span> <span style="color: #000000;">&#40;</span>IDropTarget *<span style="color: #000000;">&#41;</span>;<br />HRESULT STDMETHODCALLTYPE DragEnter <span style="color: #000000;">&#40;</span>IDropTarget *, IDataObject *, DWORD, POINTL, DWORD *<span style="color: #000000;">&#41;</span>;<br />HRESULT STDMETHODCALLTYPE DragOver <span style="color: #000000;">&#40;</span>IDropTarget *, DWORD, POINTL, DWORD *<span style="color: #000000;">&#41;</span>;<br />HRESULT STDMETHODCALLTYPE DragLeave <span style="color: #000000;">&#40;</span>IDropTarget *<span style="color: #000000;">&#41;</span>;<br />HRESULT STDMETHODCALLTYPE Drop <span style="color: #000000;">&#40;</span>IDropTarget *, IDataObject *, DWORD, POINTL, DWORD *<span style="color: #000000;">&#41;</span>;<br /><br /><span style="color: #B900B9;">// Crear la tabla de funciones virtuales</span><br /><span style="color: #00C800;">static</span> IDropTargetVtbl dropTargetVtbl = <span style="color: #000000;">&#123;</span><br />  QueryInterface,<br />  AddRef,<br />  <span style="color: #0000ff;">Release</span>,<br />  DragEnter,<br />  DragOver,<br />  DragLeave,<br />  Drop<br /><span style="color: #000000;">&#125;</span>;<br /><br /><span style="color: #B900B9;">// Crear una instancia de la interfaz IDropTarget</span><br />DropTarget *CreateDropTarget <span style="color: #000000;">&#40;</span>HWND hwnd<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />  DropTarget *dropTarget = <span style="color: #000000;">&#40;</span>DropTarget *<span style="color: #000000;">&#41;</span> GlobalAlloc <span style="color: #000000;">&#40;</span>GMEM_FIXED, sizeof <span style="color: #000000;">&#40;</span>DropTarget<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;<br />  dropTarget->lpVtbl = &dropTargetVtbl;<br />  dropTarget->refCount = <span style="color: #000000;">1</span>;<br />  dropTarget->hwnd = hwnd;<br />  dropTarget->isOver = <span style="color: #00C800;">FALSE</span>;<br />  dropTarget->allowDrop = <span style="color: #00C800;">FALSE</span>;<br />  dropTarget->dataObject = <span style="color: #00C800;">NULL</span>;<br />  <span style="color: #00C800;">return</span> dropTarget;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">// Implementar la función QueryInterface</span><br />HRESULT STDMETHODCALLTYPE QueryInterface <span style="color: #000000;">&#40;</span>IDropTarget *this, REFIID riid, void **ppvObject<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />  <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span>IsEqualIID <span style="color: #000000;">&#40;</span>riid, &IID_IUnknown<span style="color: #000000;">&#41;</span> || IsEqualIID <span style="color: #000000;">&#40;</span>riid, &IID_IDropTarget<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />    this->lpVtbl->AddRef <span style="color: #000000;">&#40;</span>this<span style="color: #000000;">&#41;</span>;<br />    *ppvObject = this;<br />    <span style="color: #00C800;">return</span> S_OK;<br />  <span style="color: #000000;">&#125;</span><br />  <span style="color: #00C800;">else</span> <span style="color: #000000;">&#123;</span><br />    *ppvObject = <span style="color: #00C800;">NULL</span>;<br />    <span style="color: #00C800;">return</span> E_NOINTERFACE;<br />  <span style="color: #000000;">&#125;</span><br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">// Implementar la función AddRef</span><br />ULONG STDMETHODCALLTYPE AddRef <span style="color: #000000;">&#40;</span>IDropTarget *this<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />  <span style="color: #00C800;">return</span> InterlockedIncrement <span style="color: #000000;">&#40;</span>&<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>DropTarget *<span style="color: #000000;">&#41;</span> this<span style="color: #000000;">&#41;</span>->refCount<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">// Implementar la función Release</span><br />ULONG STDMETHODCALLTYPE <span style="color: #0000ff;">Release</span> <span style="color: #000000;">&#40;</span>IDropTarget *this<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />  ULONG refCount = InterlockedDecrement <span style="color: #000000;">&#40;</span>&<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>DropTarget *<span style="color: #000000;">&#41;</span> this<span style="color: #000000;">&#41;</span>->refCount<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;<br />  <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span>refCount == <span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />    GlobalFree <span style="color: #000000;">&#40;</span>this<span style="color: #000000;">&#41;</span>;<br />    <span style="color: #00C800;">return</span> <span style="color: #000000;">0</span>;<br />  <span style="color: #000000;">&#125;</span><br />  <span style="color: #00C800;">else</span> <span style="color: #000000;">&#123;</span><br />    <span style="color: #00C800;">return</span> refCount;<br />  <span style="color: #000000;">&#125;</span><br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">// Implementar la función DragEnter</span><br />HRESULT STDMETHODCALLTYPE DragEnter <span style="color: #000000;">&#40;</span>IDropTarget *this, IDataObject *pDataObject, DWORD grfKeyState, POINTL <span style="color: #0000ff;">pt</span>, DWORD *pdwEffect<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />  <span style="color: #B900B9;">// Comprobar si el objeto de datos contiene archivos</span><br />  FORMATETC formatEtc;<br />  formatEtc.cfFormat = CF_HDROP;<br />  formatEtc.ptd = <span style="color: #00C800;">NULL</span>;<br />  formatEtc.dwAspect = DVASPECT_CONTENT;<br />  formatEtc.lindex = <span style="color: #000000;">-1</span>;<br />  formatEtc.tymed = TYMED_HGLOBAL;<br />  HRESULT hr = pDataObject->lpVtbl->QueryGetData <span style="color: #000000;">&#40;</span>pDataObject, &formatEtc<span style="color: #000000;">&#41;</span>;<br />  <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span>hr == S_OK<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />    <span style="color: #B900B9;">// Guardar una referencia al objeto de datos</span><br />    <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>DropTarget *<span style="color: #000000;">&#41;</span> this<span style="color: #000000;">&#41;</span>->dataObject = pDataObject;<br />    pDataObject->lpVtbl->AddRef <span style="color: #000000;">&#40;</span>pDataObject<span style="color: #000000;">&#41;</span>;<br />    <span style="color: #B900B9;">// Indicar que el cursor está sobre el destino de arrastre</span><br />    <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>DropTarget *<span style="color: #000000;">&#41;</span> this<span style="color: #000000;">&#41;</span>->isOver = <span style="color: #00C800;">TRUE</span>;<br />    <span style="color: #B900B9;">// Indicar que se permite soltar el objeto</span><br />    <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>DropTarget *<span style="color: #000000;">&#41;</span> this<span style="color: #000000;">&#41;</span>->allowDrop = <span style="color: #00C800;">TRUE</span>;<br />    <span style="color: #B900B9;">// Establecer el efecto de la operación</span><br />    *pdwEffect = DROPEFFECT_COPY;<br />  <span style="color: #000000;">&#125;</span><br />  <span style="color: #00C800;">else</span> <span style="color: #000000;">&#123;</span><br />    <span style="color: #B900B9;">// Indicar que no se permite soltar el objeto</span><br />    <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>DropTarget *<span style="color: #000000;">&#41;</span> this<span style="color: #000000;">&#41;</span>->allowDrop = <span style="color: #00C800;">FALSE</span>;<br />    <span style="color: #B900B9;">// Establecer el efecto de la operación</span><br />    *pdwEffect = DROPEFFECT_NONE;<br />  <span style="color: #000000;">&#125;</span><br />  <span style="color: #00C800;">return</span> S_OK;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">// Implementar la función DragOver</span><br />HRESULT STDMETHODCALLTYPE DragOver <span style="color: #000000;">&#40;</span>IDropTarget *this, DWORD grfKeyState, POINTL <span style="color: #0000ff;">pt</span>, DWORD *pdwEffect<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />  <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>DropTarget *<span style="color: #000000;">&#41;</span> this<span style="color: #000000;">&#41;</span>->isOver<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />    <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>DropTarget *<span style="color: #000000;">&#41;</span> this<span style="color: #000000;">&#41;</span>->allowDrop<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />      <span style="color: #B900B9;">// Establecer el efecto de la operación</span><br />      *pdwEffect = DROPEFFECT_COPY;<br />    <span style="color: #000000;">&#125;</span><br />    <span style="color: #00C800;">else</span> <span style="color: #000000;">&#123;</span><br />      <span style="color: #B900B9;">// Establecer el efecto de la operación</span><br />      *pdwEffect = DROPEFFECT_NONE;<br />    <span style="color: #000000;">&#125;</span><br />  <span style="color: #000000;">&#125;</span><br />  <span style="color: #00C800;">return</span> S_OK;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">// Implementar la función DragLeave</span><br />HRESULT STDMETHODCALLTYPE DragLeave <span style="color: #000000;">&#40;</span>IDropTarget *this<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />  <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>DropTarget *<span style="color: #000000;">&#41;</span> this<span style="color: #000000;">&#41;</span>->isOver<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />    <span style="color: #B900B9;">// Liberar la referencia al objeto de datos</span><br />    <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>DropTarget *<span style="color: #000000;">&#41;</span> this<span style="color: #000000;">&#41;</span>->dataObject->lpVtbl->Release <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>DropTarget *<span style="color: #000000;">&#41;</span> this<span style="color: #000000;">&#41;</span>->dataObject<span style="color: #000000;">&#41;</span>;<br />    <span style="color: #B900B9;">// Indicar que el cursor ha salido del destino de arrastre</span><br />    <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>DropTarget *<span style="color: #000000;">&#41;</span> this<span style="color: #000000;">&#41;</span>->isOver = <span style="color: #00C800;">FALSE</span>;<br />  <span style="color: #000000;">&#125;</span><br />  <span style="color: #00C800;">return</span> S_OK;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">// Implementar la función Drop</span><br />HRESULT STDMETHODCALLTYPE Drop <span style="color: #000000;">&#40;</span>IDropTarget *this, IDataObject *pDataObject, DWORD grfKeyState, POINTL <span style="color: #0000ff;">pt</span>, DWORD *pdwEffect<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />  <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>DropTarget *<span style="color: #000000;">&#41;</span> this<span style="color: #000000;">&#41;</span>->isOver<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />    <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>DropTarget *<span style="color: #000000;">&#41;</span> this<span style="color: #000000;">&#41;</span>->allowDrop<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />      <span style="color: #B900B9;">// Obtener los nombres de los archivos arrastrados</span><br />      FORMATETC formatEtc;<br />      formatEtc.cfFormat = CF_HDROP;<br />      formatEtc.ptd = <span style="color: #00C800;">NULL</span>;<br />      formatEtc.dwAspect = DVASPECT_CONTENT;<br />      formatEtc.lindex = <span style="color: #000000;">-1</span>;<br />      formatEtc.tymed = TYMED_HGLOBAL;<br />      STGMEDIUM storageMedium;<br />      HRESULT hr = pDataObject->lpVtbl->GetData <span style="color: #000000;">&#40;</span>pDataObject, &formatEtc, &storageMedium<span style="color: #000000;">&#41;</span>;<br />      <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span>SUCCEEDED <span style="color: #000000;">&#40;</span>hr<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />        HDROP hDrop = <span style="color: #000000;">&#40;</span>HDROP<span style="color: #000000;">&#41;</span> GlobalLock <span style="color: #000000;">&#40;</span>storageMedium.hGlobal<span style="color: #000000;">&#41;</span>;<br />        <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span>hDrop != <span style="color: #00C800;">NULL</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />          UINT fileCount = DragQueryFile <span style="color: #000000;">&#40;</span>hDrop, 0xFFFFFFFF, <span style="color: #00C800;">NULL</span>, <span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>;<br />          <span style="color: #00C800;">for</span> <span style="color: #000000;">&#40;</span>UINT i = <span style="color: #000000;">0</span>; i < fileCount; i++<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />            TCHAR fileName<span style="color: #000000;">&#91;</span>MAX_PATH<span style="color: #000000;">&#93;</span>;<br />            <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span>DragQueryFile <span style="color: #000000;">&#40;</span>hDrop, i, fileName, MAX_PATH<span style="color: #000000;">&#41;</span> > <span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />              <span style="color: #B900B9;">// Hacer algo con el nombre del archivo</span><br />              MessageBox <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>DropTarget *<span style="color: #000000;">&#41;</span> this<span style="color: #000000;">&#41;</span>->hwnd, fileName, <span style="color: #0000ff;">TEXT</span> <span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Archivo arrastrado"</span><span style="color: #000000;">&#41;</span>, MB_OK<span style="color: #000000;">&#41;</span>;<br />            <span style="color: #000000;">&#125;</span><br />          <span style="color: #000000;">&#125;</span><br />          GlobalUnlock <span style="color: #000000;">&#40;</span>storageMedium.hGlobal<span style="color: #000000;">&#41;</span>;<br />          DragFinish <span style="color: #000000;">&#40;</span>hDrop<span style="color: #000000;">&#41;</span>;<br />        <span style="color: #000000;">&#125;</span><br />        ReleaseStgMedium <span style="color: #000000;">&#40;</span>&storageMedium<span style="color: #000000;">&#41;</span>;<br />      <span style="color: #000000;">&#125;</span><br />      <span style="color: #B900B9;">// Establecer el efecto de la operación</span><br />      *pdwEffect = DROPEFFECT_COPY;<br />    <span style="color: #000000;">&#125;</span><br />    <span style="color: #00C800;">else</span> <span style="color: #000000;">&#123;</span><br />      <span style="color: #B900B9;">// Establecer el efecto de la operación</span><br />      *pdwEffect = DROPEFFECT_NONE;<br />    <span style="color: #000000;">&#125;</span><br />    <span style="color: #B900B9;">// Liberar la referencia al objeto de datos</span><br />    <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>DropTarget *<span style="color: #000000;">&#41;</span> this<span style="color: #000000;">&#41;</span>->dataObject->lpVtbl->Release <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>DropTarget *<span style="color: #000000;">&#41;</span> this<span style="color: #000000;">&#41;</span>->dataObject<span style="color: #000000;">&#41;</span>;<br />    <span style="color: #B900B9;">// Indicar que el cursor ha salido del destino de arrastre</span><br />    <span style="color: #000000;">&#40;</span></div>[/code:1jo6uxu2]
opposite of HB_FUNC( REGISTERDRAGDROP ) ?
hi Antonio, thx for Answer it seems me that Sample is to react on DragEnter DragOver DragLeave Drop to receive in "my App" when use "as Target" but i like to Dragdrop Data from "my App" and send to external App e.g. Picture to Outlook Email --- i have read at <!-- m --><a class="postlink" href="https://www.catch22.net/tuts/ole/">https://www.catch22.net/tuts/ole/</a><!-- m --> about OLE Dragdrop and play with samples\imgdrop.prg it use source\winapi\dropfile.c where i found HB_FUNC( REGISTERDRAGDROP ) now i want to register "my App" for Dragdrop "as Source", how <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
opposite of HB_FUNC( REGISTERDRAGDROP ) ?
hi how can i use this [url:fnys2z89]https&#58;//www&#46;catch22&#46;net/assets/tuts/zips/dropsource&#46;zip[/url:fnys2z89] *.CPP CODE with harbour <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
opposite of HB_FUNC( REGISTERDRAGDROP ) ?
Dear Jimmy, As a first approach I have taken all C++ code out of main.c (previously main.cpp) and created a new file builddrop.cpp This way we can simply compile the cpp files and use them from Harbour. I am building it from Visual Studio and it properly builds <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> Next is to properly use it from FWH and Harbour: main.c [code=fw:34ofasvm]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//&nbsp; MAIN.CPP</span><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//&nbsp; DragSource </span><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//&nbsp; Freeware written by J Brown 2004</span><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//&nbsp; <!-- w --><a class="postlink" href="http://www.catch22.net">www.catch22.net</a><!-- w --></span><br /><span style="color: #B900B9;">//</span><br /><br /><span style="color: #00D7D7;">#define</span> STRICT<br /><br /><span style="color: #00D7D7;">#include</span> <windows.h><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"resource.h"</span><br /><br /><span style="color: #00D7D7;">#define</span> APPNAME <span style="color: #ff0000;">"IDropSource"</span><br /><br /><span style="color: #00D7D7;">#pragma</span> comment<span style="color: #000000;">&#40;</span>linker, <span style="color: #ff0000;">"/OPT:NOWIN98"</span><span style="color: #000000;">&#41;</span><br /><br />void BuildDrop<span style="color: #000000;">&#40;</span>HWND, BOOL *, BOOL * <span style="color: #000000;">&#41;</span>;<br /><br />HWND&nbsp; &nbsp; &nbsp; &nbsp; hwndMain;<br />HWND&nbsp; &nbsp; &nbsp; &nbsp; hwndEdit;<br />HINSTANCE&nbsp; &nbsp;hInstance;<br /><br />WNDPROC&nbsp;&nbsp; &nbsp; OldEditWndProc;<br /><br />HRESULT CreateDropSource<span style="color: #000000;">&#40;</span>IDropSource **ppDropSource<span style="color: #000000;">&#41;</span>;<br />HRESULT CreateDataObject<span style="color: #000000;">&#40;</span>FORMATETC *fmtetc, STGMEDIUM *stgmeds, UINT <span style="color: #0000ff;">count</span>, IDataObject **ppDataObject<span style="color: #000000;">&#41;</span>;<br /><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//&nbsp; Is the mouse cursor within the edit control's selected text?</span><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//&nbsp; Return TRUE/FALSE </span><br /><span style="color: #B900B9;">//</span><br />BOOL MouseInSelection<span style="color: #000000;">&#40;</span>HWND hwndEdit, LPARAM MouseMsgParam<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; DWORD nSelStart;<br />&nbsp; &nbsp; DWORD nSelEnd;<br /><br />&nbsp; &nbsp; <span style="color: #B900B9;">// get the selection inside the edit control</span><br />&nbsp; &nbsp; SendMessage<span style="color: #000000;">&#40;</span>hwndEdit, EM_GETSEL, <span style="color: #000000;">&#40;</span>WPARAM<span style="color: #000000;">&#41;</span>&nSelStart, <span style="color: #000000;">&#40;</span>LPARAM<span style="color: #000000;">&#41;</span>&nSelEnd<span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>nSelStart != nSelEnd<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; DWORD nCurPos;<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// Get the cursor position the mouse has clicked on</span><br />&nbsp; &nbsp; &nbsp; &nbsp; nCurPos = SendMessage<span style="color: #000000;">&#40;</span>hwndEdit, EM_CHARFROMPOS, <span style="color: #000000;">0</span>, MouseMsgParam<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; nCurPos = LOWORD<span style="color: #000000;">&#40;</span>nCurPos<span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// Did the mouse click inside the active selection?</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> <span style="color: #000000;">&#40;</span>nCurPos >= nSelStart && nCurPos < nSelEnd<span style="color: #000000;">&#41;</span> ? <span style="color: #00C800;">TRUE</span> : <span style="color: #00C800;">FALSE</span>;<br />&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">return</span> <span style="color: #00C800;">FALSE</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//&nbsp; Remove any selection from the edit control</span><br /><span style="color: #B900B9;">//</span><br />void ClearSelection<span style="color: #000000;">&#40;</span>HWND hwndEdit<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; SendMessage<span style="color: #000000;">&#40;</span>hwndEdit, EM_SETSEL, <span style="color: #000000;">-1</span>, <span style="color: #000000;">-1</span><span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//&nbsp; Copy selected text to a HGLOBAL and return it</span><br /><span style="color: #B900B9;">//</span><br />HGLOBAL CopySelection<span style="color: #000000;">&#40;</span>HWND hwndEdit<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; DWORD &nbsp; nSelStart, nSelEnd;<br />&nbsp; &nbsp; DWORD &nbsp; nSelLength, nEditLength;<br />&nbsp; &nbsp; HGLOBAL hMem;<br />&nbsp; &nbsp; char &nbsp; *ptr;<br />&nbsp; &nbsp; char &nbsp; *tmp;<br /><br />&nbsp; &nbsp; SendMessage<span style="color: #000000;">&#40;</span>hwndEdit, EM_GETSEL, <span style="color: #000000;">&#40;</span>WPARAM<span style="color: #000000;">&#41;</span>&nSelStart, <span style="color: #000000;">&#40;</span>LPARAM<span style="color: #000000;">&#41;</span>&nSelEnd<span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; nSelLength = nSelEnd - nSelStart;<br /><br />&nbsp; &nbsp; <span style="color: #B900B9;">// get the entire contents of the control</span><br />&nbsp; &nbsp; nEditLength = SendMessage<span style="color: #000000;">&#40;</span>hwndEdit, EM_GETLIMITTEXT, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; tmp &nbsp;= <span style="color: #000000;">&#40;</span>char *<span style="color: #000000;">&#41;</span>malloc<span style="color: #000000;">&#40;</span>nEditLength<span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; SendMessage<span style="color: #000000;">&#40;</span>hwndEdit, WM_GETTEXT, nEditLength, <span style="color: #000000;">&#40;</span>LPARAM<span style="color: #000000;">&#41;</span>tmp<span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; hMem = GlobalAlloc<span style="color: #000000;">&#40;</span>GHND, nSelLength<span style="color: #000000;">+1</span><span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; ptr &nbsp;= <span style="color: #000000;">&#40;</span>char *<span style="color: #000000;">&#41;</span>GlobalLock<span style="color: #000000;">&#40;</span>hMem<span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; <span style="color: #B900B9;">// copy the selected text and nul-terminate</span><br />&nbsp; &nbsp; memcpy<span style="color: #000000;">&#40;</span>ptr, tmp+nSelStart, nSelLength<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; ptr<span style="color: #000000;">&#91;</span>nSelLength<span style="color: #000000;">&#93;</span> = <span style="color: #ff0000;">'<span style="color: #000000;">\0</span>'</span>;<br /><br />&nbsp; &nbsp; GlobalUnlock<span style="color: #000000;">&#40;</span>hMem<span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; free<span style="color: #000000;">&#40;</span>tmp<span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; <span style="color: #00C800;">return</span> hMem;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//&nbsp; Subclass window-procedure for EDIT control</span><br /><span style="color: #B900B9;">//</span><br />LRESULT CALLBACK EditWndProc<span style="color: #000000;">&#40;</span>HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">static</span> BOOL &nbsp;fMouseDown &nbsp; = <span style="color: #00C800;">FALSE</span>;<br />&nbsp; &nbsp; <span style="color: #00C800;">static</span> BOOL &nbsp;fDidDragDrop = <span style="color: #00C800;">FALSE</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; <span style="color: #00C800;">switch</span><span style="color: #000000;">&#40;</span>msg<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">case</span> WM_KEYDOWN:<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// when ESCAPE is pressed clear the current selection</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>wParam == VK_ESCAPE<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ClearSelection<span style="color: #000000;">&#40;</span>hwnd<span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">break</span>;<br /><br />&nbsp; &nbsp; <span style="color: #00C800;">case</span> WM_LBUTTONDOWN:<br />&nbsp; &nbsp; <span style="color: #00C800;">case</span> WM_LBUTTONDBLCLK:<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// if the mouse is pressed when it is over a selection,</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// then start a drag-drop as soon as the mouse moves next</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>MouseInSelection<span style="color: #000000;">&#40;</span>hwndEdit, lParam<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fMouseDown = <span style="color: #00C800;">TRUE</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fDidDragDrop = <span style="color: #00C800;">FALSE</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SetCapture<span style="color: #000000;">&#40;</span>hwnd<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> <span style="color: #000000;">0</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">break</span>;<br /><br />&nbsp; &nbsp; <span style="color: #00C800;">case</span> WM_SETCURSOR:<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// set the mouse cursor to an ARROW when it intersects the</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// current selection, or the default IBEAM otherwise</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>HWND<span style="color: #000000;">&#41;</span>wParam == hwnd<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; POINT <span style="color: #0000ff;">pt</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GetCursorPos<span style="color: #000000;">&#40;</span>&pt<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ScreenToClient<span style="color: #000000;">&#40;</span>hwndEdit, &pt<span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>MouseInSelection<span style="color: #000000;">&#40;</span>hwndEdit, MAKELPARAM<span style="color: #000000;">&#40;</span><span style="color: #0000ff;">pt</span>.x, <span style="color: #0000ff;">pt</span>.y<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SetCursor<span style="color: #000000;">&#40;</span>LoadCursor<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span>, MAKEINTRESOURCE<span style="color: #000000;">&#40;</span>IDC_ARROW<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SetCursor<span style="color: #000000;">&#40;</span>LoadCursor<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span>, MAKEINTRESOURCE<span style="color: #000000;">&#40;</span>IDC_IBEAM<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> <span style="color: #00C800;">TRUE</span>;<br /><br />&nbsp; &nbsp; <span style="color: #00C800;">case</span> WM_MOUSEMOVE:<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// if the mouse is held down then start a drag-drop</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>fMouseDown<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BuildDrop<span style="color: #000000;">&#40;</span> hwndEdit, &fMouseDown, &fDidDragDrop <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">break</span>;<br /><br />&nbsp; &nbsp; <span style="color: #00C800;">case</span> WM_LBUTTONUP:<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// stop drag-drop from happening when the mouse is released.</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>fMouseDown<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ReleaseCapture<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fMouseDown = <span style="color: #00C800;">FALSE</span>;<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>fDidDragDrop == <span style="color: #00C800;">FALSE</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ClearSelection<span style="color: #000000;">&#40;</span>hwnd<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">break</span>;<br />&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">return</span> CallWindowProc<span style="color: #000000;">&#40;</span>OldEditWndProc, hwnd, msg, wParam, lParam<span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//&nbsp; Main Window message handler</span><br /><span style="color: #B900B9;">//</span><br />LRESULT CALLBACK WndProc<span style="color: #000000;">&#40;</span>HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">switch</span><span style="color: #000000;">&#40;</span>msg<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">case</span> WM_CREATE:<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// create a child-window EDIT control</span><br />&nbsp; &nbsp; &nbsp; &nbsp; hwndEdit = CreateWindowEx<span style="color: #000000;">&#40;</span>WS_EX_CLIENTEDGE, <span style="color: #ff0000;">"EDIT"</span>, <span style="color: #ff0000;">""</span>,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WS_CHILD|WS_VISIBLE|ES_MULTILINE|ES_WANTRETURN|WS_VSCROLL,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>, hwnd, <span style="color: #000000;">0</span>, hInstance, <span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// fixed-width font</span><br />&nbsp; &nbsp; &nbsp; &nbsp; SendMessage<span style="color: #000000;">&#40;</span>hwndEdit, WM_SETFONT, <span style="color: #000000;">&#40;</span>WPARAM<span style="color: #000000;">&#41;</span>GetStockObject<span style="color: #000000;">&#40;</span>ANSI_FIXED_FONT<span style="color: #000000;">&#41;</span>, <span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// subclass the edit control so we can add drag+drop support to it</span><br />&nbsp; &nbsp; &nbsp; &nbsp; OldEditWndProc = <span style="color: #000000;">&#40;</span>WNDPROC<span style="color: #000000;">&#41;</span>SetWindowLong<span style="color: #000000;">&#40;</span>hwndEdit, GWL_WNDPROC, <span style="color: #000000;">&#40;</span>LONG<span style="color: #000000;">&#41;</span>EditWndProc<span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; SetFocus<span style="color: #000000;">&#40;</span>hwndEdit<span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> <span style="color: #00C800;">TRUE</span>;<br /><br />&nbsp; &nbsp; <span style="color: #00C800;">case</span> WM_COMMAND:<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// react to menu messages</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">switch</span><span style="color: #000000;">&#40;</span>LOWORD<span style="color: #000000;">&#40;</span>wParam<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> IDM_FILE_EXIT:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">CloseWindow</span><span style="color: #000000;">&#40;</span>hwnd<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> <span style="color: #000000;">0</span>;<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> IDM_FILE_ABOUT&#<span style="color: #000000;">058</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MessageBox<span style="color: #000000;">&#40;</span>hwnd, <span style="color: #ff0000;">"IDropSource Test Application<span style="color: #000000;">\r</span><span style="color: #000000;">\n</span><span style="color: #000000;">\r</span><span style="color: #000000;">\n</span>"</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"Copyright(c) 2004 by Catch22 Productions<span style="color: #000000;">\t</span><span style="color: #000000;">\r</span><span style="color: #000000;">\n</span>"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"Written by J Brown.<span style="color: #000000;">\r</span><span style="color: #000000;">\n</span><span style="color: #000000;">\r</span><span style="color: #000000;">\n</span>"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"Homepage at <!-- w --><a class="postlink" href="http://www.catch22.net">www.catch22.net</a><!-- w -->"</span>, APPNAME, MB_ICONINFORMATION<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> <span style="color: #000000;">0</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">break</span>;<br />&nbsp; &nbsp; <span style="color: #00C800;">case</span> WM_CLOSE:<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// shut program down</span><br />&nbsp; &nbsp; &nbsp; &nbsp; DestroyWindow<span style="color: #000000;">&#40;</span>hwnd<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; PostQuitMessage<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> <span style="color: #000000;">0</span>;<br /><br />&nbsp; &nbsp; <span style="color: #00C800;">case</span> WM_SIZE:<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// resize editbox to fit in main window</span><br />&nbsp; &nbsp; &nbsp; &nbsp; MoveWindow<span style="color: #000000;">&#40;</span>hwndEdit, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, LOWORD<span style="color: #000000;">&#40;</span>lParam<span style="color: #000000;">&#41;</span>, HIWORD<span style="color: #000000;">&#40;</span>lParam<span style="color: #000000;">&#41;</span>, <span style="color: #00C800;">TRUE</span><span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> <span style="color: #000000;">0</span>;<br />&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">return</span> DefWindowProc<span style="color: #000000;">&#40;</span>hwnd, msg, wParam, lParam<span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br />void InitMainWnd<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; WNDCLASSEX wc = <span style="color: #000000;">&#123;</span> sizeof<span style="color: #000000;">&#40;</span>wc<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>;<br /><br />&nbsp; &nbsp; wc.lpfnWndProc &nbsp; = WndProc;<br />&nbsp; &nbsp; wc.lpszClassName = APPNAME;<br />&nbsp; &nbsp; wc.lpszMenuName &nbsp;= MAKEINTRESOURCE<span style="color: #000000;">&#40;</span>IDR_MENU1<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; wc.hInstance &nbsp; &nbsp; = hInstance;<br /><br />&nbsp; &nbsp; RegisterClassEx<span style="color: #000000;">&#40;</span>&wc<span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br />void CreateMainWnd<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; hwndMain = CreateWindowEx<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span>, APPNAME, APPNAME, <br />&nbsp; &nbsp; &nbsp; &nbsp; WS_VISIBLE|WS_OVERLAPPEDWINDOW, <br />&nbsp; &nbsp; &nbsp; &nbsp; CW_USEDEFAULT, CW_USEDEFAULT, <span style="color: #000000;">512</span>, <span style="color: #000000;">200</span>, <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>,<br />&nbsp; &nbsp; &nbsp; &nbsp; hInstance, <span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br />int WINAPI WinMain<span style="color: #000000;">&#40;</span>HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpCmdLine, int nShowCmd<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; MSG msg;<br /><br />&nbsp; &nbsp; hInstance = hInst;<br /><br />&nbsp; &nbsp; <span style="color: #B900B9;">// This program requires COM</span><br />&nbsp; &nbsp; OleInitialize<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; InitMainWnd<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; CreateMainWnd<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; <span style="color: #B900B9;">// message-pump</span><br />&nbsp; &nbsp; <span style="color: #00C800;">while</span><span style="color: #000000;">&#40;</span>GetMessage<span style="color: #000000;">&#40;</span>&msg, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; TranslateMessage<span style="color: #000000;">&#40;</span>&msg<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; DispatchMessage<span style="color: #000000;">&#40;</span>&msg<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; <span style="color: #B900B9;">// Shutdown COM</span><br />&nbsp; &nbsp; OleUninitialize<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; <span style="color: #00C800;">return</span> <span style="color: #000000;">0</span>;<br /><span style="color: #000000;">&#125;</span></div>[/code:34ofasvm] buildprop.cpp [code=fw:34ofasvm]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <windows.h><br /><br />extern <span style="color: #ff0000;">"C"</span> HGLOBAL CopySelection<span style="color: #000000;">&#40;</span>HWND hwndEdit<span style="color: #000000;">&#41;</span>;<br />HRESULT CreateDropSource<span style="color: #000000;">&#40;</span>IDropSource** ppDropSource<span style="color: #000000;">&#41;</span>;<br />HRESULT CreateDataObject<span style="color: #000000;">&#40;</span>FORMATETC* fmtetc, STGMEDIUM* stgmeds, UINT <span style="color: #0000ff;">count</span>, IDataObject** ppDataObject<span style="color: #000000;">&#41;</span>;<br /><br />extern <span style="color: #ff0000;">"C"</span> void BuildDrop<span style="color: #000000;">&#40;</span>HWND hwndEdit, BOOL * fMouseDown, BOOL * fDidDragDrop<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; IDataObject* pDataObject;<br />&nbsp; &nbsp; IDropSource* pDropSource;<br />&nbsp; &nbsp; DWORD&nbsp; &nbsp;&nbsp; &nbsp; &nbsp;dwEffect;<br />&nbsp; &nbsp; DWORD&nbsp; &nbsp;&nbsp; &nbsp; &nbsp;dwResult;<br /><br />&nbsp; &nbsp; FORMATETC fmtetc = <span style="color: #000000;">&#123;</span> CF_TEXT, <span style="color: #000000;">0</span>, DVASPECT_CONTENT, <span style="color: #000000;">-1</span>, TYMED_HGLOBAL <span style="color: #000000;">&#125;</span>;<br />&nbsp; &nbsp; STGMEDIUM stgmed = <span style="color: #000000;">&#123;</span> TYMED_HGLOBAL, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span>;<br /><br />&nbsp; &nbsp; <span style="color: #B900B9;">// transfer the current selection into the IDataObject</span><br />&nbsp; &nbsp; stgmed.hGlobal = CopySelection<span style="color: #000000;">&#40;</span>hwndEdit<span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; <span style="color: #B900B9;">// Create IDataObject and IDropSource COM objects</span><br />&nbsp; &nbsp; CreateDropSource<span style="color: #000000;">&#40;</span>&pDropSource<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; CreateDataObject<span style="color: #000000;">&#40;</span>&fmtetc, &stgmed, <span style="color: #000000;">1</span>, &pDataObject<span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; <span style="color: #B900B9;">//</span><br />&nbsp; &nbsp; <span style="color: #B900B9;">//&nbsp; ** ** ** The drag-drop operation starts here! ** ** **</span><br />&nbsp; &nbsp; <span style="color: #B900B9;">//</span><br />&nbsp; &nbsp; dwResult = DoDragDrop<span style="color: #000000;">&#40;</span>pDataObject, pDropSource, DROPEFFECT_COPY | DROPEFFECT_MOVE, &dwEffect<span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; <span style="color: #B900B9;">// success!</span><br />&nbsp; &nbsp; <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span>dwResult == DRAGDROP_S_DROP<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span>dwEffect & DROPEFFECT_MOVE<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// remove selection from edit control</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; <span style="color: #B900B9;">// cancelled</span><br />&nbsp; &nbsp; <span style="color: #00C800;">else</span> <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span>dwResult == DRAGDROP_S_CANCEL<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; pDataObject->Release<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; pDropSource->Release<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; ReleaseCapture<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; * fMouseDown = <span style="color: #00C800;">FALSE</span>;<br />&nbsp; &nbsp; * fDidDragDrop = <span style="color: #00C800;">TRUE</span>;<br /><span style="color: #000000;">&#125;</span></div>[/code:34ofasvm] dataobject.cpp [code=fw:34ofasvm]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//&nbsp; DATAOBJECT.CPP</span><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//&nbsp; Implementation of the IDataObject COM interface</span><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//&nbsp; By J Brown 2004 </span><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//&nbsp; <!-- w --><a class="postlink" href="http://www.catch22.net">www.catch22.net</a><!-- w --></span><br /><span style="color: #B900B9;">//</span><br /><br /><span style="color: #00D7D7;">#define</span> STRICT<br /><br /><span style="color: #00D7D7;">#include</span> <windows.h><br /><br /><span style="color: #B900B9;">// defined in enumformat.cpp</span><br />HRESULT CreateEnumFormatEtc<span style="color: #000000;">&#40;</span>UINT nNumFormats, FORMATETC *pFormatEtc, IEnumFORMATETC **ppEnumFormatEtc<span style="color: #000000;">&#41;</span>;<br /><br /><span style="color: #00C800;">class</span> CDataObject : <span style="color: #00C800;">public</span> IDataObject<br /><span style="color: #000000;">&#123;</span><br /><span style="color: #00C800;">public</span>:<br />&nbsp; &nbsp; <span style="color: #B900B9;">//</span><br />&nbsp; &nbsp; <span style="color: #B900B9;">// IUnknown members</span><br />&nbsp; &nbsp; <span style="color: #B900B9;">//</span><br />&nbsp; &nbsp; HRESULT __stdcall QueryInterface <span style="color: #000000;">&#40;</span>REFIID iid, void ** ppvObject<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; ULONG &nbsp; __stdcall AddRef <span style="color: #000000;">&#40;</span>void<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; ULONG &nbsp; __stdcall <span style="color: #0000ff;">Release</span> <span style="color: #000000;">&#40;</span>void<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; <span style="color: #B900B9;">//</span><br />&nbsp; &nbsp; <span style="color: #B900B9;">// IDataObject members</span><br />&nbsp; &nbsp; <span style="color: #B900B9;">//</span><br />&nbsp; &nbsp; HRESULT __stdcall GetData&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span>FORMATETC *pFormatEtc, &nbsp;STGMEDIUM *pMedium<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; HRESULT __stdcall GetDataHere&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span>FORMATETC *pFormatEtc, &nbsp;STGMEDIUM *pMedium<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; HRESULT __stdcall QueryGetData&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span>FORMATETC *pFormatEtc<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; HRESULT __stdcall GetCanonicalFormatEtc <span style="color: #000000;">&#40;</span>FORMATETC *pFormatEct, &nbsp;FORMATETC *pFormatEtcOut<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; HRESULT __stdcall SetData&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span>FORMATETC *pFormatEtc, &nbsp;STGMEDIUM *pMedium, &nbsp;BOOL fRelease<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; HRESULT __stdcall EnumFormatEtc&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span>DWORD &nbsp; &nbsp; &nbsp;dwDirection, IEnumFORMATETC **ppEnumFormatEtc<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; HRESULT __stdcall DAdvise&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span>FORMATETC *pFormatEtc, &nbsp;DWORD advf, IAdviseSink *pAdvSink, DWORD *pdwConnection<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; HRESULT __stdcall DUnadvise&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span>DWORD &nbsp; &nbsp; &nbsp;dwConnection<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; HRESULT __stdcall EnumDAdvise&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span>IEnumSTATDATA **ppEnumAdvise<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; <span style="color: #B900B9;">//</span><br />&nbsp; &nbsp; <span style="color: #B900B9;">// Constructor / Destructor</span><br />&nbsp; &nbsp; <span style="color: #B900B9;">//</span><br />&nbsp; &nbsp; CDataObject<span style="color: #000000;">&#40;</span>FORMATETC *fmt, STGMEDIUM *stgmed, int <span style="color: #0000ff;">count</span><span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; ~CDataObject<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; <br /><span style="color: #00C800;">private</span>:<br /><br />&nbsp; &nbsp; <span style="color: #000000;">int</span> LookupFormatEtc<span style="color: #000000;">&#40;</span>FORMATETC *pFormatEtc<span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; <span style="color: #B900B9;">//</span><br />&nbsp; &nbsp; <span style="color: #B900B9;">// any private members and functions</span><br />&nbsp; &nbsp; <span style="color: #B900B9;">//</span><br />&nbsp; &nbsp; LONG&nbsp; &nbsp; &nbsp; &nbsp;m_lRefCount;<br /><br />&nbsp; &nbsp; FORMATETC *m_pFormatEtc;<br />&nbsp; &nbsp; STGMEDIUM *m_pStgMedium;<br />&nbsp; &nbsp; LONG&nbsp; &nbsp; &nbsp; &nbsp;m_nNumFormats;<br /><br /><span style="color: #000000;">&#125;</span>;<br /><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//&nbsp; Constructor</span><br /><span style="color: #B900B9;">//</span><br />CDataObject::<span style="color: #000000;">CDataObject</span><span style="color: #000000;">&#40;</span>FORMATETC *fmtetc, STGMEDIUM *stgmed, int <span style="color: #0000ff;">count</span><span style="color: #000000;">&#41;</span> <br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; m_lRefCount &nbsp;= <span style="color: #000000;">1</span>;<br />&nbsp; &nbsp; m_nNumFormats = <span style="color: #0000ff;">count</span>;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; m_pFormatEtc &nbsp;= <span style="color: #00C800;">new</span> FORMATETC<span style="color: #000000;">&#91;</span><span style="color: #0000ff;">count</span><span style="color: #000000;">&#93;</span>;<br />&nbsp; &nbsp; m_pStgMedium &nbsp;= <span style="color: #00C800;">new</span> STGMEDIUM<span style="color: #000000;">&#91;</span><span style="color: #0000ff;">count</span><span style="color: #000000;">&#93;</span>;<br /><br />&nbsp; &nbsp; <span style="color: #00C800;">for</span><span style="color: #000000;">&#40;</span>int i = <span style="color: #000000;">0</span>; i < <span style="color: #0000ff;">count</span>; i++<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; m_pFormatEtc<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span> = fmtetc<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; m_pStgMedium<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span> = stgmed<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>;<br />&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//&nbsp; Destructor</span><br /><span style="color: #B900B9;">//</span><br />CDataObject::~CDataObject<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; <span style="color: #B900B9;">// cleanup</span><br />&nbsp; &nbsp; <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>m_pFormatEtc<span style="color: #000000;">&#41;</span> delete<span style="color: #000000;">&#91;</span><span style="color: #000000;">&#93;</span> m_pFormatEtc;<br />&nbsp; &nbsp; <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>m_pStgMedium<span style="color: #000000;">&#41;</span> delete<span style="color: #000000;">&#91;</span><span style="color: #000000;">&#93;</span> m_pStgMedium;<br /><br />&nbsp; &nbsp; OutputDebugString<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"oof<span style="color: #000000;">\n</span>"</span><span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//&nbsp; IUnknown::AddRef</span><br /><span style="color: #B900B9;">//</span><br />ULONG __stdcall CDataObject::<span style="color: #000000;">AddRef</span><span style="color: #000000;">&#40;</span>void<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; <span style="color: #B900B9;">// increment object reference count</span><br />&nbsp; &nbsp; <span style="color: #00C800;">return</span> InterlockedIncrement<span style="color: #000000;">&#40;</span>&m_lRefCount<span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//&nbsp; IUnknown::Release</span><br /><span style="color: #B900B9;">//</span><br />ULONG __stdcall CDataObject::<span style="color: #0000ff;">Release</span><span style="color: #000000;">&#40;</span>void<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; <span style="color: #B900B9;">// decrement object reference count</span><br />&nbsp; &nbsp; LONG <span style="color: #0000ff;">count</span> = InterlockedDecrement<span style="color: #000000;">&#40;</span>&m_lRefCount<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span><span style="color: #0000ff;">count</span> == <span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; delete this;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> <span style="color: #000000;">0</span>;<br />&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> <span style="color: #0000ff;">count</span>;<br />&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//&nbsp; IUnknown::QueryInterface</span><br /><span style="color: #B900B9;">//</span><br />HRESULT __stdcall CDataObject::<span style="color: #000000;">QueryInterface</span><span style="color: #000000;">&#40;</span>REFIID iid, void **ppvObject<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; <span style="color: #B900B9;">// check to see what interface has been requested</span><br />&nbsp; &nbsp; <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>iid == IID_IDataObject || iid == IID_IUnknown<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; AddRef<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; *ppvObject = this;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> S_OK;<br />&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; *ppvObject = <span style="color: #000000;">0</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> E_NOINTERFACE;<br />&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br /><span style="color: #000000;">&#125;</span><br /><br />HGLOBAL DupMem<span style="color: #000000;">&#40;</span>HGLOBAL hMem<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; <span style="color: #B900B9;">// lock the source memory object</span><br />&nbsp; &nbsp; DWORD &nbsp; len &nbsp; &nbsp;= GlobalSize<span style="color: #000000;">&#40;</span>hMem<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; PVOID &nbsp; source = GlobalLock<span style="color: #000000;">&#40;</span>hMem<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; <span style="color: #B900B9;">// create a fixed "global" block - i.e. just</span><br />&nbsp; &nbsp; <span style="color: #B900B9;">// a regular lump of our process heap</span><br />&nbsp; &nbsp; PVOID &nbsp; dest &nbsp; = GlobalAlloc<span style="color: #000000;">&#40;</span>GMEM_FIXED, len<span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; memcpy<span style="color: #000000;">&#40;</span>dest, source, len<span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; GlobalUnlock<span style="color: #000000;">&#40;</span>hMem<span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; <span style="color: #00C800;">return</span> dest;<br /><span style="color: #000000;">&#125;</span><br /><br />int CDataObject::<span style="color: #000000;">LookupFormatEtc</span><span style="color: #000000;">&#40;</span>FORMATETC *pFormatEtc<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">for</span><span style="color: #000000;">&#40;</span>int i = <span style="color: #000000;">0</span>; i < m_nNumFormats; i++<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>pFormatEtc->tymed &nbsp; &nbsp;& &nbsp;m_pFormatEtc<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>.tymed<span style="color: #000000;">&#41;</span> &nbsp; &&<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pFormatEtc->cfFormat == m_pFormatEtc<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>.cfFormat && <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pFormatEtc->dwAspect == m_pFormatEtc<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>.dwAspect<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> i;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">return</span> <span style="color: #000000;">-1</span>;<br /><br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//&nbsp; IDataObject::GetData</span><br /><span style="color: #B900B9;">//</span><br />HRESULT __stdcall CDataObject::<span style="color: #000000;">GetData</span> <span style="color: #000000;">&#40;</span>FORMATETC *pFormatEtc, STGMEDIUM *pMedium<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; int idx;<br /><br />&nbsp; &nbsp; <span style="color: #B900B9;">//</span><br />&nbsp; &nbsp; <span style="color: #B900B9;">// try to match the requested FORMATETC with one of our supported formats</span><br />&nbsp; &nbsp; <span style="color: #B900B9;">//</span><br />&nbsp; &nbsp; <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>idx = LookupFormatEtc<span style="color: #000000;">&#40;</span>pFormatEtc<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> == <span style="color: #000000;">-1</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> DV_E_FORMATETC;<br />&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; <span style="color: #B900B9;">//</span><br />&nbsp; &nbsp; <span style="color: #B900B9;">// found a match! transfer the data into the supplied storage-medium</span><br />&nbsp; &nbsp; <span style="color: #B900B9;">//</span><br />&nbsp; &nbsp; pMedium->tymed&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= m_pFormatEtc<span style="color: #000000;">&#91;</span>idx<span style="color: #000000;">&#93;</span>.tymed;<br />&nbsp; &nbsp; pMedium->pUnkForRelease &nbsp;= <span style="color: #000000;">0</span>;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; <span style="color: #00C800;">switch</span><span style="color: #000000;">&#40;</span>m_pFormatEtc<span style="color: #000000;">&#91;</span>idx<span style="color: #000000;">&#93;</span>.tymed<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">case</span> TYMED_HGLOBAL:<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">pMedium</span>->hGlobal = DupMem<span style="color: #000000;">&#40;</span>m_pStgMedium<span style="color: #000000;">&#91;</span>idx<span style="color: #000000;">&#93;</span>.hGlobal<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">//return S_OK;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">break</span>;<br /><br />&nbsp; &nbsp; <span style="color: #00C800;">default</span>:<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> DV_E_FORMATETC;<br />&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">return</span> S_OK;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//&nbsp; IDataObject::GetDataHere</span><br /><span style="color: #B900B9;">//</span><br />HRESULT __stdcall CDataObject::<span style="color: #000000;">GetDataHere</span> <span style="color: #000000;">&#40;</span>FORMATETC *pFormatEtc, STGMEDIUM *pMedium<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; <span style="color: #B900B9;">// GetDataHere is only required for IStream and IStorage mediums</span><br />&nbsp; &nbsp; <span style="color: #B900B9;">// It is an error to call GetDataHere for things like HGLOBAL and other clipboard formats</span><br />&nbsp; &nbsp; <span style="color: #B900B9;">//</span><br />&nbsp; &nbsp; <span style="color: #B900B9;">//&nbsp; OleFlushClipboard </span><br />&nbsp; &nbsp; <span style="color: #B900B9;">//</span><br />&nbsp; &nbsp; <span style="color: #00C800;">return</span> DATA_E_FORMATETC;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//&nbsp; IDataObject::QueryGetData</span><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//&nbsp; Called to see if the IDataObject supports the specified format of data</span><br /><span style="color: #B900B9;">//</span><br />HRESULT __stdcall CDataObject::<span style="color: #000000;">QueryGetData</span> <span style="color: #000000;">&#40;</span>FORMATETC *pFormatEtc<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">return</span> <span style="color: #000000;">&#40;</span>LookupFormatEtc<span style="color: #000000;">&#40;</span>pFormatEtc<span style="color: #000000;">&#41;</span> == <span style="color: #000000;">-1</span><span style="color: #000000;">&#41;</span> ? DV_E_FORMATETC : <span style="color: #000000;">S_OK</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//&nbsp; IDataObject::GetCanonicalFormatEtc</span><br /><span style="color: #B900B9;">//</span><br />HRESULT __stdcall CDataObject::<span style="color: #000000;">GetCanonicalFormatEtc</span> <span style="color: #000000;">&#40;</span>FORMATETC *pFormatEct, FORMATETC *pFormatEtcOut<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; <span style="color: #B900B9;">// Apparently we have to set this field to NULL even though we don't do anything else</span><br />&nbsp; &nbsp; pFormatEtcOut->ptd = <span style="color: #00C800;">NULL</span>;<br />&nbsp; &nbsp; <span style="color: #00C800;">return</span> E_NOTIMPL;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//&nbsp; IDataObject::SetData</span><br /><span style="color: #B900B9;">//</span><br />HRESULT __stdcall CDataObject::<span style="color: #000000;">SetData</span> <span style="color: #000000;">&#40;</span>FORMATETC *pFormatEtc, STGMEDIUM *pMedium, &nbsp;BOOL fRelease<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">return</span> E_NOTIMPL;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//&nbsp; IDataObject::EnumFormatEtc</span><br /><span style="color: #B900B9;">//</span><br />HRESULT __stdcall CDataObject::<span style="color: #000000;">EnumFormatEtc</span> <span style="color: #000000;">&#40;</span>DWORD dwDirection, IEnumFORMATETC **ppEnumFormatEtc<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>dwDirection == DATADIR_GET<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// for Win2k+ you can use the SHCreateStdEnumFmtEtc API call, however</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// to support all Windows platforms we need to implement IEnumFormatEtc ourselves.</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> CreateEnumFormatEtc<span style="color: #000000;">&#40;</span>m_nNumFormats, m_pFormatEtc, ppEnumFormatEtc<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// the direction specified is not support for drag+drop</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> E_NOTIMPL;<br />&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//&nbsp; IDataObject::DAdvise</span><br /><span style="color: #B900B9;">//</span><br />HRESULT __stdcall CDataObject::<span style="color: #000000;">DAdvise</span> <span style="color: #000000;">&#40;</span>FORMATETC *pFormatEtc, DWORD advf, IAdviseSink *pAdvSink, DWORD *pdwConnection<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">return</span> OLE_E_ADVISENOTSUPPORTED;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//&nbsp; IDataObject::DUnadvise</span><br /><span style="color: #B900B9;">//</span><br />HRESULT __stdcall CDataObject::<span style="color: #000000;">DUnadvise</span> <span style="color: #000000;">&#40;</span>DWORD dwConnection<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">return</span> OLE_E_ADVISENOTSUPPORTED;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//&nbsp; IDataObject::EnumDAdvise</span><br /><span style="color: #B900B9;">//</span><br />HRESULT __stdcall CDataObject::<span style="color: #000000;">EnumDAdvise</span> <span style="color: #000000;">&#40;</span>IEnumSTATDATA **ppEnumAdvise<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">return</span> OLE_E_ADVISENOTSUPPORTED;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//&nbsp; Helper function</span><br /><span style="color: #B900B9;">//</span><br />HRESULT CreateDataObject <span style="color: #000000;">&#40;</span>FORMATETC *fmtetc, STGMEDIUM *stgmeds, UINT <span style="color: #0000ff;">count</span>, IDataObject **ppDataObject<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>ppDataObject == <span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> E_INVALIDARG;<br /><br />&nbsp; &nbsp; *ppDataObject = <span style="color: #00C800;">new</span> CDataObject<span style="color: #000000;">&#40;</span>fmtetc, stgmeds, <span style="color: #0000ff;">count</span><span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; <span style="color: #00C800;">return</span> <span style="color: #000000;">&#40;</span>*ppDataObject<span style="color: #000000;">&#41;</span> ? S_OK : <span style="color: #000000;">E_OUTOFMEMORY</span>;<br /><span style="color: #000000;">&#125;</span></div>[/code:34ofasvm] dropsource.cpp [code=fw:34ofasvm]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//&nbsp; DROPSOURCE.CPP</span><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//&nbsp; Implementation of the IDropSource COM interface</span><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//&nbsp; By J Brown 2004 </span><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//&nbsp; <!-- w --><a class="postlink" href="http://www.catch22.net">www.catch22.net</a><!-- w --></span><br /><span style="color: #B900B9;">//</span><br /><br /><span style="color: #00D7D7;">#define</span> STRICT<br /><br /><span style="color: #00D7D7;">#include</span> <windows.h><br /><br /><span style="color: #00C800;">class</span> CDropSource : <span style="color: #00C800;">public</span> IDropSource<br /><span style="color: #000000;">&#123;</span><br /><span style="color: #00C800;">public</span>:<br />&nbsp; &nbsp; <span style="color: #B900B9;">//</span><br />&nbsp; &nbsp; <span style="color: #B900B9;">// IUnknown members</span><br />&nbsp; &nbsp; <span style="color: #B900B9;">//</span><br />&nbsp; &nbsp; HRESULT __stdcall QueryInterface&nbsp; &nbsp; <span style="color: #000000;">&#40;</span>REFIID iid, void ** ppvObject<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; ULONG &nbsp; __stdcall AddRef&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span>void<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; ULONG &nbsp; __stdcall <span style="color: #0000ff;">Release</span>&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span>void<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; <span style="color: #B900B9;">//</span><br />&nbsp; &nbsp; <span style="color: #B900B9;">// IDropSource members</span><br />&nbsp; &nbsp; <span style="color: #B900B9;">//</span><br />&nbsp; &nbsp; HRESULT __stdcall QueryContinueDrag&nbsp;<span style="color: #000000;">&#40;</span>BOOL fEscapePressed, DWORD grfKeyState<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; HRESULT __stdcall GiveFeedback&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span>DWORD dwEffect<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; <span style="color: #B900B9;">//</span><br />&nbsp; &nbsp; <span style="color: #B900B9;">// Constructor / Destructor</span><br />&nbsp; &nbsp; <span style="color: #B900B9;">//</span><br />&nbsp; &nbsp; CDropSource<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; ~CDropSource<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; <br /><span style="color: #00C800;">private</span>:<br /><br />&nbsp; &nbsp; <span style="color: #B900B9;">//</span><br />&nbsp; &nbsp; <span style="color: #B900B9;">// private members and functions</span><br />&nbsp; &nbsp; <span style="color: #B900B9;">//</span><br />&nbsp; &nbsp; LONG&nbsp; &nbsp; &nbsp; &nbsp;m_lRefCount;<br /><span style="color: #000000;">&#125;</span>;<br /><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//&nbsp; Constructor</span><br /><span style="color: #B900B9;">//</span><br />CDropSource::<span style="color: #000000;">CDropSource</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; m_lRefCount = <span style="color: #000000;">1</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//&nbsp; Destructor</span><br /><span style="color: #B900B9;">//</span><br />CDropSource::~CDropSource<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//&nbsp; IUnknown::AddRef</span><br /><span style="color: #B900B9;">//</span><br />ULONG __stdcall CDropSource::<span style="color: #000000;">AddRef</span><span style="color: #000000;">&#40;</span>void<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; <span style="color: #B900B9;">// increment object reference count</span><br />&nbsp; &nbsp; <span style="color: #00C800;">return</span> InterlockedIncrement<span style="color: #000000;">&#40;</span>&m_lRefCount<span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//&nbsp; IUnknown::Release</span><br /><span style="color: #B900B9;">//</span><br />ULONG __stdcall CDropSource::<span style="color: #0000ff;">Release</span><span style="color: #000000;">&#40;</span>void<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; <span style="color: #B900B9;">// decrement object reference count</span><br />&nbsp; &nbsp; LONG <span style="color: #0000ff;">count</span> = InterlockedDecrement<span style="color: #000000;">&#40;</span>&m_lRefCount<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span><span style="color: #0000ff;">count</span> == <span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; delete this;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> <span style="color: #000000;">0</span>;<br />&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> <span style="color: #0000ff;">count</span>;<br />&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//&nbsp; IUnknown::QueryInterface</span><br /><span style="color: #B900B9;">//</span><br />HRESULT __stdcall CDropSource::<span style="color: #000000;">QueryInterface</span><span style="color: #000000;">&#40;</span>REFIID iid, void **ppvObject<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; <span style="color: #B900B9;">// check to see what interface has been requested</span><br />&nbsp; &nbsp; <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>iid == IID_IDropSource || iid == IID_IUnknown<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; AddRef<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; *ppvObject = this;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> S_OK;<br />&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; *ppvObject = <span style="color: #000000;">0</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> E_NOINTERFACE;<br />&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//&nbsp; CDropSource::QueryContinueDrag</span><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//&nbsp; Called by OLE whenever Escape/Control/Shift/Mouse buttons have changed</span><br /><span style="color: #B900B9;">//</span><br />HRESULT __stdcall CDropSource::<span style="color: #000000;">QueryContinueDrag</span><span style="color: #000000;">&#40;</span>BOOL fEscapePressed, DWORD grfKeyState<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; <span style="color: #B900B9;">// if the <Escape> key has been pressed since the last call, cancel the drop</span><br />&nbsp; &nbsp; <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>fEscapePressed == <span style="color: #00C800;">TRUE</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> DRAGDROP_S_CANCEL;&nbsp; &nbsp;<br /><br />&nbsp; &nbsp; <span style="color: #B900B9;">// if the <LeftMouse> button has been released, then do the drop!</span><br />&nbsp; &nbsp; <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>grfKeyState & MK_LBUTTON<span style="color: #000000;">&#41;</span> == <span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> DRAGDROP_S_DROP;<br /><br />&nbsp; &nbsp; <span style="color: #B900B9;">// continue with the drag-drop</span><br />&nbsp; &nbsp; <span style="color: #00C800;">return</span> S_OK;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//&nbsp; CDropSource::GiveFeedback</span><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//&nbsp; Return either S_OK, or DRAGDROP_S_USEDEFAULTCURSORS to instruct OLE to use the</span><br /><span style="color: #B900B9;">// &nbsp;default mouse cursor images</span><br /><span style="color: #B900B9;">//</span><br />HRESULT __stdcall CDropSource::<span style="color: #000000;">GiveFeedback</span><span style="color: #000000;">&#40;</span>DWORD dwEffect<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">return</span> DRAGDROP_S_USEDEFAULTCURSORS;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">//&nbsp; Helper routine to create an IDropSource object</span><br /><span style="color: #B900B9;">//&nbsp; </span><br />HRESULT CreateDropSource<span style="color: #000000;">&#40;</span>IDropSource **ppDropSource<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>ppDropSource == <span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> E_INVALIDARG;<br /><br />&nbsp; &nbsp; *ppDropSource = <span style="color: #00C800;">new</span> CDropSource<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; <span style="color: #00C800;">return</span> <span style="color: #000000;">&#40;</span>*ppDropSource<span style="color: #000000;">&#41;</span> ? S_OK : <span style="color: #000000;">E_OUTOFMEMORY</span>;<br /><br /><span style="color: #000000;">&#125;</span></div>[/code:34ofasvm]
opposite of HB_FUNC( REGISTERDRAGDROP ) ?
hi Antonio, [quote="Antonio Linares":288rx757] Next is to properly use it from FWH and Harbour: [/quote:288rx757] GREAT it would be nice when include in next FWH Version
optical illusions
If I switch between the input dialog and the main window it seems as the Navy blue is changing the brightness. For me this happens only with Navy blue. Best regards, Otto [img:30knidz1]http&#58;//www&#46;atzwanger-software&#46;com/fw/navy&#46;jpg[/img:30knidz1]
optimize MySQL Server Configuration
hi, is there a Tool or Website which can help me to optimize MySQL Server Settings <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> for PostgreSQL you can use this Website [url:36hqu2w9]https&#58;//pgtune&#46;leopard&#46;in&#46;ua/[/url:36hqu2w9]
optimize MySQL Server Configuration
Jimmy Try with MySql administrator, it has that posinility. Best regards
optimize MySQL Server Configuration
hi, thx for Answer when install MySQL with "default" Setting they are not "optimize" [quote:2wdskdvy]Try with MySql administrator, it has that posinility.[/quote:2wdskdvy] i do NOT want to "optimize" Query & Co i talk about System Variable in "c:\ProgramData\MySQL\MySQL Server 8.0\my.ini" i have read about "MySQL Performance Tuning" and found e.g. these System Variable [quote:2wdskdvy] innodb_buffer_pool_size max_connection query_cache_size innodb_io_capacity innodb_log_file_size[/quote:2wdskdvy] but which Value, depend of Hardware e.g. RAM <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> the Website [url:2wdskdvy]https&#58;//pgtune&#46;leopard&#46;in&#46;ua/[/url:2wdskdvy] give you Answer for PostgreSQL i´m search for similar using MySQL
oracle: si se pierde una tabla...
hola. He creado una tabla con Oracle, con clave primaria y un disparador. Mi consulta: en el caso de que una tabla se pierda, elimine por error, etc. antes de crear la misma lo correcto seria: 1) eliminar las sequence y los disparadores asociados a esta tabla? 2) solo crear la tabla? Gracias. Si saben de algun foro en espaniol de oracle insertenlo por favor. Gustavo.
oracle: si se pierde una tabla...
Hola Gustavo, yo pondría la base de datos en modo archivelog, para poder recuperar la base de datos justo al momento anterior al problema. Comunidad Hispana de Oracle : <!-- m --><a class="postlink" href="http://comunidadoraclehispana.ning.com/">http://comunidadoraclehispana.ning.com/</a><!-- m --> Saludos, Félix
oracle: si se pierde una tabla...
upa nueva palabra. archilog... a ver...
oracle: si se pierde una tabla...
Gustavo, qué necesitas ? Saludos, Félix
oraoledbpus10.dll no se puede encontrar el modulo...
Hola. Me pasa cada tanto, intento ejecutar mi aplicacion y salta este error oraoledbpus10.dll no se puede encontrar el modulo especificado Alguna idea? gracias.
oraoledbpus10.dll no se puede encontrar el modulo...
El problema se da cuando se instala la version 2011 del live essential. ya he probado desinstalar el programa y mi aplicacion funciona a la perfecci'on, instalo nuevamente la version 2011 del live essential y el problema regresa. Esto va a ser un quilombo porque necesito instalarlo en pc que seguramente tienen el 2011 instalado. Gustavo.
oraoledbpus10.dll no se puede encontrar el modulo...
Gustavo, intenta regsvr32 OraOLEDB10.dll a ver si funciona....
oraoledbpus10.dll no se puede encontrar el modulo...
me dice que lo registro bien pero sigue sin funcionar.
oraoledbpus10.dll no se puede encontrar el modulo...
Solucionado (no se si fue correcto pero ahora me funciona) En esta pc tengo el servidor de oracle instalado. Baje e instale el cliente y con eso se soluciono PERO OJO, ojito, ojet... no se si el mismo instalador soluciono el problema o en realidad chequeo que habia problemas y lo soluciono gracias. Uso la version express del 10g
orden Numero ID en REDEFINES
Hola amigos: Creo que sera problema mio, pero al final despues de haber hecho tantos cambios me queda la dua. ¿Tiene algo que ver cuando hacemos REDEFINE GET .... ó REDEFINE SAY etc. el orden en que lo tecleamos dentro del DIALOG, ? ¿Se tienen que teclear por orden del ID, ejemplo el ID de un GET que es 101 , antes del ID de un BUTTON que es 201? Gracias por vuestra ayuda. Jose.
orden Numero ID en REDEFINES
Boton 1,2 del BRW. [img:2o3mzmlv]https&#58;//i&#46;imgur&#46;com/ogPxbiX&#46;png[/img:2o3mzmlv] Saludos
orden Numero ID en REDEFINES
brakaman: Cuando defines un recurso vía editor de recursos se puede apreciar que cada recurso tiene un nombre y un índice (Name y TAB INDEX), el nombre es el que utilizamos dentro de nuestro código, por ejemplo REDEFINE GET aGetsF1[04] VAR oCia:CUR ID 104 OF oFld:aDialogs[1] UPDATE; PICTURE "@!K"; MESSAGE "CURP" El ID 104 es el nombre del recurso, normalmente es un número pero me parece que también puede ser un texto, mientras que el TAB INDEX es el orden en que el foco va "saltando" dentro del dialogo. En lo personal todo lo defino vía editor de recursos y es ahí donde tengo la posibilidad de indicar el orden como en el ejemplo que te puso Karihna, pero en tu caso que todo lo haces vía código deduzco que sí, el orden en que pongas tu código será el orden en que irá "saltando" Espero no confundirte más. Saludos
orden de controles en un dialogo enter espaciadora
Hola, tengo un pequeño problema; tengo un dialogo con 6 controles; me interesa que al ejecutar, el control pase del text1, por ej, con enter al text2, con enter al text3, con enter a un boton "ingresa", y con enter nuevamente al text1, sin ir, al siguiente (por ej, seria text 4). Si presiono el "ingresa" con la tecla espaciadora, como la funcion que ejecuta este boton culmina con un text1:setfocus(), todo funciona perfecto; ahora, si en lugar de presionar la espaciadora, presiono enter, el programa "se saltea" el text1:setfocus, y si bien ejecuta la funcion asociada a "ingresa", el foco queda en text4, provocando por lo general un error en el operador de la aplicacion. ¿como puedo hacer para que el enter me respete este setfocus al igual que la espaciadora? Gracias. Atte.
orden de controles en un dialogo enter espaciadora
[quote="diegopolverelli":2gonav4w]Hola, tengo un pequeño problema; tengo un dialogo con 6 controles; me interesa que al ejecutar, el control pase del text1, por ej, con enter al text2, con enter al text3, con enter a un boton "ingresa", y con enter nuevamente al text1, sin ir, al siguiente (por ej, seria text 4). Si presiono el "ingresa" con la tecla espaciadora, como la funcion que ejecuta este boton culmina con un text1:setfocus(), todo funciona perfecto; ahora, si en lugar de presionar la espaciadora, presiono enter, el programa "se saltea" el text1:setfocus, y si bien ejecuta la funcion asociada a "ingresa", el foco queda en text4, provocando por lo general un error en el operador de la aplicacion. ¿como puedo hacer para que el enter me respete este setfocus al igual que la espaciadora? Gracias. Atte.[/quote:2gonav4w] Si los controles estàn en el archivo de recursos, debes indicar el orden allí, de lo contrario, el orden será el mismo en que aparezcan en el código, vale decir que si deseas que el tab pase de el control x al contro y, deberás definirlos en ese orden en el código. Para alterar ese orden, lo haces con el metodo Losftocus() del control o en la acción en el caso de botones o donde te lo permita, es decir, todo control permite ejecutar un block de codigo al perder foco, en ese block pones un controlx:Setfocus() y en algùn caso será necesario usar la variable de instancia ojump del control que abandonas. Aquí tienes un ejemplo que muda de un botón a un combobox que no es el siguiente en el orden de definicion: oBoton[1]:oJump:=oCombo[1], oCombo[1]:SetFocus() Espero te ayude.
orden de controles en un dialogo enter espaciadora
Espectacular...!!! Lo que es saber, eh... Gracias...!!! [quote="jose_murugosa":1hg4g9m4][quote="diegopolverelli":1hg4g9m4]Hola, tengo un pequeño problema; tengo un dialogo con 6 controles; me interesa que al ejecutar, el control pase del text1, por ej, con enter al text2, con enter al text3, con enter a un boton "ingresa", y con enter nuevamente al text1, sin ir, al siguiente (por ej, seria text 4). Si presiono el "ingresa" con la tecla espaciadora, como la funcion que ejecuta este boton culmina con un text1:setfocus(), todo funciona perfecto; ahora, si en lugar de presionar la espaciadora, presiono enter, el programa "se saltea" el text1:setfocus, y si bien ejecuta la funcion asociada a "ingresa", el foco queda en text4, provocando por lo general un error en el operador de la aplicacion. ¿como puedo hacer para que el enter me respete este setfocus al igual que la espaciadora? Gracias. Atte.[/quote:1hg4g9m4] Si los controles estàn en el archivo de recursos, debes indicar el orden allí, de lo contrario, el orden será el mismo en que aparezcan en el código, vale decir que si deseas que el tab pase de el control x al contro y, deberás definirlos en ese orden en el código. Para alterar ese orden, lo haces con el metodo Losftocus() del control o en la acción en el caso de botones o donde te lo permita, es decir, todo control permite ejecutar un block de codigo al perder foco, en ese block pones un controlx:Setfocus() y en algùn caso será necesario usar la variable de instancia ojump del control que abandonas. Aquí tienes un ejemplo que muda de un botón a un combobox que no es el siguiente en el orden de definicion: oBoton[1]:oJump:=oCombo[1], oCombo[1]:SetFocus() Espero te ayude.[/quote:1hg4g9m4]
orden de prioridades en LostFocus() bValid bChange... como e
Eso mismo. Me interesa saber como es el orden en que se ejecutan esas cosas en un get. redefine get oGet id... oGet:Lostfocus() oGet:Changed... oGet:valid... Gracias.
orden de prioridades en LostFocus() bValid bChange... como e
Gustavo, Usa un LogFile( "orden.txt", { <nombre_evento> } ) en cada uno de ellos, y luego revisa el fichero "orden.txt"
orden de prioridades en LostFocus() bValid bChange... como e
[quote="Antonio Linares":2l5p8c6v]Gustavo, Usa un LogFile( "orden.txt", { <nombre_evento> } ) en cada uno de ellos, y luego revisa el fichero "orden.txt"[/quote:2l5p8c6v] Esa no la sabia gracias
ordenar array de tres columnas
Hola amigos, Tengo un array de la siguiente forma: Fecha Nombre Cantidad ============================== 01-01-2014 LUCAS 20 02-01-2014 LUIS 80 03-01-2014 PEPE 30 etc Quiero ordenarlo por cantidad, la tercera columna, de Mayor a menor. Es decir, tendría que quedar así: 02-01-2014 LUIS 80 03-01-2014 PEPE 30 01-01-2014 LUCAS 20 etc Por favor, ¿cómo se puede hacer?. Muchas gracias. Un saludo
ordenar array de tres columnas
Prueba algo asi: [code=fw:3nbqx4ef]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br />&nbsp;aTabla &nbsp; := ASort<span style="color: #000000;">&#40;</span> aTabla ,,, <span style="color: #000000;">&#123;</span> |x,y| <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> x<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> >= y<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>, .T. , .F. <span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:3nbqx4ef]
ordenar array de tres columnas
Cristóbal, Muchísimas gracias, va perfecto.
ordenar array de tres columnas
Hola, creo que el if no sería necesario [code=fw:2bmsla86]<div class="fw" id="{CB}" style="font-family: monospace;">aTabla   := ASort<span style="color: #000000;">&#40;</span> aTabla ,,, <span style="color: #000000;">&#123;</span> |x,y| x<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> >= y<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span></div>[/code:2bmsla86]
ordenar array de tres columnas
Marcelo, efectivamente así es. Es por si tuviera que poner otra condicion de ordenación por la 1 o 2 columna, por si hubiera items iguales por la primera condicion ( 3 columna )
ordenar array multidimensional por fecha
Buenas tardes,Tengo problemas al ordenar un array multidimensional. Cuando lo ordeno por datos de caracteres, todo bién. El problema se presenta al ordenar por datos de fecha (DD/MM/AAAA). Los ordena pero sólo por DD, no cronológicamanete.Uso FWH 2.7 y xHarbour.Gracias.Rolando <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
ordenar array multidimensional por fecha
Rolando:Tienes la función la función DTOS() ?Ejemplo:DTOS(dArrFecha)Saludos
ordenar array multidimensional por fecha
Gracias Armando.Me había olvidado de esa función.SaludosRolando <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
ordenar combobox
Antonio Saludo Cordial para ti y la gente del foro Antonio Como puedo ordenar un combobox ascendente o descendentemente? el comobobox contiene información directamente de la tabla. Gracias Un Abrazo Jairo Barbosa
ordenar combobox
Antonio Buen día Mi pregunta no ha tenido respuesta aun, pasa que ya emplee la librería codepage.lib de xHarbour y la ordenación por ejemplo de la letra “ Ñ “ es buena solo tengo una cuestión con referencia a algunas palabras tildadas que las ordena de una forma distinta al orden natural podrían ayudarme a resolver este problema? porque solo con algunas palabras tildadas no es juicioso el orden del DBcombo? Gracias Jairo Barbosa
organizacion de controles en un dialogo
Estoy realizando un primer intento de dialogo de algo mas o menos operativo. Me encuentro con que al colocar los controles en un dialogo las cordenadas se toman desde el lado inferior izquierdo de la ventana ,al redimensionar ésta los controles se mueven sin redimensionarse según este patrón salvo el control browse que se redimensiona pero desde la esquina superior izquierda.Sería bueno poder decirle al control "a que " se tiene que ajustar . Un Saludo.
organizacion de controles en un dialogo
Manuel, En samples\TestCbx.prg tienes un ejemplo de un diálogo bastante completo: [img:3eg6u479]http&#58;//img197&#46;imageshack&#46;us/img197/3087/screenshot20100704at200&#46;png[/img:3eg6u479] Efectivamente, como comentas, las coordenadas en OSX parten de abajo a la izquierda. Creo que lo primero que deberiamos intentar es que las cajas de diálogo no sean redimensionables, como estamos acostumbrados en Windows.
organizacion de controles en un dialogo
Bueno, era bastante más simple de lo que parecía <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> Ha sido suficiente con redefinir el Método New() en la Clase TDialog y quitar el estilo de redimensión. De paso, se ha arreglado el ejemplo TestCbx.prg que usaba una ventana en vez de un diálogo. Hemos publicado un nuevo build con estos cambios <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
osay:SetText(Time()) no me funciona!!!
Alguna sugerencia? <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: -->
osay:SetText(Time()) no me funciona!!!
Ignacio, Este ejemplo funciona correctamente: [code:3ohiq7n9] #include "FWCE&#46;ch" function Main&#40;&#41; local oWnd, oSay DEFINE WINDOW oWnd TITLE "TestSay" @ 1, 2 SAY oSay PROMPT "Test" SIZE 100, 20 @ 3, 2 BUTTON "SetText" SIZE 80, 20 ACTION oSay&#58;SetText&#40; Time&#40;&#41; &#41; ACTIVATE WINDOW oWnd return nil [/code:3ohiq7n9]
osay:SetText(Time()) no me funciona!!!
Gracias Antonio
ot emulador de pocket pc
Antonio buenos dias perdon por el Off Topic como hago para que en el emulador que baje de el site de fivetechsoft.com me ejecute un programa compilado con Fwppc ademas al compilar el ejemplo test.prg me aparecen estos warnings Compiling... Harbour Compiler Alpha build 45.0 (Flex) Copyright 1999-2005, <!-- m --><a class="postlink" href="http://www.harbour-project.org/">http://www.harbour-project.org/</a><!-- m --> Compiling 'test.prg' and generating preprocessed output to 'test.ppo'... Lines 8, Functions/Procedures 1 Generating C source output to 'test.c'... Done. Microsoft (R) C/C++ Optimizing Compiler Version 12.20.9615 for ARM Copyright (C) Microsoft Corp 1984-2002. All rights reserved. test.c Creating library test.lib and object test.exp vm.lib(hvm.obj) : warning LNK1166: cannot adjust code at offset=0x00001000, rva= 0x00018984 rdd.lib(dbcmd.obj) : warning LNK1166: cannot adjust code at offset=0x00001000, r va=0x0005DB4C rdd.lib(dbf1.obj) : warning LNK1166: cannot adjust code at offset=0x00001000, rv a=0x0006BD14 dbfntx.lib(dbfntx1.obj) : warning LNK1166: cannot adjust code at offset=0x000010 00, rva=0x00075E6C * Application successfully built c:\FWPPC\SAMPLES> Att Wilson 'W' Gamboa A <!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e --> pd: como veras antonio recien inicio con fwppc gracias x todo
ot emulador de pocket pc
Wilson, Una vez instales el emulador, sitúate en el directorio c:\Archivos de programa\Microsoft\Device Emulator Preview\PPC_2003_SE y crea un fichero go.bat con este contenido: [code:1yjh3isg]&#46;&#46;\deviceemulator ppc_2003_se_wwe_armv4&#46;bin /skin Pocketpc_2003_skin&#46;xml[/code:1yjh3isg] Ejecuta go.bat y el emulador comenzará a funcionar. Una vez esté funcionando, ve a la opción del menu del emulador: File-Configure-Shared Folder, y selecciona un directorio de tu PC. Los EXEs que situes en ese directorio, se verán en el emulador desde la carpeta "Storage card". Si ejecutas el File manager del emulador, el botón central, te lleva a esa carpeta directamente. Una vez estes en esa carpeta del emulador, haz click ó enter sobre el EXE que quieras ejecutar <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
ot emulador de pocket pc
Wilson, Respecto a esos warnings, son sólo avisos que pueden ignorarse. No hay problema con ellos.
ot emulador de pocket pc
Gracias Antonio, ya funciona Saludos
ot/ citrix
Buenas tardes compañeros Alguien ha trabajado con Citrix via internet quisiera tener una idea de lo que se necesita, costos aproximados Gracias x Todo Queremos trabajar una palicacion que es en modo consola con xHarbour + Ads Server Saludos
ot/ citrix
Debes establecer una VPN y a traves de esta VPN conectar citrix. La vpn se establece a traves de una IP que tu estableces en el servidor para que sea dinamica o fija dependiendo de necesidades. Para ello necesitas de un windows 2000 server que te haga de servidor para las conexiones de VPN y a la vez del servidor citrix. Cargalo de memoria para que vaya bien. La VPN tiene la ventaja de que todo lo que envias o recibes va encriptado. Saludos Rafa
ot: Ads Server y VFP 9.0
Good Morning to all Someone of us have experience to conect Visual Fox pro V 9.0 With Ads Server ? Thanks in advance Att Wilson 'W' Gamboa A <!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e --> pd: excuseme my bad English
ot: Ads Server y VFP 9.0
buenas tardes a todos alguien tiene experiencia en acceder desde visual foxpro 9.0 a Advantage Database Server ? Gracias x todo Saludos Att Wilson 'W' Gamboa A <!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e -->
ot: Ads Server y VFP 9.0
Wilson: Desde VFP 9.0 el acceso a ADS se puede hacer por ADO o por ODBC, ADS tiene los drivers para hacer esto.
ot: Ads Server y VFP 9.0
gracias maestro Saludos
ot: cementerio del futuro
Buenos dias a todos comento el tema me han nombrado asesor informatico de una sobrina mia que tiene 7 años, ella ha ideado un futuro cementerio donde en el suelo ( tierra ) se encuentra un parque donde la gente se distrae y los difuntos ( muertos ) estan flotando en unas capsulas con sus cenizas en el segundo piso y en los pisos superiores ( o algo asi) La pregunta concreta es - se puede en Fw generar una especie de cielo ( negro ) donde esten flotando unas capsulas ( blancas ) mismas que estan asociadas a la informacion de la persona y que contiene su cenizas - si doy click en una capsula aparecera la informacion completa de la persona perdon el off topic soy muy malo en esto de lo visual muchas gracias si alguien me da una idea saludos cordiales y feliz navidad a todos
ot: cementerio del futuro
Hola, lo veo sencillo, creas una ventana con fondo negro, defines tus capsulas, bmps, tus las diseñas (dibujas), las defines en la ventana en alguna posición, incluso puedes hacer que parezcan que flotan (timer) y defines un evento cuando hagas click en ellas. Solo una idea para madurar saludos Marcelo
ot: cementerio del futuro
Muchas gracias MArcelo con tu idea he hecho esto, pero quisiera si alguien me da una idea de como hacerles flotar a los botones muchas gracias y un FELIZ año a todos [code=fw:10z6g5rl]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">'fivewin.ch'</span><br /><br /><span style="color: #00C800;">static</span> nVeces<br /><br /><span style="color: #00C800;">function</span> main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #00C800;">local</span> oWnd<br />    <span style="color: #00C800;">local</span> oBrush<br />    <span style="color: #00C800;">local</span> nR       := <span style="color: #000000;">0</span><br />    <span style="color: #00C800;">local</span> nG       := <span style="color: #000000;">0</span><br />    <span style="color: #00C800;">local</span> nB       := <span style="color: #000000;">0</span><br />    <span style="color: #00C800;">local</span> oTmr<br /><br />    <span style="color: #0000ff;">define</span> <span style="color: #0000ff;">brush</span> oBrush <span style="color: #0000ff;">color</span> nRGB<span style="color: #000000;">&#40;</span> nR, nG, nB <span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #0000ff;">define</span> <span style="color: #0000ff;">window</span> oWnd <span style="color: #0000ff;">title</span> <span style="color: #ff0000;">'cementerio futuro Katrin Gamboa'</span> <span style="color: #B900B9;">//STYLE NOSYSMENU</span><br /><br />    <span style="color: #0000ff;">define</span> <span style="color: #0000ff;">timer</span> oTmr <span style="color: #0000ff;">interval</span> <span style="color: #000000;">2500</span> <span style="color: #0000ff;">ACTION</span> MakeSome<span style="color: #000000;">&#40;</span> oWnd <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">OF</span> oWnd<br /><br /><br />    SET <span style="color: #0000ff;">BRUSH</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">TO</span> oBrush<br /><br />    ataudes<span style="color: #000000;">&#40;</span> oWnd <span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">TIMER</span> oTmr<br /><br /><br />    <span style="color: #0000ff;">activate</span> <span style="color: #0000ff;">window</span> oWnd <span style="color: #0000ff;">center</span> <span style="color: #B900B9;">//on init MakeSome( oWnd )</span><br /><br /><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> MakeSome<span style="color: #000000;">&#40;</span> oWnd <span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #00C800;">if</span> empty<span style="color: #000000;">&#40;</span> nVeces <span style="color: #000000;">&#41;</span><br />        nVeces = <span style="color: #000000;">0</span><br />    end<br /><br />    mueveataudes<span style="color: #000000;">&#40;</span> oWnd <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><br /><span style="color: #00C800;">function</span> ataudes<span style="color: #000000;">&#40;</span> oWnd <span style="color: #000000;">&#41;</span><br /><br />    @ <span style="color: #000000;">05</span>         , <span style="color: #000000;">05</span> <span style="color: #0000ff;">BTNBMP</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"At2345"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">40</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oWnd FLAT ;<br />      <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'Wilson Gamboa Nacio en Banios murio en Quito'</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />    @ <span style="color: #000000;">05</span> + <span style="color: #000000;">45</span>    , <span style="color: #000000;">05</span> <span style="color: #0000ff;">BTNBMP</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"At2346"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">40</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oWnd FLAT ;<br />      <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'Julio Pazos Nacio en Quito murio en Quito'</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />    @ <span style="color: #000000;">05</span> + <span style="color: #000000;">45</span> * <span style="color: #000000;">2</span>, <span style="color: #000000;">05</span> <span style="color: #0000ff;">BTNBMP</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"At2347"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">40</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oWnd FLAT ;<br />      <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'Alfonso Espinoza de los Monteros nacio en Quito NUNCA MORIRA!!'</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />    @ <span style="color: #000000;">05</span> + <span style="color: #000000;">45</span> * <span style="color: #000000;">3</span>, <span style="color: #000000;">05</span> <span style="color: #0000ff;">BTNBMP</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"At2348"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">40</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oWnd FLAT ;<br />      <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'Alfonso Espinoza de los Monteros nacio en Quito NUNCA MORIRA!!'</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />    @ <span style="color: #000000;">05</span> + <span style="color: #000000;">45</span> * <span style="color: #000000;">4</span>, <span style="color: #000000;">05</span> <span style="color: #0000ff;">BTNBMP</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"At2349"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">40</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oWnd FLAT ;<br />      <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'Alfonso Espinoza de los Monteros nacio en Quito NUNCA MORIRA!!'</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> mueveataudes<span style="color: #000000;">&#40;</span> oWnd <span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #00C800;">local</span> n := <span style="color: #000000;">10</span><br />    <span style="color: #00C800;">local</span> i<br />    <span style="color: #00C800;">local</span> oControl<br /><br />    ++nVeces<br /><br />    <span style="color: #00C800;">if</span> nVeces % <span style="color: #000000;">2</span> == <span style="color: #000000;">0</span>  <span style="color: #B900B9;">//si es par</span><br />        n = -n<br />    <span style="color: #00C800;">else</span><br />        n = n<br />    end<br />    <span style="color: #00C800;">for</span> i = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> len<span style="color: #000000;">&#40;</span> oWnd:<span style="color: #000000;">aControls</span> <span style="color: #000000;">&#41;</span><br />        oControl         = oWnd:<span style="color: #000000;">aControls</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><br />        oControl:<span style="color: #000000;">nTop</span>    = oControl:<span style="color: #000000;">nTop</span> + n<br />        oControl:<span style="color: #000000;">nLeft</span>   = oControl:<span style="color: #000000;">nLeft</span> + n<br />        oControl:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />        <span style="color: #B900B9;">//oControl:nWidth  = oControl:nWidth + n</span><br />        <span style="color: #B900B9;">//oControl:nHeight = oControl:nHeight + n</span><br />    <span style="color: #00C800;">next</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:10z6g5rl] [url:10z6g5rl]https&#58;//ibb&#46;co/0hnmRdP[/url:10z6g5rl]
ot: cementerio del futuro
Hola, una idea [code=fw:y6dqvjgl]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">'fivewin.ch'</span><br /><br /><span style="color: #00C800;">static</span> nVeces, aTrayectoria := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#123;</span><span style="color: #000000;">1</span>,<span style="color: #000000;">1</span><span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span><span style="color: #000000;">1</span>,<span style="color: #000000;">1</span><span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span><span style="color: #000000;">1</span>,<span style="color: #000000;">1</span><span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span><span style="color: #000000;">0</span>,<span style="color: #000000;">1</span><span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span><span style="color: #000000;">0</span>,<span style="color: #000000;">1</span><span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span><span style="color: #000000;">-1</span>,<span style="color: #000000;">1</span><span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span><span style="color: #000000;">-1</span>,<span style="color: #000000;">1</span><span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span><span style="color: #000000;">-1</span>,<span style="color: #000000;">1</span><span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span><span style="color: #000000;">-1</span>,<span style="color: #000000;">-1</span><span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span><span style="color: #000000;">-1</span>,<span style="color: #000000;">-1</span><span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span><span style="color: #000000;">-1</span>,<span style="color: #000000;">-1</span><span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span><span style="color: #000000;">0</span>,<span style="color: #000000;">-1</span><span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span><span style="color: #000000;">0</span>,<span style="color: #000000;">-1</span><span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span><span style="color: #000000;">1</span>,<span style="color: #000000;">-1</span><span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span><span style="color: #000000;">1</span>,<span style="color: #000000;">-1</span><span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span><span style="color: #000000;">1</span>,<span style="color: #000000;">-1</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aPos := <span style="color: #000000;">&#123;</span><span style="color: #000000;">0</span>,<span style="color: #000000;">1</span>,<span style="color: #000000;">2</span>,<span style="color: #000000;">3</span>,<span style="color: #000000;">4</span><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00C800;">function</span> main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> oWnd<br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> oBrush<br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> nR &nbsp; &nbsp; &nbsp; := <span style="color: #000000;">0</span><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> nG &nbsp; &nbsp; &nbsp; := <span style="color: #000000;">0</span><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> nB &nbsp; &nbsp; &nbsp; := <span style="color: #000000;">0</span><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> oTmr<br /><br />&nbsp; &nbsp; <span style="color: #0000ff;">define</span> <span style="color: #0000ff;">brush</span> oBrush <span style="color: #0000ff;">color</span> nRGB<span style="color: #000000;">&#40;</span> nR, nG, nB <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #0000ff;">define</span> <span style="color: #0000ff;">window</span> oWnd <span style="color: #0000ff;">title</span> <span style="color: #ff0000;">'cementerio futuro Katrin Gamboa'</span> <span style="color: #B900B9;">//STYLE NOSYSMENU</span><br /><br />&nbsp; &nbsp; <span style="color: #0000ff;">define</span> <span style="color: #0000ff;">timer</span> oTmr <span style="color: #0000ff;">interval</span> <span style="color: #000000;">150</span> <span style="color: #0000ff;">ACTION</span> MakeSome<span style="color: #000000;">&#40;</span> oWnd <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">OF</span> oWnd<br /><br /><br />&nbsp; &nbsp; SET <span style="color: #0000ff;">BRUSH</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">TO</span> oBrush<br /><br />&nbsp; &nbsp; ataudes<span style="color: #000000;">&#40;</span> oWnd <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">TIMER</span> oTmr<br /><br /><br />&nbsp; &nbsp; <span style="color: #0000ff;">activate</span> <span style="color: #0000ff;">window</span> oWnd <span style="color: #0000ff;">center</span> <span style="color: #B900B9;">//on init MakeSome( oWnd )</span><br /><br /><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> MakeSome<span style="color: #000000;">&#40;</span> oWnd <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">if</span> empty<span style="color: #000000;">&#40;</span> nVeces <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; nVeces = <span style="color: #000000;">0</span><br />&nbsp; &nbsp; end<br /><br />&nbsp; &nbsp; mueveataudes<span style="color: #000000;">&#40;</span> oWnd <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><br /><span style="color: #00C800;">function</span> ataudes<span style="color: #000000;">&#40;</span> oWnd <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; @ <span style="color: #000000;">05</span> &nbsp; &nbsp; &nbsp; &nbsp; , <span style="color: #000000;">05</span> <span style="color: #0000ff;">BTNBMP</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"At2345"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">40</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oWnd FLAT ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'Wilson Gamboa Nacio en Banios murio en Quito'</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; @ <span style="color: #000000;">05</span> + <span style="color: #000000;">45</span> &nbsp; &nbsp;, <span style="color: #000000;">05</span> <span style="color: #0000ff;">BTNBMP</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"At2346"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">40</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oWnd FLAT ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'Julio Pazos Nacio en Quito murio en Quito'</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; @ <span style="color: #000000;">05</span> + <span style="color: #000000;">45</span> * <span style="color: #000000;">2</span>, <span style="color: #000000;">05</span> <span style="color: #0000ff;">BTNBMP</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"At2347"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">40</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oWnd FLAT ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'Alfonso Espinoza de los Monteros nacio en Quito NUNCA MORIRA!!'</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; @ <span style="color: #000000;">05</span> + <span style="color: #000000;">45</span> * <span style="color: #000000;">3</span>, <span style="color: #000000;">05</span> <span style="color: #0000ff;">BTNBMP</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"At2348"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">40</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oWnd FLAT ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'Alfonso Espinoza de los Monteros nacio en Quito NUNCA MORIRA!!'</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; @ <span style="color: #000000;">05</span> + <span style="color: #000000;">45</span> * <span style="color: #000000;">4</span>, <span style="color: #000000;">05</span> <span style="color: #0000ff;">BTNBMP</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"At2349"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">40</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oWnd FLAT ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'Alfonso Espinoza de los Monteros nacio en Quito NUNCA MORIRA!!'</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> mueveataudes<span style="color: #000000;">&#40;</span> oWnd <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> n := <span style="color: #000000;">10</span><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> i<br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> oControl<br />&nbsp; <br />&nbsp; &nbsp; <span style="color: #00C800;">for</span> i := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">5</span><br />&nbsp; &nbsp; &nbsp; &nbsp; aPos<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span> := <span style="color: #000000;">&#40;</span> aPos<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span> + <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> % LEN<span style="color: #000000;">&#40;</span> aTrayectoria <span style="color: #000000;">&#41;</span> + <span style="color: #000000;">1</span><br />&nbsp; &nbsp; <span style="color: #00C800;">next</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">for</span> i = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> len<span style="color: #000000;">&#40;</span> oWnd:<span style="color: #000000;">aControls</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; oControl &nbsp; &nbsp; &nbsp; &nbsp; = oWnd:<span style="color: #000000;">aControls</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; oControl:<span style="color: #000000;">nTop</span> &nbsp; &nbsp;= oControl:<span style="color: #000000;">nTop</span> + aTrayectoria<span style="color: #000000;">&#91;</span>aPos<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; oControl:<span style="color: #000000;">nLeft</span> &nbsp; = oControl:<span style="color: #000000;">nLeft</span> + aTrayectoria<span style="color: #000000;">&#91;</span>aPos<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>,<span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; oControl:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">//oControl:nWidth &nbsp;= oControl:nWidth + n</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">//oControl:nHeight = oControl:nHeight + n</span><br />&nbsp; &nbsp; <span style="color: #00C800;">next</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><br />&nbsp;</div>[/code:y6dqvjgl] saludos Marcelo Vía
ot: cementerio del futuro
Muchas gracias Marcelo funciona super !!
ot: compilar fwh con xharbour builder
buenas noches Alguien tiene el Script para copilar en xHarbour Builder (xharbour.com) a Fwh, tsbrowse , tsbuttom y btnget en la demo de Junio que instale no existe Alguien lo tiene Saludos y Gracias x Todo
ot: compilar harbour del cvs con bcc55
buenas noches compañeros alguna alma caritativa que tenga un archivo .bat para hacerlo, yo tengo solo para xharbour y quisiera hacer pruebas con Harboursobre todo en modo consola necesitaria el .bat con los seteos necesarios para el compilador bcc55 en windows Por su atencion gracias Att.
ot: compilar harbour del cvs con bcc55
Wilson, Una vez descargues Harbour del CVS, ejecuta make_b32.bat que está en el directorio raiz y te construirá Harbour con sus librerías. Una vez lo tengas, puedo enviarte un build.bat sencillo para que construyas en modo consola, ya que el que proporciona Harbour es muy complicado.
ot: compilar harbour del cvs con bcc55
gracias Antonio al hacerlo me sale este error MAKE Version 5.2 Copyright (c) 1987, 2000 Borland source\common\expropt1.c: source\common\expropt2.c: source\common\hbarch.c: source\common\hbfhnd.c: source\common\hbfsapi.c: source\common\hbgete.c: source\common\hbhash.c: source\common\hbdate.c: source\common\hbstr.c: source\common\hbtrace.c: source\common\hbver.c: source\common\hbverdsp.c: source\common\reserved.c: TLIB 4.5 Copyright (c) 1987, 1999 Inprise Corporation +obj\b32\expropt1.obj & +obj\b32\expropt2.obj & +obj\b32\hbarch.obj & +obj\b32\hbfhnd.obj & +obj\b32\hbfsapi.obj & +obj\b32\hbgete.obj & +obj\b32\hbhash.obj & +obj\b32\hbdate.obj & +obj\b32\hbstr.obj & +obj\b32\hbtrace.obj & +obj\b32\hbver.obj & +obj\b32\hbverdsp.obj & +obj\b32\reserved.obj & + source\pp\ppgen.c: Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland source\pp\pptable.c: source\pp\ppcore.c: source\pp\pplib.c: source\pp\pplib2.c: source\pp\pplib3.c: TLIB 4.5 Copyright (c) 1987, 1999 Inprise Corporation +obj\b32\pptable.obj & +obj\b32\ppcore.obj & +obj\b32\pplib.obj & +obj\b32\pplib2.obj & +obj\b32\pplib3.obj & + source\compiler\harbour.c: ** error 1 ** deleting obj\b32\harboury.c
ot: compilar harbour del cvs con bcc55
Buenas noches pues eso, uso este .bat para compilar y me ha dejado de funcionar desde hace un mes mas o menos ..........inicio del .bat............... @ECHO OFF SET HB_REBUILD_PARSER=no SET PATH=c:\windows;c:\windows\system32;c:\winnt;c:\winnt\system32;c:\BCC55\bin;c:\djgpp\bin SET INCLUDE=c:\BCC55\INCLUDE;c:\HB\INCLUDE SET HB_LEX=SIMPLEX SET DJGPP=C:\DJGPP\DJGPP.ENV SET BiSon_Simple=C:\DJGPP\share\bison\bison.simple SET HB_ARCHITECTURE=w32 SET HB_COMPILER=bcc32 SET C_USR= SET L_USR= REM SET ECHO=cmd /c echo REM SET DEL=cmd /c del CALL make_b32 clean CALL make_b32  ...............final del .bat............. que estoy haciendo mal ?? los errores que me salen son MAKE Version 5.2 Copyright (c) 1987, 2000 Borland source\common\expropt1.c: source\common\expropt2.c: source\common\hbarch.c: source\common\hbfhnd.c: source\common\hbfsapi.c: source\common\hbgete.c: source\common\hbhash.c: source\common\hbdate.c: source\common\hbstr.c: source\common\hbtrace.c: source\common\hbver.c: source\common\hbverdsp.c: source\common\reserved.c: TLIB 4.5 Copyright (c) 1987, 1999 Inprise Corporation +obj\b32\expropt1.obj & +obj\b32\expropt2.obj & +obj\b32\hbarch.obj & +obj\b32\hbfhnd.obj & +obj\b32\hbfsapi.obj & +obj\b32\hbgete.obj & +obj\b32\hbhash.obj & +obj\b32\hbdate.obj & +obj\b32\hbstr.obj & +obj\b32\hbtrace.obj & +obj\b32\hbver.obj & +obj\b32\hbverdsp.obj & +obj\b32\reserved.obj & + source\pp\ppgen.c: Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland source\pp\pptable.c: source\pp\ppcore.c: source\pp\pplib.c: source\pp\pplib2.c: source\pp\pplib3.c: TLIB 4.5 Copyright (c) 1987, 1999 Inprise Corporation +obj\b32\pptable.obj & +obj\b32\ppcore.obj & +obj\b32\pplib.obj & +obj\b32\pplib2.obj & +obj\b32\pplib3.obj & + source\compiler\hbmain.c: 1 archivos copiados. 1 archivos copiados. obj\b32\harboury.c: Warning W8004 harboury.c 3850: 'yymsg' is assigned a value that is never used in function yydestruct Warning W8008 harboury.c 6962: Condition is always false in function hb_compparse Warning W8066 harboury.c 6963: Unreachable code in function hb_compparse Warning W8004 harboury.c 6890: 'hb_compnerrs' is assigned a value that is never used in function hb_compparse Warning W8004 harboury.c 4048: 'yyptr' is assigned a value that is never used in function hb_compparse source\compiler\complex.c: source\compiler\cmdcheck.c: source\compiler\hbcomp.c: source\compiler\hbcmplib.c: source\compiler\hbdbginf.c: source\compiler\hbdead.c: source\compiler\hbstripl.c: source\compiler\hbusage.c: source\compiler\hbident.c: source\compiler\hbgenerr.c: source\compiler\hblbl.c: source\compiler\hbpcode.c: source\compiler\hbfunchk.c: source\compiler\hbfix.c: source\compiler\hbopt.c: source\compiler\ppcomp.c: source\compiler\genc.c: source\compiler\gencc.c: source\compiler\gencli.c: source\compiler\gencobj.c: source\compiler\genobj32.c: source\compiler\genjava.c: source\compiler\genhrb.c: source\compiler\expropta.c: Warning W8065 include\hbexpra.c 174: Call to function 'hb_compExprDelete' with no prototype in function hb_compExprLstDealloc Error E2356 include\hbexpra.c 225: Type mismatch in redeclaration of 'hb_compExprDelete' Warning W8065 include\hbexpra.c 257: Call to function 'hb_compErrorType' with no prototype in function hb_compExprErrorType Warning W8065 include\hbexpra.c 332: Call to function 'hb_compErrorDuplVar' with no prototype in function hb_compExprCBVarAdd Warning W8065 include\hbexpra.c 379: Call to function 'hb_compExprDelete' with no prototype in function hb_compExprNewFunCall Warning W8065 include\hbexpra.c 380: Call to function 'hb_compExprDelete' with no prototype in function hb_compExprNewFunCall Warning W8065 include\hbexpra.c 390: Call to function 'hb_compExprReduceList' with no prototype in function hb_compExprNewFunCall Warning W8065 include\hbexpra.c 468: Call to function 'hb_compExprDelete' with no prototype in function hb_compExprNewFunCall Warning W8065 include\hbexpra.c 531: Call to function 'hb_compExprDelete' with no prototype in function hb_compExprNewFunCall Warning W8065 include\hbexpra.c 534: Call to function 'hb_compExprDelete' with no prototype in function hb_compExprNewFunCall Warning W8065 include\hbexpra.c 548: Call to function 'hb_compExprDelete' with no prototype in function hb_compExprNewFunCall Warning W8065 include\hbexpra.c 796: Call to function 'hb_compErrorSyntax' with no prototype in function hb_compExprSetOperand *** 1 errors in Compile *** ** error 1 ** deleting obj\b32\expropta.obj Si alguien me puede ayudar Gracias Saludos
ot: compilar harbour del cvs con bcc55
Wilson, Nosotros lo construimos ayer mismo sin problemas. Usamos este fichero BAT: SET PATH=%PATH%;c:\bcc55\bin SET BISON_SIMPLE=bison.simple SET CFLAGS=-D__EXPORT__ -DHB_GUI -tWM -DHB_FM_STATISTICS_OFF -DHB_INCLUDE_WINEXCHANDLER -DHARBOUR_MAIN_WIN -d -a8 -OS -O2 -5 -6 make_b32.bat %1
ot: compilar harbour del cvs con bcc55
gracias Antonio pero siguen los problemas podrias indicarme donde tiene instalados el Bison ? que valor tiene tu variable Path ? al ejecutar este .bat Gracias x Todo Saludos
ot: compilar harbour del cvs con bcc55
Wilson, Nosotros usamos un directorio "util" en donde tenemos todas las herramientas necesarias y esta accesible desde el path. Ahí tambien está el bison.simple, de hecho esta línea queda así: SET BISON_SIMPLE=c:\util\bison.simple Que errores te da ? Prueba a borrar todo el directorio Harbour y haz un checkout. Lo que se denomina un "fresh checkout" <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
ot: compilar harbour del cvs con bcc55
Gracias Antonio, era eso he vuelto a bajar y me compila hasta con mi antiguo .bat gracias x todo Saludos
ot: coneccion a base de datos 4D
Jose muchas gracias por tu ayuda debo abrir y trabajar sin exportar a excel es una cantidad inmensa de datos los requerimos para un trabajo puntual es de un programa llamado MBA3 gracias
ot: coneccion a base de datos 4D
buenas tardes alguien se ha logrado conectar con esa base de datos 4D <!-- m --><a class="postlink" href="https://es.4d.com">https://es.4d.com</a><!-- m --> muchas gracias por su ayuda Wilson
ot: coneccion a base de datos 4D
Hola Wilson, use 4D hace muchos años e hice una pequeña aplicacion con ese motor de base de datos, con lenguaje de programacion propio muy similar a Visual Basic. Yo creo que la mejor manera seria usando el driver ODBC que proporcionan <!-- m --><a class="postlink" href="https://doc.4d.com/4Dv17/4D/17/4D-ODBC-Driver.100-3786159.es.html">https://doc.4d.com/4Dv17/4D/17/4D-ODBC- ... 59.es.html</a><!-- m --> o siempre puedes exportar a excel ó word desde 4D y leerlo posteriormente desde Fivewin, en fin no se cual es tu idea. Suerte. Jose.
ot: curso ModHarbour Mercury MVC
Buenos dias .. Como van con el curso , lo llegron a arrancar ?? Sera interesante saber sus comentarios Lubin
ot: curso ModHarbour Mercury MVC
Yo tambien espero comentarios, Por motivos personales no podia asistir a las sesiones en directo. (No soy partidario de ellas para un curso.) Aunque soy del parecer que mejor que explique el profe , grabarlo y preguntar posteriormente en foro mucho mas agil y se aprovecha mas la sesion. Creo que el curso se podria poner a la venta grabado, en un servidor para acceder cuando se quiera, con este y con otros venideros. Estamos a la espera. Saludos. Jose.
ot: curso ModHarbour Mercury MVC
Hola José Vicente y todos, Aunque no soy el autor del curso, Charly (Carles Aubia), ni el organizador, Wilson, si participé infimamente en su organización. El curso estaba orientado a ayudar a aquellos que quisieran conocer las técnicas de programacion más avanzadas en la web. MVC es sin duda la técnica más avanzada y prácticamente imprescindible. Carles lleva no menos de un año aportando sus conocimientos en la materia de una manera desinteresada. A algunos nos pareció que ofrecer sólo un poco de dinero por tanto bien hecho a la comunidad era lo menos que podíamos hacer. ¡ Como crecen las comunidades cuando los miembros que trabajan por ellas ven reconocidos sus esfuerzos ! Y qué menos que un cierto compromiso a través de una pequeña cantidad. Los cursos se pensaron PRINCIPALMENTE, y ese siempre fue el objetivo de Charly, para ser liberados gratuitamente. Es lo que el autor ha reiterado en varias ocasiones, sólo que se hará más adelante, porque no tiene NINGUN SENTIDO que algunos paguen por lo que otros obtienen gratis de forma inmediata. Reiterar que tanto en Charly como en Antonio Linares sólo hemos encontrado generosidad durante ya más de un año. Que nos están ayudando y mucho en la transición a la web, más allá incluso de la utilización de Harbour. Y que lo "correcto" es corresponder a esa generosidad con generosidad. Un cordial saludo
ot: curso ModHarbour Mercury MVC
Gracias por el dato GABO <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> , voy a probar y comento.
ot: curso ModHarbour Mercury MVC
Me sumo a la idea del curso grabado, incluso les permitirá una mejor comercialización. Saludos Fernando Espinoza A.
ot: curso ModHarbour Mercury MVC
Hola a todos: Podria anotarme hoy y recibir los videos por favor?. Saludos Ruben Fernandez
ot: curso ModHarbour Mercury MVC
Hola Rubén, Por favor, ponte en contacto con Charly en <!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e --> Saludos
ot: curso ModHarbour Mercury MVC
Curso de Programación Web con modHarbour y MVC Mercury Introducción Con mucha ilusión ( y .. hasta envidia y porque no frustración) hemos visto pasar todos esto años una serie de programas escritos para Web con una variedad de lenguajes de programación Nuestro querido lenguaje Harbour se estaba quedando rezagado en este enorme mercado de la WEB En una reunión realizada en CALPE España se vislumbra una solución plasmada tiempo después por el experimentado programador Antonio Linares (creador de nuestro lenguaje Harbour) con la ayuda de otros programadores se genera un módulo para Apache que permite ejecutar harbour en este entorno Ya tiene su primer año en la web este módulo y se han creado varios programas y páginas web con el Nosotros necesitamos guiados de una mano experta generar nuestros programas para poner nuestra ideas y productos en este mundo del Html Con esa visión se ha creado un curso de programación para darnos un empujón en la web de la mano de Harbour, Mod_Harbour + Mercury guiados por el instructor Carles Aubia Carles es el creador de la librería mercury donde ha simplificado el modelo MVC ( Modelo Vista Controlador ) para ponerlo a nuestro alcance Contenido del curso Utilizando el manual que ha escrito el autor Carles Aubia se llevará al estudiante de la mano en la creación de una serie de templates que le permitirán encarar la programación Web utilizando nuestros amado lenguaje Harbour y utilizar todos los recursos que pone el internet en nuestras manos como HTML5, Bootstrap, Css, JavaScript de la mano de nuestro lenguaje harbour sirviendo como el pegamento que unirá todas estas piezas y conseguir maravillosos programas en la web - Instalación y configuración de apache - Creación de nuestro entorno de trabajo - Pruebas de funcionamiento de nuestro server en local - Descripción de modelo MVC desmitificándolo - creación de hello word con el modelo MVC - desarrollo de todo el manual de MVC que ha escrito Carles DURACIÓN La duración del curso es de 5 sesiones por 2 horas cada una de ellas dos veces a la semana HORARIO Inicio del Curso 01 Julio del 2020 Reuniones Martes y Jueves 17:00 Hora de España (Podemos cambiarlo, pero entre semana). Pendiente de definir las fechas PRECIO €30 FORMA DE PAGO PAYPAL <!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e --> PRE-REQUISITOS El curso será interactivo ejecutando todos los ejemplos en tiempo real. Todos los participantes habrán de tener su entorno para poder-lo seguir. Para ello es necesario: - Tener correctamente instalado modHarbour (No se explicará su instalación) - No debe haber problemas, pero usaremos entorno xampp - Tener un editor de code - El chat estará cerrado, por lo que se agradecería que todos los participantes dispusieran de micrófono si queréis interactuar. El chat con tantos participantes es muy engorroso. - Se seguirá todos los ejemplos del manual por lo que lo debéis de tener para poderlo seguir à <!-- m --><a class="postlink" href="https://forum.mod-harbour.org/viewtopic.php?f=6&t=474">https://forum.mod-harbour.org/viewtopic.php?f=6&t=474</a><!-- m --> Información : <!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e --> <!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e --> <!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e -->
ot: curso ModHarbour Mercury MVC
Buenas tardes Wilson, me uniría al curso. Siempre y cuando se explique, la instalación de MOD_HARBOUR, he intentado varias veces hacer la instalación y hasta el momento no lo he logrado. Por esa simple razón no me ha motivado el uso de la herramienta. Saludos. LEANDRO AREVALO
ot: curso ModHarbour Mercury MVC
Leandro bienvenido si te animas yo mismo te ayudaria con eso he instalado en windows 10 y en windows 2012 server saludos
ot: curso ModHarbour Mercury MVC
Hola, me parece una iniciativa estupenda, pero creo que el curso debe ser grabado y no en directo, ya que se volverá caótico, lo típico a mi no me funciona, que puedo ser yo soy , a ver. El curso a mi parecer sería primera parte, instalación , configuración del entorno, y elegir, basar el curso en unas herramientas, quien tenga otras debería experimentar por su cuenta, y apoyarse en foro. a partir de ahí grabación del curso ,ya que por lo menos yo no se si podré acceder a todas las clases en directo. Y entonces no me apúntare.como yo habrá muchos,colgarlo en alguna plataforma y descargarlo quien tenga acceso . O wetransfer .Montar un foro sobre el curso pero que contesten los usuarios , siempre hay usuarios avanzados que les sirve de recordatorio, aprendizaje. Esta es mi humilde opinión. Enhorabuena por la iniciativa. Saludos. José. Enviado desde mi POCOPHONE F1 mediante Tapatalk
ot: curso ModHarbour Mercury MVC
[quote="wilsongamboa":359uqwej]Leandro bienvenido si te animas yo mismo te ayudaria con eso he instalado en windows 10 y en windows 2012 server saludos[/quote:359uqwej] José Vicente, El curso, además de directo, será grabado y puesto a disposición las grabaciones a todos los suscriptores. Salu2 PD. Los interesados en el curso pueden hacer la preinscripcion en <!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e -->
ot: curso ModHarbour Mercury MVC
para el amigo Leandro esta guia para mod_harbour 64 bits windows 7,8,10 o windows server de 64 bits Instalacion mod_harbour en windows de 64 bits ( windows 7, 8, 10 ) - bajar el archivo <!-- m --><a class="postlink" href="http://54.37.60.38/doc/mod_harbour.zip">http://54.37.60.38/doc/mod_harbour.zip</a><!-- m --> - instalar xampp bajarlo de <!-- m --><a class="postlink" href="https://www.apachefriends.org/es/download.html">https://www.apachefriends.org/es/download.html</a><!-- m --> el que corresponda a win64 bits - copiar mod_harbour.so a c:\xampp\apache\modules - copiar libharbour.dll a c:\xampp\htdocs - aumentar al final del arhivo de texto de configuracion c:\xampp\apache\conf\httpd.conf reiniciar apache este archivo de programa function Main() ?? "Harbour power" ? ? Version() return nil creale en un prg llamado test.prg crear la carpeta c:\xampp\htdocs\samples copiarlo en c:\xampp\htdocs\samples ir al navegador y tipear localhost/samples/test.prg y lo tienes funcionando
ot: curso ModHarbour Mercury MVC
perdon se me fue tres veces en el zip estan las lineas que se debe aumentar a httpd.conf de apache están todos los archivos y dlls necesarios cuando instales xampp debes activar y hacer que se arranque apache cuando ya hagas las modificaciones le vuelves a arrancar apache no deberia darte ningun problema OJO esta NO ES LA ultima version es una version que funciona luego has de empezar a complicarte con que abras puertos y trabajes via internet saludos Wilson pd: a las ordenes cualquier duda
ot: curso ModHarbour Mercury MVC
Hola a todos. Interesante idea, y concuerdo que es mejor en tener el curdo grabado (mas o menos como los de <!-- m --><a class="postlink" href="https://www.udemy.com/">https://www.udemy.com/</a><!-- m --> sería estupendo) Aparte, al igual que Leandro, yo no he podido instalar MOD_HARBOUR, pero en Linux, específicamente en Centos 7, y es donde mas lo usaría, ya que utilizo MySQL en este ambiente, y lo intente por varios días hacerlo funcionar pero no se pudo. En Windows si funciona, pero en este tipo de servidor Linux Centos no. Saludos cordiales. Carlos
ot: curso ModHarbour Mercury MVC
Hola.. Yo tengo windows 10 y con xamp no pude hechar andar mod_harbour buscando y probando. lo logre instalando <!-- m --><a class="postlink" href="https://www.appserv.org/en/download/">https://www.appserv.org/en/download/</a><!-- m --> - copiar mod_harbour.so a C:\AppServ\Apache24\modules - copiar libharbour.dll a C:\AppServ\www - aumentar al final del arhivo de texto de configuracion C:\AppServ\Apache24\conf\httpd.conf [code=fw:30sxdd1o]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// esto hay que agregarlo C:\AppServ\Apache24\conf\httpd.conf</span><br /><FilesMatch <span style="color: #ff0000;">"<span style="color: #000000;">\.</span>(prg|hrb)$"</span>><br />    SetEnv LIBHARBOUR <span style="color: #ff0000;">"C:<span style="color: #000000;">\A</span>ppServ<span style="color: #000000;">\w</span>ww<span style="color: #000000;">\l</span>ibharbour.dll"</span> <br />    SetHandler harbour<br /></FilesMatch><br /> </div>[/code:30sxdd1o] - Reiniciar el servicio de apache o tu pc/laptop Saludos
ot: curso ModHarbour Mercury MVC
Gracias muy amable.
ot: curso ModHarbour Mercury MVC
Saludos cordiales Estoy altamente interesado en el curso y crear programa de consultas Mi correo es <!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e --> Me puedes ubicar por Skype: juandatapro Podemos acordar términos económicos para que nos instruyan en arrancar una aplicacion para consultas con MySQL ingresando con su respectivo login.
ot: curso ModHarbour Mercury MVC
[quote="jnavas":2wczgdnc]Saludos cordiales Estoy altamente interesado en el curso y crear programa de consultas Mi correo es <!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e --> Me puedes ubicar por Skype: juandatapro Podemos acordar términos económicos para que nos instruyan en arrancar una aplicacion para consultas con MySQL ingresando con su respectivo login.[/quote:2wczgdnc] Hola Juan, Por favor, ponte en contacto con Charly en <!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e --> Saludos
ot: curso ModHarbour Mercury MVC
Saludos a todos Mis clientes estan solicitando aplicacion para realizar consultas directa sobre sus bases de datos, estamos interesados en construir aplicacion bien sea intranet o extranet para satisfascer sus necesidades. La aplicacion preferiblemente escrita en xBase, Estamos interesados en contratar los servicios de desarrollo y/o adquisicion de herramientas para este propósito. Pueden escribirme a <!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e --> o mediante skype: juandatapro
ot: enviar mensajes a watsapp desde apis de terceros
Buenos dias con todos si alguien puede ayudarme necesito una solucion de terceros para enviar mensajes por esa via desde un programa hecho en mi querido FWH saludos cordiales Wilson
ot: enviar mensajes a watsapp desde apis de terceros
ESTIMADO Antes el API de whatssap esta disponible, pero hace un tiempo atraz ya no es gratuita es de paga, Puedes preguntar a Soporte y te diran lo que necesitas saber
ot: enviar mensajes a watsapp desde apis de terceros
Olá, Testei a ferramenta WTSApi 3.0. Muito fácil de implementar com o FWH e o custo/benefício é super bom. <!-- m --><a class="postlink" href="https://documenter.getpostman.com/view/4545782/SWTHbveC?version=latest#intro">https://documenter.getpostman.com/view/ ... test#intro</a><!-- m --> Att. Oliveiros Junior
ot: enviar mensajes a watsapp desde apis de terceros
muchas gracias por la informacion la web no esta en linea <!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e --> he enviado un email a ver si me responden tu lo has probado ? podrias mostar algun codigo fuente de referencia ? gracias Wilson
ot: jpeg files in a folder
I have to distinguish pictures in a folder This distinction should be visible immediately (not if I click on the picture) as some pictures are reserved If I press F6 in a picture selected I can change attributes, for instance I add a TAG "NO" But I can see this new attribute only in the bottom of window It would be very nice if we could see directly into 'preview' of the picture. Any ideas? marco