topic stringlengths 1 63 | text stringlengths 1 577k ⌀ |
|---|---|
downloading files from internet | Rajeev,
>The problem I am getting is the variable would'nt hold more than 65K.Does TTxtFile class contain a way to overcome the 65K limit ?
Only by going to 32bit. 65K is the 16bit limit.
James |
downloading files from internet | Hi Jeff
What is the limit for 32bit ? In case the file I am downloading is huge
Thanks
Rajeev chavan |
downloading files from internet | The limit is the available memory.
EMG |
downloading files from internet | Hi Enrico
Nice to hear from you, <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> .Is there step by guide available for Harbor or xHarbor ?
with best wishes
Rajeev Chavan |
downloading files from internet | Rajeev,
>Is there step by guide available for Harbor or xHarbor ?
This site might help.
<!-- m --><a class="postlink" href="http://culikr.sites.uol.com.br/howtoen.htm">http://culikr.sites.uol.com.br/howtoen.htm</a><!-- m -->
James |
downloading files from internet | Hi James
Thanks a lot for the link.I will definitely visit the link.
With Best Wishes
Rajeev Chavan |
drag & drop box | Hello Antonio,
could you please help me with this drag & drop box.
I inherited xTRich. The program is working so far that I can drag: files from the explorer, emails and links from the addressbar of the internet explorer. The problem is that I can’t get it working in one dropbox for all the cases.
Would you be so kind to help me.
Thanks in advance
Otto
//from IE we need .and. .not. nMsg = 1094
if nMsg > 1000 .and. .not. nMsg = 1094
//from explorer this works
// if nMsg > 1000
return 0
endif
[code=fw:1q2nh10n]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#INCLUDE</span> <span style="color: #ff0000;">"FIVEWIN.CH"</span><br />REQUEST DBFCDX<br />REQUEST DBFFPT<br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span>cKdnr<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> oDlg, oRich<br /> <span style="color: #00C800;">local</span> hRichDLL := LoadLibrary<span style="color: #000000;">(</span> <span style="color: #ff0000;">"riched20.dll"</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> cTitle := <span style="color: #ff0000;">""</span><br /> <span style="color: #00C800;">local</span> nTop := VAL<span style="color: #000000;">(</span>GetPvProfString<span style="color: #000000;">(</span> <span style="color: #ff0000;">"XFANG"</span>, <span style="color: #ff0000;">"TOP"</span>, <span style="color: #ff0000;">"1"</span>, <span style="color: #ff0000;">".<span style="color: #000000;">\I</span>NI<span style="color: #000000;">\W</span>INHOTEL.INI"</span> <span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> nLeft := VAL<span style="color: #000000;">(</span>GetPvProfString<span style="color: #000000;">(</span> <span style="color: #ff0000;">"XFANG"</span>, <span style="color: #ff0000;">"LEFT"</span>,<span style="color: #ff0000;">"1"</span>, <span style="color: #ff0000;">".<span style="color: #000000;">\I</span>NI<span style="color: #000000;">\W</span>INHOTEL.INI"</span> <span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> cAufruf := <span style="color: #ff0000;">""</span><br /> <span style="color: #00C800;">local</span> cName := <span style="color: #ff0000;">""</span><br /> <span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"DROP"</span> <span style="color: #0000ff;">TITLE</span> cTitle <span style="color: #0000ff;">PIXEL</span> TRANSPARENT<br /> <br /> <span style="color: #00C800;">if</span> oDlg:<span style="color: #000000;">nHorzRes</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> - nLeft < <span style="color: #000000;">200</span><br /> nLeft := <span style="color: #000000;">1</span><br /> <span style="color: #00C800;">endif</span><br /> <br /> <span style="color: #00C800;">if</span> oDlg:<span style="color: #000000;">nVertRes</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>-nTop < <span style="color: #000000;">200</span><br /> nTop := <span style="color: #000000;">1</span><br /> <span style="color: #00C800;">endif</span><br /><br /> oRich = xTRich<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #0000ff;">Redefine</span><span style="color: #000000;">(</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">{</span> || <span style="color: #ff0000;">""</span> <span style="color: #000000;">}</span>, oDlg <span style="color: #000000;">)</span><br /> <br /> oRich:<span style="color: #000000;">cKdNr</span> := cKdNr<br /> <br /> oRich:<span style="color: #000000;">bMButtonDown</span> := <span style="color: #000000;">{</span>|nRow, nCol, nFlags| iif<span style="color: #000000;">(</span> oRich:<span style="color: #000000;">cCargo</span> = <span style="color: #ff0000;">"DRAGANDDROP"</span>, cAufruf := <span style="color: #ff0000;">"DRAGANDDROP"</span>,;<br /> iif<span style="color: #000000;">(</span> oRich:<span style="color: #000000;">cCargo</span> = <span style="color: #ff0000;">"Von"</span>, cAufruf := <span style="color: #ff0000;">"Outlook"</span>, <span style="color: #000000;">(</span> cAufruf := <span style="color: #ff0000;">"Homepage"</span>, cName := oRich:<span style="color: #000000;">cCargo</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>,;<br /> oRich:<span style="color: #000000;">end</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oDlg:<span style="color: #000000;">hide</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>,;<br /> dropread<span style="color: #000000;">(</span> cKdnr, cName ,cAufruf <span style="color: #000000;">)</span>, oDlg:<span style="color: #000000;">show</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>,;<br /> oDlg:<span style="color: #000000;">CoorsUpdate</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> ,;<br /> WritePProString<span style="color: #000000;">(</span> <span style="color: #ff0000;">"XFANG"</span>, <span style="color: #ff0000;">"TOP"</span>, str<span style="color: #000000;">(</span>odlg:<span style="color: #000000;">ntop</span><span style="color: #000000;">)</span>, <span style="color: #ff0000;">".<span style="color: #000000;">\I</span>NI<span style="color: #000000;">\W</span>INHOTEL.INI"</span> <span style="color: #000000;">)</span>,;<br /> WritePProString<span style="color: #000000;">(</span> <span style="color: #ff0000;">"XFANG"</span>, <span style="color: #ff0000;">"LEFT"</span>, str<span style="color: #000000;">(</span>odlg:<span style="color: #000000;">nLEFT</span><span style="color: #000000;">)</span>, <span style="color: #ff0000;">".<span style="color: #000000;">\I</span>NI<span style="color: #000000;">\W</span>INHOTEL.INI"</span> <span style="color: #000000;">)</span>,;<br /> oDlg:<span style="color: #000000;">end</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">}</span> <br /> <br /> <br /> oDlg:<span style="color: #000000;">bDropFiles</span> := <span style="color: #000000;">{</span>|nRow,nCol,aFiles| PaintTheName<span style="color: #000000;">(</span> nRow, nCol, aFiles, cKdnr <span style="color: #000000;">)</span>, oDlg:<span style="color: #000000;">show</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>,;<br /> oDlg:<span style="color: #000000;">CoorsUpdate</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> ,;<br /> WritePProString<span style="color: #000000;">(</span> <span style="color: #ff0000;">"XFANG"</span>, <span style="color: #ff0000;">"TOP"</span>, str<span style="color: #000000;">(</span>odlg:<span style="color: #000000;">ntop</span><span style="color: #000000;">)</span>, <span style="color: #ff0000;">".<span style="color: #000000;">\I</span>NI<span style="color: #000000;">\W</span>INHOTEL.INI"</span> <span style="color: #000000;">)</span>,;<br /> WritePProString<span style="color: #000000;">(</span> <span style="color: #ff0000;">"XFANG"</span>, <span style="color: #ff0000;">"LEFT"</span>, str<span style="color: #000000;">(</span>odlg:<span style="color: #000000;">nLEFT</span><span style="color: #000000;">)</span>, <span style="color: #ff0000;">".<span style="color: #000000;">\I</span>NI<span style="color: #000000;">\W</span>INHOTEL.INI"</span> <span style="color: #000000;">)</span>,;<br /> oDlg:<span style="color: #000000;">end</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> DragAcceptFiles<span style="color: #000000;">(</span> oRich:<span style="color: #000000;">hWnd</span>, .t. <span style="color: #000000;">)</span><br /> oRich:<span style="color: #000000;">bDropFiles</span> = oDlg:<span style="color: #000000;">bDropFiles</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">PAINT</span> SETWINDOWPOS<span style="color: #000000;">(</span> oDlg:<span style="color: #000000;">hWnd</span>, <span style="color: #000000;">-1</span>, <span style="color: #000000;">0</span>, ntop, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">3</span> <span style="color: #000000;">)</span> ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">(</span>oDlg:<span style="color: #0000ff;">Move</span><span style="color: #000000;">(</span>nTop, nLeft, <span style="color: #000000;">320</span>, <span style="color: #000000;">280</span> <span style="color: #000000;">)</span>,;<br /> DragAcceptFiles<span style="color: #000000;">(</span> oDlg:<span style="color: #000000;">hWnd</span>, .t. <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /><br /> FreeLibrary<span style="color: #000000;">(</span> hRichDLL <span style="color: #000000;">)</span><br /><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /> <br /><span style="color: #00C800;">function</span> dropread<span style="color: #000000;">(</span> cKdnr, cName, cAufruf <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> oDlg<br /> <span style="color: #00C800;">LOCAL</span> oOutlook <br /> <span style="color: #00C800;">local</span> myOlExp <br /> <span style="color: #00C800;">local</span> oMail <br /> <span style="color: #00C800;">local</span> oGet<br /> <span style="color: #00C800;">local</span> nDocNr := <span style="color: #000000;">0</span><br /> <span style="color: #00C800;">local</span> cKategorie := cAufruf + space<span style="color: #000000;">(</span><span style="color: #000000;">50</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> cStichwort := space<span style="color: #000000;">(</span><span style="color: #000000;">50</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> oK := .f.<br /> <span style="color: #00C800;">local</span> dDatum := date<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> dNachfassen := date<span style="color: #000000;">(</span><span style="color: #000000;">)</span> + <span style="color: #000000;">14</span><br /> <span style="color: #00C800;">local</span> cScanner := GetPvProfString<span style="color: #000000;">(</span> <span style="color: #ff0000;">"SCANNER"</span>,<span style="color: #ff0000;">"MODELL"</span>,<span style="color: #ff0000;">"N"</span>,<span style="color: #ff0000;">".<span style="color: #000000;">\I</span>NI<span style="color: #000000;">\W</span>INHOTEL.INI"</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> ziel := <span style="color: #ff0000;">""</span><br /> <span style="color: #00C800;">local</span> cWHArchiv := <span style="color: #ff0000;">""</span><br /> <span style="color: #00C800;">local</span> cGastOrdner := <span style="color: #ff0000;">""</span><br /> <span style="color: #00C800;">local</span> oDatei<br /> <span style="color: #00C800;">local</span> cEmailDMSdbf := <span style="color: #ff0000;">""</span><br /> <span style="color: #00C800;">local</span> I := <span style="color: #000000;">0</span><br /> <span style="color: #00C800;">local</span> cNotiz := <span style="color: #ff0000;">"cNotiz"</span><br /> <span style="color: #00C800;">local</span> oInhalt<br /> <span style="color: #00C800;">local</span> cDatei := <span style="color: #ff0000;">""</span><br /> <span style="color: #00C800;">local</span> cEmail := <span style="color: #ff0000;">""</span><br /> *--------------------------------------------------------------------------<br /> <br /> <span style="color: #00C800;">TRY</span><br /> oOutlook := TOleAuto<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Outlook.Application"</span> <span style="color: #000000;">)</span><br /> CATCH<br /> <span style="color: #0000ff;">Msginfo</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Outlook nicht installiert"</span> <span style="color: #000000;">)</span><br /> quit<br /> END<br /> <br /> <span style="color: #B900B9;">// msginfo( oMail:body )</span><br /> <span style="color: #B900B9;">// msginfo( oMail:subject )</span><br /><br /> <span style="color: #00C800;">IF</span> cAufruf = <span style="color: #ff0000;">"Outlook"</span><br /> <br /> myOlExp := oOutlook:<span style="color: #000000;">ActiveExplorer</span><br /> <br /> <span style="color: #00C800;">if</span> lIsDir<span style="color: #000000;">(</span>cFilePath<span style="color: #000000;">(</span> GetModuleFileName<span style="color: #000000;">(</span> GetInstance<span style="color: #000000;">(</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>+<span style="color: #ff0000;">"tmpEMail"</span> <span style="color: #000000;">)</span> = .F.<br /> lMKDir<span style="color: #000000;">(</span> cFilePath<span style="color: #000000;">(</span> GetModuleFileName<span style="color: #000000;">(</span> GetInstance<span style="color: #000000;">(</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>+<span style="color: #ff0000;">"tmpEMail"</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /> <br /> SYSREFRESH<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br /> oMail := myOlExp:<span style="color: #000000;">Selection</span>:<span style="color: #000000;">Item</span><span style="color: #000000;">(</span><span style="color: #000000;">1</span><span style="color: #000000;">)</span><br /> cDatei := cFilePath<span style="color: #000000;">(</span> GetModuleFileName<span style="color: #000000;">(</span> GetInstance<span style="color: #000000;">(</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>+<span style="color: #ff0000;">"tmpEMail<span style="color: #000000;">\d</span>rop"</span> + <span style="color: #ff0000;">".msg"</span> <br /><br /> oMail:<span style="color: #000000;">SaveAs</span> <span style="color: #000000;">(</span> cDatei <span style="color: #000000;">)</span><br /> <br /> cEmailDMSdbf := oMail:<span style="color: #0000ff;">subject</span><br /> <br /> <span style="color: #B900B9;">// msginfo( oMail:subject)</span><br /> cNotiz := <span style="color: #0000ff;">left</span><span style="color: #000000;">(</span> ALLTRIM<span style="color: #000000;">(</span> oMail:<span style="color: #000000;">body</span> <span style="color: #000000;">)</span>, <span style="color: #000000;">1000</span> <span style="color: #000000;">)</span><br /> cStichwort := oMail:<span style="color: #0000ff;">subject</span> + space<span style="color: #000000;">(</span><span style="color: #000000;">50</span><span style="color: #000000;">)</span><br /> <br /> elseIF cAufruf = <span style="color: #ff0000;">"Homepage"</span><br /> cDatei := cName<br /> <br /> <span style="color: #00C800;">else</span><br /> cDatei := cName<br /> <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">(</span> procname<span style="color: #000000;">(</span><span style="color: #000000;">)</span> + <span style="color: #ff0000;">" cDatei := cName "</span> + str<span style="color: #000000;">(</span>procline<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span> + <span style="color: #ff0000;">" "</span> + str<span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /> <br /> <span style="color: #00C800;">TRY</span><br /> cEmail := oMail:<span style="color: #000000;">SenderEmailAddress</span><br /> CATCH<br /> cEmail := <span style="color: #ff0000;">"no Email #"</span><br /> END<br /> <br /> <span style="color: #B900B9;">//msginfo( oMail:SenderEmailAddress )</span><br /> <br /> <span style="color: #B900B9;">//msginfo( oMail:CC )</span><br /> <br /><br /> <span style="color: #00C800;">if</span> lIsDir<span style="color: #000000;">(</span> cWHArchiv <span style="color: #000000;">)</span> = .F.<br /> lMKDir<span style="color: #000000;">(</span> cWHArchiv <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"SCANNER"</span><br /><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">SAY</span> oDatei <span style="color: #0000ff;">ID</span> <span style="color: #000000;">111</span> <span style="color: #0000ff;">OF</span> oDlg<br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> ckategorie <span style="color: #0000ff;">ID</span> <span style="color: #000000;">101</span> <span style="color: #0000ff;">of</span> oDlg<br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> cStichwort <span style="color: #0000ff;">ID</span> <span style="color: #000000;">102</span> <span style="color: #0000ff;">of</span> oDlg<br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> dDatum <span style="color: #0000ff;">ID</span> <span style="color: #000000;">105</span> <span style="color: #0000ff;">of</span> oDlg<br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> dNachfassen <span style="color: #0000ff;">ID</span> <span style="color: #000000;">106</span> <span style="color: #0000ff;">of</span> oDlg<br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> oGet <span style="color: #0000ff;">VAR</span> cNotiz <span style="color: #0000ff;">ID</span> <span style="color: #000000;">8002</span> <span style="color: #0000ff;">of</span> oDlg MEMO<br /><br /><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">103</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span>oDlg:<span style="color: #000000;">END</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">104</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span>OK:=.T.,oDlg:<span style="color: #000000;">END</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> oDatei:<span style="color: #000000;">SetText</span><span style="color: #000000;">(</span> cDatei <span style="color: #000000;">)</span> ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">PAINT</span> SETWINDOWPOS<span style="color: #000000;">(</span> oDlg:<span style="color: #000000;">hWnd</span>, <span style="color: #000000;">-1</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">3</span> <span style="color: #000000;">)</span> ;<br /> <span style="color: #0000ff;">CENTERED</span><br /><br /> <span style="color: #00C800;">IF</span> ok = .t.<br /><br /><span style="color: #B900B9;">// dmsdbf->docnummer := nDocNr</span><br /><span style="color: #B900B9;">// dmsdbf->Kategorie := ckategorie</span><br /><span style="color: #B900B9;">// dmsdbf->Stichwort := cStichwort</span><br /><span style="color: #B900B9;">// dmsdbf->gast_kdnr := cKdNr</span><br /><span style="color: #B900B9;">// dmsdbf->NOTIZ := cNotiz</span><br /><span style="color: #B900B9;">// dmsdbf->NUMMER := recno()</span><br /> <br /> <span style="color: #00C800;">endif</span><br /><br /> <br /> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #0000ff;">INIT</span> PROCEDURE PrgInit<br /><br /> SET CENTURY <span style="color: #0000ff;">ON</span><br /> SET EPOCH <span style="color: #0000ff;">TO</span> <span style="color: #0000ff;">YEAR</span><span style="color: #000000;">(</span>DATE<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><span style="color: #000000;">-98</span><br /><br /> SET DELETED <span style="color: #0000ff;">ON</span><br /> SET EXCLUSIVE OFF<br /><br /> REQUEST HB_Lang_DE<br /> REQUEST HB_CODEPAGE_DEWIN<br /><br /> HB_LangSelect<span style="color: #000000;">(</span><span style="color: #ff0000;">"DE"</span><span style="color: #000000;">)</span><br /> HB_SetCodePage<span style="color: #000000;">(</span><span style="color: #ff0000;">"DEWIN"</span><span style="color: #000000;">)</span><br /><br /> SET DATE <span style="color: #0000ff;">TO</span> GERMAN<br /><br /> SetHandleCount<span style="color: #000000;">(</span><span style="color: #000000;">205</span><span style="color: #000000;">)</span><br /> rddsetdefault<span style="color: #000000;">(</span> <span style="color: #ff0000;">"DBFCDX"</span> <span style="color: #000000;">)</span><br /> SetGetColorFocus<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><br /> EXTERN DESCEND<br /><br /> SetBalloon<span style="color: #000000;">(</span> .T. <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">RETURN</span><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> PaintTheName<span style="color: #000000;">(</span> nRow, nCol, aFiles,cKdnr <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> cAufruf := <span style="color: #ff0000;">"Dokumentimport"</span><br /> <span style="color: #00C800;">local</span> cName, cResult := <span style="color: #ff0000;">""</span><br /> <span style="color: #00C800;">local</span> n := <span style="color: #000000;">1</span><br /><br /><br /> <span style="color: #00C800;">while</span> ! Empty<span style="color: #000000;">(</span> cName := StrToken<span style="color: #000000;">(</span> aFiles<span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span>, n++, <span style="color: #ff0000;">"<span style="color: #000000;">\"</span> ) )<br /> if "</span>~<span style="color: #ff0000;">" $ cName<br /> cName = SFN2LFN( cResult + cName )<br /> endif<br /> cResult += cName + "</span>\<span style="color: #ff0000;">"<br /><br /> end<br /><br /> cResult = SubStr( cResult, 1, Len( cResult ) - 1 )<br /> cName := aFiles[ 1 ]<br />msginfo( procname() + "</span> c N a m e <span style="color: #ff0000;">" + str(procline()) + "</span> <span style="color: #ff0000;">" + cName )<br /> dropread( cKdnr, cName, cAufruf )<br /><br />return nil<br />//----------------------------------------------------------------------------//<br /><br /><br /><br /></span></div>[/code:1q2nh10n]
[code=fw:1q2nh10n]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #B900B9;">// Win32 RichEdit Control support</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Constant.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"WColors.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"RichEdit.ch"</span><br /><br />#ifdef __XPP__<br /> <span style="color: #00D7D7;">#define</span> <span style="color: #00C800;">Super</span> ::<span style="color: #000000;">TControl</span><br /> <span style="color: #00D7D7;">#define</span> <span style="color: #00C800;">New</span> _New<br />#endif<br /><br /><span style="color: #00D7D7;">#define</span> CTRL_CLASS <span style="color: #ff0000;">"RichEdit20A"</span><br /><br /><span style="color: #00D7D7;">#define</span> MK_MBUTTON <span style="color: #000000;">16</span><br /><br /><span style="color: #00D7D7;">#define</span> WM_SETREDRAW <span style="color: #000000;">11</span><br /><span style="color: #00D7D7;">#define</span> WM_ERASEBKGND <span style="color: #000000;">20</span><br /><span style="color: #00D7D7;">#define</span> WM_SETFONT <span style="color: #000000;">48</span><br /><span style="color: #00D7D7;">#define</span> WM_MBUTTONDOWN <span style="color: #000000;">519</span><br /><span style="color: #00D7D7;">#define</span> WM_MBUTTONDBLCLK <span style="color: #000000;">521</span><br /><span style="color: #00D7D7;">#define</span> WM_MOUSEWHEEL <span style="color: #000000;">522</span><br /><span style="color: #00D7D7;">#define</span> WM_CUT <span style="color: #000000;">768</span><br /><span style="color: #00D7D7;">#define</span> WM_COPY <span style="color: #000000;">769</span><br /><span style="color: #00D7D7;">#define</span> WM_PASTE <span style="color: #000000;">770</span><br /><span style="color: #00D7D7;">#define</span> WM_CLEAR <span style="color: #000000;">771</span><br /><span style="color: #00D7D7;">#define</span> WM_NCHITTEST <span style="color: #000000;">132</span> <span style="color: #B900B9;">// 0x84</span><br /><span style="color: #00D7D7;">#define</span> FNT_HEIGHT <span style="color: #000000;">17</span><br /><span style="color: #00D7D7;">#define</span> FW_BOLD <span style="color: #000000;">700</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">CLASS</span> xTRich <span style="color: #0000ff;">FROM</span> TRichEdit <br /><br /> <span style="color: #00C800;">DATA</span> cCargo, cKdNr<br /> <br /> <span style="color: #00C800;">METHOD</span> HandleEvent<span style="color: #000000;">(</span> nMsg, nWParam, nLParam <span style="color: #000000;">)</span><br /> <br /> <span style="color: #00C800;">METHOD</span> MButtonDown<span style="color: #000000;">(</span> nRow, nCol, nFlags <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">ENDCLASS</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> HandleEvent<span style="color: #000000;">(</span> nMsg, nWParam, nLParam <span style="color: #000000;">)</span> <span style="color: #00C800;">CLASS</span> xTRich<br /> <span style="color: #00C800;">local</span> nRow, nCol, nFlags<br /> <span style="color: #00C800;">local</span> ctext:=<span style="color: #ff0000;">"demo"</span><br /><br /> logfile<span style="color: #000000;">(</span><span style="color: #ff0000;">"log23.log"</span>, <span style="color: #000000;">{</span> nMsg <span style="color: #000000;">}</span> <span style="color: #000000;">)</span> <br /> <br /><br /><span style="color: #00C800;">if</span> nMsg = <span style="color: #000000;">2053</span> <br /> ::<span style="color: #000000;">lHighlight</span> := .t.<br /><span style="color: #00C800;">endif</span><br /><br /><br /><br /><span style="color: #B900B9;">//from IE we need .and. .not. nMsg = 1094</span><br /><span style="color: #00C800;">if</span> nMsg > <span style="color: #000000;">1000</span> .and. .not. nMsg = <span style="color: #000000;">1094</span><br /> <br /> <span style="color: #B900B9;">//from explorer this works</span><br /> <span style="color: #B900B9;">// if nMsg > 1000</span><br /> <span style="color: #00C800;">return</span> <span style="color: #000000;">0</span><br /> <span style="color: #00C800;">endif</span> <br /> <br /> <span style="color: #00C800;">do</span> <span style="color: #00C800;">case</span><br /> <br /> <span style="color: #00C800;">case</span> nMsg == WM_NCHITTEST<br /> <span style="color: #B900B9;">//::ReDo()</span><br /> <span style="color: #B900B9;">// cText := ::GetText()</span><br /> <br /> <span style="color: #00C800;">if</span> ::<span style="color: #000000;">cCargo</span> = GetWindowText<span style="color: #000000;">(</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">)</span> .or. len<span style="color: #000000;">(</span> ALLTRIM<span style="color: #000000;">(</span> GetWindowText<span style="color: #000000;">(</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> = <span style="color: #000000;">0</span><br /> <br /> <br /> logfile<span style="color: #000000;">(</span><span style="color: #ff0000;">"log1.log"</span>, <span style="color: #000000;">{</span> <span style="color: #ff0000;">"-"</span>, nMsg <span style="color: #000000;">}</span> <span style="color: #000000;">)</span> <br /> <br /> <span style="color: #00C800;">if</span> ::<span style="color: #000000;">lHighlight</span> = .t.<br /> <br /> <br /> ::<span style="color: #000000;">cCargo</span> := <span style="color: #ff0000;">"DRAGANDDROP"</span><br /> <br /> ::<span style="color: #000000;">MButtonDown</span><span style="color: #000000;">(</span> nRow, nCol, nFlags <span style="color: #000000;">)</span><br /> <br /> <span style="color: #00C800;">endif</span><br /> <br /> <span style="color: #00C800;">else</span> <br /> ::<span style="color: #000000;">cCargo</span> := GetWindowText<span style="color: #000000;">(</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">)</span><br /> ::<span style="color: #000000;">MButtonDown</span><span style="color: #000000;">(</span> nRow, nCol, nFlags <span style="color: #000000;">)</span><br /> <br /> <span style="color: #00C800;">endif</span> <br /> <br /> <span style="color: #00C800;">case</span> nMsg == FM_HIGHLIGHT<br /> <span style="color: #00C800;">return</span> ::<span style="color: #000000;">HighLightLine</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">case</span> nMsg == FM_HIGHLIGHTALL<br /> <span style="color: #00C800;">return</span> ::<span style="color: #000000;">HighlightAllText</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><br /> <span style="color: #00C800;">case</span> nMsg == WM_KEYDOWN<br /> <span style="color: #00C800;">if</span> ::<span style="color: #000000;">lReadOnly</span><br /> <span style="color: #00C800;">if</span> <span style="color: #000000;">(</span> nWParam == <span style="color: #0000ff;">Asc</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"E"</span> <span style="color: #000000;">)</span> .or. nWParam == <span style="color: #0000ff;">Asc</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"L"</span> <span style="color: #000000;">)</span> .or. ;<br /> nWParam == <span style="color: #0000ff;">Asc</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"J"</span> <span style="color: #000000;">)</span> .or. nWParam == <span style="color: #0000ff;">Asc</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"R"</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> .and. ;<br /> GetKeyState<span style="color: #000000;">(</span> VK_CONTROL <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">return</span> <span style="color: #000000;">0</span><br /> <span style="color: #00C800;">endif</span><br /> <span style="color: #00C800;">endif</span><br /><br /> <span style="color: #00C800;">return</span> ::<span style="color: #000000;">KeyDown</span><span style="color: #000000;">(</span> nWParam, nLParam <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">otherwise</span><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> nMsg == WM_MOUSEWHEEL .or. nMsg == WM_MBUTTONDOWN .or. ;<br /> nMsg == WM_MBUTTONDBLCLK <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">if</span> GetKeyState<span style="color: #000000;">(</span> VK_CONTROL <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">return</span> <span style="color: #000000;">0</span><br /> <span style="color: #00C800;">endif</span><br /> <span style="color: #00C800;">else</span><br /> <span style="color: #00C800;">Super</span>:<span style="color: #000000;">HandleEvent</span><span style="color: #000000;">(</span> nMsg, nWParam, nLParam <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /> <span style="color: #00C800;">endcase</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> MButtonDown<span style="color: #000000;">(</span> nRow, nCol, nKeyFlags <span style="color: #000000;">)</span> <span style="color: #00C800;">CLASS</span> xTRich<br /><br /><br /><span style="color: #00C800;">Super</span>:<span style="color: #000000;">MButtonDown</span><span style="color: #000000;">(</span> nRow, nCol, nKeyFlags <span style="color: #000000;">)</span><br /> <br /> <br /> <br /> ::<span style="color: #000000;">PostMsg</span><span style="color: #000000;">(</span> FM_CHANGE <span style="color: #000000;">)</span><br /><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><br /> </div>[/code:1q2nh10n] |
drag & drop box | Otto,
I have not tested your code yet, but I see a missing line that must be in FWH inherited classes from TWindow:
CLASSDATA lRegistered AS LOGICAL
Please check if that line makes any change in the problem you described, thanks |
drag & drop box | Hello Antonio,
I tested but it does not make any difference.
Best regards,
Otto |
drag & drop box | Otto,
Please provide me the RC for your example, thanks <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
drag & drop box | Hello Antonio,
thank you for helping me.
Best regards,
Otto
[url:2js3ear9]http://www.atzwanger-software.com/fw/xfang.zip[/url:2js3ear9] |
drag & drop box | Otto,
You should not inherit from TRichEdit as it seems as that control is not properly accepting it. I mean: we can not always interfere in the behavior of a standard control.
I modified your example to use a estandard TRichEdit and properly accepted everything <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
drag & drop box | Hello Antonio,
I am so glad. I tried several days to get it running.
Thank you very much.
Best regards,
Otto |
drag & drop box | Hello Antonio,
I tried your Suggestion.
I inserted a button like this:
REDEFINE BUTTONBMP ID 4002 OF oDlg ;
ACTION msginfo( oRich:gettext() )
When I drop files from Explorer oRich:gettext() is empty.
Best regards,
Otto |
drag & drop box | Hello Antonio,
is there any news on this subject.
Thanks in advance
Otto |
drag & drop from outlook | To all,As I can’t get working drag & drop from Outlook I have now a workaround with VB6.The VB6 program waits for the drop down and then executes my Fivewin program with Shell (App.Path + "\testole.exe " & s).This is the whole sourcecode of the program:[code:2x4ql4dw]Private Sub Form_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
If Data.GetFormat(vbCFText) = True Then
Dim s As String
Shell (App.Path + "\testole.exe " & s)
End
End If
End Sub
[/code:2x4ql4dw]But to have VB6 installed only for this little task is not so nice.Does someone have a FWH solution?Thanks in advanceOtto[img:2x4ql4dw]http://www.winhotel.at/fw/dragdropoutlook.jpg[/img:2x4ql4dw] |
drag & drop from outlook | Is this code (from you) working ?[code:3fxbdzq8]
#INCLUDE "FIVEWIN.CH"
function Main()
local oDlg
DEFINE DIALOG oDlg FROM 5, 5 TO 20, 40 TITLE "Drag & Drop"
oDlg:bLButtonUp := { |y,x,flags | DropFiles( oDlg ) }
ACTIVATE DIALOG oDlg
RETURN (.T.)
//----------------------------------------------------------------//
FUNCTION DropFiles( oDlg )
LOCAL oOutlook := TOleAuto():New( "Outlook.Application" )
local myOlExp := oOutlook:ActiveExplorer
local oMail
oMail := myOlExp:Selection:Item(1)
msginfo( oMail:body )
oMail:SaveAs ( "c:\temp\" + "testdemo.msg" )
RETURN NIL
//----------------------------------------------------------------//
[/code:3fxbdzq8] |
drag & drop from outlook | Hello Antonio,The Outlook part is working perfectly.Only drag and drop does not work as suspected.This code works only “on click” I mean you select a message in outlook and then you click on the little window.Best regards,Otto |
drag & drop from outlook | Maybe this C code can help to implement IDataobject?Part 3 - Implementing IDataObjectMany thanks to Davide Chiodi from Italy who has very kindly converted the data-obect code into a Pure C implementation - the download link is available at the bottom of this article!<!-- m --><a class="postlink" href="http://catch22.net/tuts/dragdrop/3">http://catch22.net/tuts/dragdrop/3</a><!-- m -->Regards,Otto |
drag & drop from outlook | <!-- m --><a class="postlink" href="http://catch22.net/tuts/dragdrop/5">http://catch22.net/tuts/dragdrop/5</a><!-- m -->>Welcome to the fifth article in the "OLE Drag and Drop" tutorial series! We are almost at the final stages in our OLE drag and drop implementation. The only thing left to do is implement the IDropSource and IDropTarget interfaces.<!-- m --><a class="postlink" href="http://catch22.net/sites/default/files/Catch22OLEpart5.rar">http://catch22.net/sites/default/files/ ... Epart5.rar</a><!-- m --> |
drag & drop from outlook | Otto,I have done a quick review at the source code, and it is C++ not C.It looks as an ActiveX implementation, something quite complex. I mean, it is not impossible to be implemented (using C++) but it is much more complex that the code that you already have working with just few FWH source code lines. |
drag & drop from outlook | Hello Antonio,thank you for your answer.My implementation does not recognize the drop event. FiveWin only recognizes files if they are dropped not textonly. There is also pure C code:<!-- m --><a class="postlink" href="http://catch22.net/sites/default/files/Catch22OLEpart6.rar">http://catch22.net/sites/default/files/ ... Epart6.rar</a><!-- m --><!-- m --><a class="postlink" href="http://catch22.net/tuts/dragdrop/6">http://catch22.net/tuts/dragdrop/6</a><!-- m -->Sat, 08/30/2008 - 09:17 — james Updated 6 Dec 2006Many thanks to Davide Chiodi from Italy who has very kindly converted the drop-target code into a Pure C implementation!Welcome to the sixth part of the "OLE Drag and Drop" tutorial series! This article will concentrate on implementing a small application which will act as a drop-target. What this means is that our application will be capable of receiving objects (be they files, pictures or text) which are dragged onto it.We will implement an IDropTarget COM interface which will allow any OLE application to drag it's data over our application. This will take the form of a simple EDIT control which can act as a target for dropped CF_TEXT data. Hopefully you will be able to take the code presented here and "drag" it straight into your own apps <!-- s;-) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";-)" title="Wink" /><!-- s;-) -->Become a "Drop Target"In order for a window to accept data from a drap-drop operation, it must be registered as a "drop target". There is an OLE API call - RegisterDragDrop - which is used for this very purpose. The function prototype looks like this:WINOLEAPI RegisterDragDrop(HWND hwnd, IDropTarget * pDropTarget); |
drag & drop from outlook | Otto,IMO it seems as a quite complex code. I am not saying that it is impossible. What I mean is that this may need several weeks to be tested and implemented. |
drag & drop from outlook | Hello Antonio,I see and I understand.But I think I have found a FIVEWIN own build in solution.I tried with the richtext control and extended the eventhandle methodMETHOD HandleEvent( nMsg, nWParam, nLParam ) CLASS TRichEdit do case case nMsg == WM_NCHITTEST msginfo( procname() + " " + str(procline()) + " " ) case nMsg == FM_HIGHLIGHT Now I only have to find out if I drop a file or a text from outlook.Thanks again,Otto |
drag and drop | come posso inserire un disegnin posto come bottone sulla barra ( button bar) e inserirla immagine posta a sinistra dello schermo e salvare l'immagine modificata ? |
drag and drop | I try to move a bitmap (ldrag)
I can move the control within certain limits, inside a 'specific area and not let it get out of this?
HowI can make and control it ? |
drag and drop | it is possible select an image from a folder and drag it into a image control ? |
drag and drop | you can try this
[code=fw:buh0vl4q]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Image.ch"</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">LOCAL</span> oWnd, oImage<br /><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">22</span>, <span style="color: #000000;">60</span> ;<br /> <span style="color: #0000ff;">TITLE</span> FWDESCRIPTION + <span style="color: #ff0000;">" JPG,JIF,GIF,BMP,DIB,RLE,TGA,PCX support!"</span> <br /><br /> @ <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">IMAGE</span> oImage <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">300</span>, <span style="color: #000000;">300</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">SCROLL</span> <span style="color: #0000ff;">ADJUST</span><br /><br /> oImage:<span style="color: #0000ff;">Progress</span><span style="color: #000000;">(</span> .f. <span style="color: #000000;">)</span><br /><br /> @ <span style="color: #000000;">2</span>, <span style="color: #000000;">56</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Select Image"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">20</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">ACTION</span> GetImage<span style="color: #000000;">(</span> oImage <span style="color: #000000;">)</span><br /><br /> @ <span style="color: #000000;">4</span>, <span style="color: #000000;">56</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Print"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">20</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">ACTION</span> PrintImage<span style="color: #000000;">(</span> oImage <span style="color: #000000;">)</span><br /><br /> @ <span style="color: #000000;">6</span>, <span style="color: #000000;">56</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Copy"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">OF</span> oWnd ;<br /> <span style="color: #0000ff;">ACTION</span> oImage:<span style="color: #000000;">CopyToClipboard</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> @ <span style="color: #000000;">8</span>, <span style="color: #000000;">56</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Paste"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">OF</span> oWnd ;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oImage:<span style="color: #000000;">LoadFromClipboard</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oImage:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> @ <span style="color: #000000;">10</span>, <span style="color: #000000;">56</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Save"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">OF</span> oWnd ;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oImage:<span style="color: #000000;">SaveImage</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"SAVED.JPG"</span>, <span style="color: #000000;">2</span>, <span style="color: #000000;">25</span> <span style="color: #000000;">)</span>, <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"saved as saved.jpg"</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> @ <span style="color: #000000;">12</span>, <span style="color: #000000;">56</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Exit"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">ACTION</span> oWnd:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br /> @ <span style="color: #000000;">20</span>, <span style="color: #000000;">56</span> <span style="color: #0000ff;">CHECKBOX</span> oImage:<span style="color: #000000;">lStretch</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Stretch"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">OF</span> oWnd ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">(</span> oImage:<span style="color: #000000;">ScrollAdjust</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oImage:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">ON</span> DROPFILES TakeDrop<span style="color: #000000;">(</span> aFiles, oImage <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> TakeDrop<span style="color: #000000;">(</span> aFiles, oImage <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">LOCAL</span> nPos<br /> <br /> <span style="color: #00C800;">FOR</span> nPos = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">(</span> aFiles <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">IF</span> UPPER<span style="color: #000000;">(</span> <span style="color: #0000ff;">RIGHT</span><span style="color: #000000;">(</span> aFiles<span style="color: #000000;">[</span> nPos <span style="color: #000000;">]</span>, <span style="color: #000000;">3</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> == <span style="color: #ff0000;">"JPG"</span> .OR. UPPER<span style="color: #000000;">(</span> <span style="color: #0000ff;">RIGHT</span><span style="color: #000000;">(</span> aFiles<span style="color: #000000;">[</span> nPos <span style="color: #000000;">]</span>, <span style="color: #000000;">3</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> == <span style="color: #ff0000;">"BMP"</span> <span style="color: #B900B9;">// etc.</span><br /> oImage:<span style="color: #000000;">LoadBmp</span><span style="color: #000000;">(</span> aFiles<span style="color: #000000;">[</span> nPos <span style="color: #000000;">]</span> <span style="color: #000000;">)</span><br /> EXIT<br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">NEXT</span> nPos<br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> GetImage<span style="color: #000000;">(</span> oImage <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> gcFile := cGetFile<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Bitmap (*.bmp)| *.bmp|"</span> + ;<br /> <span style="color: #ff0000;">"DIB (*.dib)| *.dib|"</span> + ;<br /> <span style="color: #ff0000;">"PCX (*.pcx)| *.pcx|"</span> + ;<br /> <span style="color: #ff0000;">"JPEG (*.jpg)| *.jpg|"</span> + ;<br /> <span style="color: #ff0000;">"GIF (*.gif)| *.gif|"</span> + ;<br /> <span style="color: #ff0000;">"TARGA (*.tga)| *.tga|"</span> + ;<br /> <span style="color: #ff0000;">"RLE (*.rle)| *.rle|"</span> + ;<br /> <span style="color: #ff0000;">"All Files (*.*)| *.*"</span> ;<br /> ,<span style="color: #ff0000;">"Please select a image file"</span>, <span style="color: #000000;">4</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">(</span> gcFile <span style="color: #000000;">)</span> .and. File<span style="color: #000000;">(</span> gcFile <span style="color: #000000;">)</span><br /> oImage:<span style="color: #000000;">LoadBmp</span><span style="color: #000000;">(</span> gcFile <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> PrintImage<span style="color: #000000;">(</span> oImage <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oPrn<br /><br /> <span style="color: #00C800;">PRINT</span> oPrn <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Image Printing"</span> PREVIEW<br /> <span style="color: #0000ff;">PAGE</span><br /> oPrn:<span style="color: #000000;">SayImage</span><span style="color: #000000;">(</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, oImage <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">ENDPAGE</span><br /> <span style="color: #0000ff;">ENDPRINT</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br />procedure AppSys <span style="color: #B900B9;">// XBase++ requirement</span><br /><br /><span style="color: #00C800;">return</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /> </div>[/code:buh0vl4q]
Saluti
Massimo |
drag and drop | only not run with TDIALOG |
drag and drop | you can try this
[code=fw:im9wwre9]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Image.ch"</span><br /><br /><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">LOCAL</span> oDlg, oImage<br /><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">22</span>, <span style="color: #000000;">60</span> ;<br /> <span style="color: #0000ff;">TITLE</span> FWDESCRIPTION + <span style="color: #ff0000;">" JPG,JIF,GIF,BMP,DIB,RLE,TGA,PCX support!"</span> <br /><br /> @ <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">IMAGE</span> oImage <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>, <span style="color: #000000;">150</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SCROLL</span> <span style="color: #0000ff;">ADJUST</span><br /><br /> oImage:<span style="color: #0000ff;">Progress</span><span style="color: #000000;">(</span> .f. <span style="color: #000000;">)</span><br /><br /> @ <span style="color: #000000;">1</span>, <span style="color: #000000;">28</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Select Image"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> GetImage<span style="color: #000000;">(</span> oImage <span style="color: #000000;">)</span><br /><br /> @ <span style="color: #000000;">2</span>, <span style="color: #000000;">28</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Print"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> PrintImage<span style="color: #000000;">(</span> oImage <span style="color: #000000;">)</span><br /><br /> @ <span style="color: #000000;">3</span>, <span style="color: #000000;">28</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Copy"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">OF</span> oDlg ;<br /> <span style="color: #0000ff;">ACTION</span> oImage:<span style="color: #000000;">CopyToClipboard</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> @ <span style="color: #000000;">4</span>, <span style="color: #000000;">28</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Paste"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">OF</span> oDlg ;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oImage:<span style="color: #000000;">LoadFromClipboard</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oImage:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> @ <span style="color: #000000;">5</span>, <span style="color: #000000;">28</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Save"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">OF</span> oDlg ;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> oImage:<span style="color: #000000;">SaveImage</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"SAVED.JPG"</span>, <span style="color: #000000;">2</span>, <span style="color: #000000;">25</span> <span style="color: #000000;">)</span>, <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"saved as saved.jpg"</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> @ <span style="color: #000000;">6</span>, <span style="color: #000000;">28</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Exit"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br /> @ <span style="color: #000000;">10</span>, <span style="color: #000000;">28</span> <span style="color: #0000ff;">CHECKBOX</span> oImage:<span style="color: #000000;">lStretch</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Stretch"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">OF</span> oDlg ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">(</span> oImage:<span style="color: #000000;">ScrollAdjust</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oImage:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> <br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTER</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> SetDrop<span style="color: #000000;">(</span> oDlg, oImage <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> SetDrop<span style="color: #000000;">(</span> oDlg, oImage <span style="color: #000000;">)</span> <br /> DragAcceptFiles<span style="color: #000000;">(</span> oDlg:<span style="color: #000000;">hWnd</span>, .t. <span style="color: #000000;">)</span><br /> oDlg:<span style="color: #000000;">bDropFiles</span> = <span style="color: #000000;">{</span> | nRow, nCol, aFiles | TakeDrop<span style="color: #000000;">(</span> nRow, nCol, aFiles, oImage <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> TakeDrop<span style="color: #000000;">(</span> nRow, nCol, aFiles, oImage <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">LOCAL</span> nPos<br /><br /> <span style="color: #00C800;">FOR</span> nPos = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">(</span> aFiles <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">IF</span> UPPER<span style="color: #000000;">(</span> <span style="color: #0000ff;">RIGHT</span><span style="color: #000000;">(</span> aFiles<span style="color: #000000;">[</span> nPos <span style="color: #000000;">]</span>, <span style="color: #000000;">3</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> == <span style="color: #ff0000;">"JPG"</span> .OR. UPPER<span style="color: #000000;">(</span> <span style="color: #0000ff;">RIGHT</span><span style="color: #000000;">(</span> aFiles<span style="color: #000000;">[</span> nPos <span style="color: #000000;">]</span>, <span style="color: #000000;">3</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> == <span style="color: #ff0000;">"BMP"</span> <span style="color: #B900B9;">// etc.</span><br /> oImage:<span style="color: #000000;">LoadBmp</span><span style="color: #000000;">(</span> aFiles<span style="color: #000000;">[</span> nPos <span style="color: #000000;">]</span> <span style="color: #000000;">)</span><br /> EXIT<br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">NEXT</span> nPos<br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> GetImage<span style="color: #000000;">(</span> oImage <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> gcFile := cGetFile<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Bitmap (*.bmp)| *.bmp|"</span> + ;<br /> <span style="color: #ff0000;">"DIB (*.dib)| *.dib|"</span> + ;<br /> <span style="color: #ff0000;">"PCX (*.pcx)| *.pcx|"</span> + ;<br /> <span style="color: #ff0000;">"JPEG (*.jpg)| *.jpg|"</span> + ;<br /> <span style="color: #ff0000;">"GIF (*.gif)| *.gif|"</span> + ;<br /> <span style="color: #ff0000;">"TARGA (*.tga)| *.tga|"</span> + ;<br /> <span style="color: #ff0000;">"RLE (*.rle)| *.rle|"</span> + ;<br /> <span style="color: #ff0000;">"All Files (*.*)| *.*"</span> ;<br /> ,<span style="color: #ff0000;">"Please select a image file"</span>, <span style="color: #000000;">4</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">(</span> gcFile <span style="color: #000000;">)</span> .and. File<span style="color: #000000;">(</span> gcFile <span style="color: #000000;">)</span><br /> oImage:<span style="color: #000000;">LoadBmp</span><span style="color: #000000;">(</span> gcFile <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> PrintImage<span style="color: #000000;">(</span> oImage <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oPrn<br /><br /> <span style="color: #00C800;">PRINT</span> oPrn <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Image Printing"</span> PREVIEW<br /> <span style="color: #0000ff;">PAGE</span><br /> oPrn:<span style="color: #000000;">SayImage</span><span style="color: #000000;">(</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, oImage <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">ENDPAGE</span><br /> <span style="color: #0000ff;">ENDPRINT</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br />procedure AppSys <span style="color: #B900B9;">// XBase++ requirement</span><br /><br /><span style="color: #00C800;">return</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /> </div>[/code:im9wwre9]
ciao
Massimo |
drag and drop from Outlook | I need to be able to drag and drop an email from Outlook not Outlook express and save it as a file (msg) somewhere.
Has anyone seen a solution for this? It must be possible since you can
drag an email out of outlook to explorer and it saves as a .msg file. I want
basically the same result, but through my application. Any ideas would be
greatly appreciated! |
drag and drop from outlook pure FIVEWIN solution | Now I have drag and drop from outlook working. Here is my source code.
Regards,
Otto
exe file for testing: you need a c:\temp dir. Your email is saved there as a msg file.
[url:31v78fl2]http://www.winhotel.at/fw/xfang.zip[/url:31v78fl2]
source:
testdrop.prg
[code:31v78fl2]#INCLUDE "FIVEWIN.CH"
REQUEST DBFCDX
REQUEST DBFFPT
function Main(cKdnr)
local oDlg, oRich
local hRichDLL := LoadLibrary( "riched20.dll" )
DEFINE DIALOG oDlg NAME "DROP" FROM 1, 1 TO 100, 100 PIXEL
oRich = xTRich():Redefine( 100, { || "" }, oDlg )
oRich:cKdNr := cKdNr
oRich:bMButtonDown := {|nRow, nCol, nFlags| oRich:end(),oDlg:hide(),dropread(cKdnr),oDlg:show(), oDlg:end()}
ACTIVATE DIALOG oDlg
FreeLibrary( hRichDLL )
return nil
//----------------------------------------------------------------------------//
function dropread()
local oDlg
LOCAL oOutlook := TOleAuto():New( "Outlook.Application" )
local myOlExp := oOutlook:ActiveExplorer
local oMail
local oGet
local cKategorie := space(50)
local cStichwort := space(50)
local oK := .f.
local dDatum := date()
local dNachfassen := date()+14
local cScanner := GetPvProfString( "SCANNER","MODELL","N",".\INI\WINHOTEL.INI" )
local ziel := ""
local oDatei
local I := 0
local cNotiz := "cNotiz"
local oInhalt
local cDatei := ""
*--------------------------------------------------------------------------
oMail := myOlExp:Selection:Item(1)
oMail:SaveAs ( "c:\temp\" + "testdemo.msg" )
cNotiz := left(ALLTRIM(oMail:body),1000)
cStichwort := oMail:subject + space(50)
DEFINE DIALOG oDlg RESOURCE "SCANNER"
REDEFINE SAY oDatei ID 111 OF oDlg
REDEFINE GET ckategorie ID 101 of oDlg
REDEFINE GET cStichwort ID 102 of oDlg
REDEFINE GET dDatum ID 105 of oDlg
REDEFINE GET dNachfassen ID 106 of oDlg
REDEFINE GET oGet VAR cNotiz ID 8002 of oDlg MEMO
REDEFINE BUTTON ID 103 OF oDlg ACTION (oDlg:END())
REDEFINE BUTTON ID 104 OF oDlg ACTION (OK:=.T.,oDlg:END())
ACTIVATE DIALOG oDlg ON INIT oDatei:SetText(cDatei) ;
ON PAINT SETWINDOWPOS( oDlg:hWnd, -1, 0, 0, 0, 0, 3 ) ;
CENTERED
IF ok = .t.
msginfo("Save data")
ENDIF
return nil
//----------------------------------------------------------------------------//
INIT PROCEDURE PrgInit
SET CENTURY ON
SET EPOCH TO YEAR(DATE())-98
SET DELETED ON
SET EXCLUSIVE OFF
REQUEST HB_Lang_DE
REQUEST HB_CODEPAGE_DEWIN
HB_LangSelect("DE")
HB_SetCodePage("DEWIN")
SET DATE TO GERMAN
SetHandleCount(205)
rddsetdefault( "DBFCDX" )
SetGetColorFocus()
EXTERN DESCEND
SetBalloon( .T. )
RETURN
//----------------------------------------------------------------------------//
[/code:31v78fl2]
xTRich.prg
[code:31v78fl2]
// Win32 RichEdit Control support
#include "FiveWin.ch"
#include "Constant.ch"
#include "WColors.ch"
#include "RichEdit.ch"
#ifdef __XPP__
#define Super ::TControl
#define New _New
#endif
#define CTRL_CLASS "RichEdit20A"
#define MK_MBUTTON 16
#define WM_MBUTTONDOWN 519
#define WM_MBUTTONDBLCLK 521
#define WM_MOUSEWHEEL 522
#define WM_NCHITTEST 132 // 0x84
//----------------------------------------------------------------------------//
CLASS xTRich FROM TRichEdit
DATA cCargo, cKdNr
METHOD HandleEvent( nMsg, nWParam, nLParam )
METHOD MButtonDown( nRow, nCol, nFlags )
ENDCLASS
//----------------------------------------------------------------------------//
METHOD HandleEvent( nMsg, nWParam, nLParam ) CLASS xTRich
local nRow, nCol, nFlags
do case
case nMsg == WM_NCHITTEST
if ::cCargo = GetWindowText( ::hWnd ) .or. len(ALLTRIM(GetWindowText( ::hWnd )))=0
else
::MButtonDown( nRow, nCol, nFlags )
::cCargo := GetWindowText( ::hWnd )
endif
case nMsg == FM_HIGHLIGHT
return ::HighLightLine()
case nMsg == FM_HIGHLIGHTALL
return ::HighlightAllText()
case nMsg == WM_KEYDOWN
if ::lReadOnly
if ( nWParam == Asc( "E" ) .or. nWParam == Asc( "L" ) .or. ;
nWParam == Asc( "J" ) .or. nWParam == Asc( "R" ) ) .and. ;
GetKeyState( VK_CONTROL )
return 0
endif
endif
return ::KeyDown( nWParam, nLParam )
otherwise
if( nMsg == WM_MOUSEWHEEL .or. nMsg == WM_MBUTTONDOWN .or. ;
nMsg == WM_MBUTTONDBLCLK )
if GetKeyState( VK_CONTROL )
return 0
endif
else
Super:HandleEvent( nMsg, nWParam, nLParam )
endif
endcase
return nil
//----------------------------------------------------------------------------//
METHOD MButtonDown( nRow, nCol, nKeyFlags ) CLASS xTRich
Super:MButtonDown( nRow, nCol, nKeyFlags )
::PostMsg( FM_CHANGE )
return nil
//----------------------------------------------------------------------------//
[/code:31v78fl2]
testdrop.rc
[code:31v78fl2]
// RESOURCE SCRIPT generated by "Pelles C for Windows, version 4.50".
#include <windows.h>
#include <commctrl.h>
#include <richedit.h>
LANGUAGE LANG_GERMAN,SUBLANG_GERMAN_AUSTRIAN
SCANNER DIALOGEX DISCARDABLE 18, 19, 254, 257
STYLE WS_POPUP|DS_MODALFRAME|WS_CAPTION|WS_SYSMENU
CAPTION "Import"
FONT 10, "MS Reference Sans Serif", 400, 0, 0
BEGIN
CONTROL "Stichwort", -1, "Static", WS_GROUP, 6, 56, 84, 8
CONTROL "Kategorie", -1, "Static", WS_GROUP, 6, 88, 73, 8
CONTROL "Datum", -1, "Static", WS_GROUP, 120, 9, 26, 8
CONTROL "nachfassen", -1, "Static", WS_GROUP, 99, 22, 39, 8
CONTROL "", 101, "Edit", WS_BORDER|WS_TABSTOP, 6, 106, 118, 12
CONTROL "", 102, "Edit", WS_BORDER|WS_TABSTOP, 6, 70, 119, 12
CONTROL "", 105, "Edit", WS_BORDER|WS_TABSTOP, 152, 8, 45, 12
CONTROL "", 106, "Edit", WS_BORDER|WS_TABSTOP, 153, 22, 45, 12
CONTROL "Abbruch", 103, "Button", WS_TABSTOP, 124, 224, 45, 14
CONTROL "Speichern", 104, "Button", WS_TABSTOP, 72, 224, 40, 14
CONTROL "Datei", 111, "Static", WS_GROUP, 6, 40, 240, 8
CONTROL "", 8002, "Edit", ES_MULTILINE|ES_WANTRETURN|WS_VSCROLL|WS_BORDER|WS_TABSTOP, 4, 124, 222, 82
END
DROP DIALOGEX DISCARDABLE 6, 18, 210, 142
STYLE WS_POPUP|DS_MODALFRAME|DS_CONTEXTHELP|DS_3DLOOK|WS_CAPTION|WS_SYSMENU|WS_VISIBLE
CAPTION "Dialog"
FONT 8, "MS Sans Serif", 0, 0, 1
BEGIN
CONTROL "OK", IDOK, "Button", WS_TABSTOP, 160, 5, 45, 15
CONTROL "Cancel", IDCANCEL, "Button", WS_TABSTOP, 160, 23, 45, 15
CONTROL "", 100, "RichEdit20A", ES_MULTILINE|ES_WANTRETURN|WS_VSCROLL|WS_BORDER|WS_TABSTOP, 8, 12, 102, 111
END
[/code:31v78fl2] |
drag and drop from outlook pure FIVEWIN solution | Otto,
if I have many mail and each amil have one or many files attach how i can save all ?
My wish is to save all on a cd rom and make an fwh appl to show mails
it is possible ? |
drag and drop from outlook pure FIVEWIN solution | Otto,
I 'm trying a test with outlook 2003
you test make error
see it pls
[code=fw:1wkki80k]<div class="fw" id="{CB}" style="font-family: monospace;"><br />Application<br />===========<br /> Path and <span style="color: #0000ff;">name</span>: <span style="color: #000000;">C</span>:\Documents and Settings\Acer\Desktop\xfang\xfang.EXE <span style="color: #000000;">(</span><span style="color: #000000;">32</span> bits<span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">Size</span>: <span style="color: #000000;">2</span>,<span style="color: #000000;">012</span>,<span style="color: #000000;">672</span> bytes<br /> Time <span style="color: #0000ff;">from</span> start: <span style="color: #000000;">0</span> hours <span style="color: #000000;">1</span> mins <span style="color: #000000;">8</span> secs <br /> Error occurred <span style="color: #00C800;">at</span>: <span style="color: #000000;">01.02</span><span style="color: #000000;">.2011</span>, <span style="color: #000000;">18</span>:<span style="color: #000000;">09</span>:<span style="color: #000000;">42</span><br /> Error description: <span style="color: #000000;">Error</span> TOleAuto/<span style="color: #000000;">-1</span> Unknown error: <span style="color: #000000;">TOLEAUTO</span>:<span style="color: #00C800;">NEW</span><br /> Args:<br /> <span style="color: #000000;">[</span> <span style="color: #000000;">1</span><span style="color: #000000;">]</span> = C Outlook.Application<br /><br />Stack Calls<br />===========<br /> Called <span style="color: #0000ff;">from</span>: => <span style="color: #00C800;">THROW</span><span style="color: #000000;">(</span><span style="color: #000000;">0</span><span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">source</span>\rtl\win32ole.prg => TOLEAUTO:<span style="color: #00C800;">NEW</span><span style="color: #000000;">(</span><span style="color: #000000;">335</span><span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">c</span>:\winhotel\xfang\source\testole.prg => DROPREAD<span style="color: #000000;">(</span><span style="color: #000000;">27</span><span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">c</span>:\winhotel\xfang\source\testole.prg => <span style="color: #000000;">(</span>b<span style="color: #000000;">)</span>MAIN<span style="color: #000000;">(</span><span style="color: #000000;">15</span><span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => TRICHEDIT:<span style="color: #000000;">MBUTTONDOWN</span><span style="color: #000000;">(</span><span style="color: #000000;">0</span><span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">c</span>:\winhotel\xfang\xtrich.prg => XTRICH:<span style="color: #000000;">MBUTTONDOWN</span><span style="color: #000000;">(</span><span style="color: #000000;">89</span><span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">c</span>:\winhotel\xfang\xtrich.prg => XTRICH:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">(</span><span style="color: #000000;">41</span><span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => _FWH<span style="color: #000000;">(</span><span style="color: #000000;">0</span><span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: => DIALOGBOX<span style="color: #000000;">(</span><span style="color: #000000;">0</span><span style="color: #000000;">)</span></div>[/code:1wkki80k]
any Idea and solution ? |
drag and drop from outlook pure FIVEWIN solution | Hello Silvio,
2003 is a very old program and it seems there is a problem with ActiveX.
Best regards,
Otto |
drag and drop from outlook pure FIVEWIN solution | and wichversion I can use ?
I have 2002/2003
on 2002 run ok
I not have 2010 and 2007 |
drag and drop from outlook pure FIVEWIN solution | Mister Otto, this program has not been updated? And what resource editor did you use to create the dialog? Thanks.
Regards, saludos. |
drag and drop from outlook pure FIVEWIN solution | Hello Joao,
This is a very old program (2008 or earlier) but we use it every day with all customers.
I'm searching for the source code and will post a new example.
I am also working on a program to manage the emails.
At the moment, everything is "floating".
For the email desktop we need the following components:
Document management
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=33215&p=234030&hilit=emaildesktop&sid=e2b0dce5f3903132a02fba860b1c3e30#p234030">viewtopic.php?f=3&t=33215&p=234030&hilit=emaildesktop&sid=e2b0dce5f3903132a02fba860b1c3e30#p234030</a><!-- l -->
time schedule system
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=45&t=40227&p=240418&sid=1ea92eda63070d635accaf15daba8216#p240418">viewtopic.php?f=45&t=40227&p=240418&sid=1ea92eda63070d635accaf15daba8216#p240418</a><!-- l -->
and the full-text search.
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=45&t=41010&p=245572&hilit=fulltextsearch&sid=7f88cb40a93b3ea42d3466c73357f4ff#p245572">viewtopic.php?f=45&t=41010&p=245572&hilit=fulltextsearch&sid=7f88cb40a93b3ea42d3466c73357f4ff#p245572</a><!-- l -->
The individual parts now work so far, and we have to merge them into a program.
Best regards,
Otto |
drag and drop from outlook pure FIVEWIN solution | Thanks Mister Otto, as soon as possible I'll test this with Outlook. Get ready because I'll call you, is that okay with you? Although about outlook, I don't understand anything.
Gracias señor Otto, lo antes posible probaré esto con Outlook. Prepárate porque te llamaré, ¿te parece bien? Aunque sobre Outlook, no entiendo nada.
Regards, saludos. |
drag and drop from outlook pure FIVEWIN solution | hi Silvio,
[quote="Silvio":235kcvse]if I have many mail and each amil have one or many files attach how i can save all ?
My wish is to save all on a cd rom and make an fwh appl to show mails
it is possible ?[/quote:235kcvse]
you have this Code now
[code=fw:235kcvse]<div class="fw" id="{CB}" style="font-family: monospace;"> oOutlook := TOleAuto<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Outlook.Application"</span> <span style="color: #000000;">)</span><br /> myOlExp := oOutlook:<span style="color: #000000;">ActiveExplorer</span><br /> oMail := myOlExp:<span style="color: #000000;">Selection</span>:<span style="color: #000000;">Item</span><span style="color: #000000;">(</span><span style="color: #000000;">1</span><span style="color: #000000;">)</span></div>[/code:235kcvse]
now enhance with
[code=fw:235kcvse]<div class="fw" id="{CB}" style="font-family: monospace;"> oAttachment := oMail:<span style="color: #000000;">Attachments</span><br /> nCount := oAttachment:<span style="color: #0000ff;">Count</span><br /> <span style="color: #00C800;">FOR</span> i := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> nCount<br /> oItem := oAttachment:<span style="color: #000000;">Item</span><span style="color: #000000;">(</span>i<span style="color: #000000;">)</span><br /> cName := oItem:<span style="color: #000000;">DisplayName</span><br /> oItem:<span style="color: #000000;">SaveAsFile</span><span style="color: #000000;">(</span>cName<span style="color: #000000;">)</span></div>[/code:235kcvse]
Note ! you need to "wait" until files is "real saved" before do next else i can be "corrupt"
so i "test" File Size
[code=fw:235kcvse]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #0000ff;">SLEEP</span><span style="color: #000000;">(</span><span style="color: #000000;">10</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">DO</span> <span style="color: #00C800;">WHILE</span> .T.<br /> aDir := Directory<span style="color: #000000;">(</span>cTemp<span style="color: #000000;">)</span><br /> <span style="color: #B900B9;">// wait until file size was uodate</span><br /> <span style="color: #00C800;">IF</span> aDir<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span><span style="color: #000000;">[</span>F_SIZE<span style="color: #000000;">]</span> > <span style="color: #000000;">100</span><br /> nBytes := aDir<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span><span style="color: #000000;">[</span>F_SIZE<span style="color: #000000;">]</span><br /> EXIT<br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #0000ff;">SLEEP</span><span style="color: #000000;">(</span><span style="color: #000000;">10</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDDO</span></div>[/code:235kcvse] |
drag and drop from outlook pure FIVEWIN solution | Sorry,
I not have this source code
I made it many years ago I not Know where It can be |
drag and drop tree | it's possible grah and drop a xbrowse trre to another ?
sample I have one level and two sublevels can I drag it into another xbrowse all lines ( one level and his subleves rows) |
drag drop oSay | Could someone show me what I am doing wrong that oSay drag doesn’t fire a oWnd:bDropOver?
// FiveWin - own Drag&Drop new features !!!
#include "FiveWin.ch"
static oWnd
//----------------------------------------------------------------------------//
function Main()
local oSay, oCrs, oIco1, oIco2, oIco3
DEFINE CURSOR oCrs DRAG
DEFINE WINDOW oWnd TITLE "FiveWin own Drag&Drop features"
oWnd:bDropOver = { || MsgStop( "Hey, don't litter here !!!" ) }
@ 4, 5 ICON oIco1 FILENAME "..\icons\Recycle2.ico" OF oWnd
@ 8, 15 SAY oSay PROMPT "Test" COLORS nRGB( 255, 0, 0 ) , nRGB( 55, 55, 255) of Ownd
oSay:lDrag = .t.
oSay:oDragCursor = oCrs
oIco1:oDragCursor = oCrs
ACTIVATE WINDOW oWnd
return nil |
drag drop oSay | I think there is SendMessage missing in the
METHOD LButtonUp CLASS TControl
if lDragging
...
if ::lDrag
??? SendMessage()
Could this be?
Regards,
Otto |
drag drop oSay | Otto,
Please add this in your PRG:
oSay:lWantClick = .T. |
drag drop oSay | Does not help:
Please could you check the LButtonUp method.
If you are in drag modus ::lDrag is true and in the
if ::lDrag
endif
there is no sendmessage.
Regards,
Otto |
drag drop oSay | Otto,
The SAYs don't react to the mouse. Its a standard Windows behavior.
You have to modify Class TSay Method HandleEvent() |
drag drop oSay | Hello Antonio,
I don't understand this.
I thought if you inherit you have the methods of the parent object.
Is this wrong?
Regards,
Otto |
drag drop oSay | Otto,
You are right. But as I have commented you, a SAY control will not receive mouse events. You can test this modifying method HandleEvent(), or consider to use another control, not a SAY. |
drag drop oSay | Hello Antonio,
I think it is the same with the other controls.
What is the problem if I change
return 0 to
return Super:LButtonUp( nRow, nCol, nKeyFlags )
in the LButtonUp method.
Then it is working. Do we face other problems.
Regards,
Otto |
drag from listbox to an extern program | I have a little VB6 program which I would like to re-write in FIVEWIN.There is a listbox from where I can drag items to other extern programs like WORD for e.g. .I only have to use OLEDropMode = manual in VB6.Does someone know how to do this with FW?Thanks in advanceOtto[img:1txg3ier]http://www.atzwanger-software.com/fw/platzhalter.jpg[/img:1txg3ier][code:1txg3ier]Begin VB.ListBox List1
BeginProperty Font
Name = "Courier"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 450
Left = 0
OLEDragMode = 1 'Automatisch
OLEDropMode = 1 'Manuell
TabIndex = 1
Top = 120
Width = 3015
End[/code:1txg3ier] |
drag from listbox to an extern program | Otto,I have a simular function in my application.What do I do ?1. I have defined a macro in Word which paste the clipboard into the document. So I have to put the cursor on the position where I want the paste to be happening.2. In my application, I doubleclick on the selected item in the listbox. In the action of the doubleclick, I copy the item to the clipboard after which the macro is executed which pastes the clipboard into my document.Source :[code:28e0pm9z]OpenClipBoard()
EmptyClipBoard()
SetClipBoardData(1,ALLTRIM(DBFVELD->VELD_AFK))
CloseClipBoard()
...
oWord:Run("JUD_PASTE")[/code:28e0pm9z]The data of the field are pasted into the document.It works very well.Good luck. |
drag from listbox to an extern program | Hello Michael,Thank you.But I would like a solution without macros.I don’t have good experiences with macros.Please see my response to OPEN XML, too. Regards,Otto |
drag visualization | Antonio, on a form whe n I take an control I want show on cursor the control and then I move the mouse on row,col and when I release the button of the mouse it draw the control on row,col ( of the mouse) .Howe I can make it ? |
drag visualization | Silvio,Please review fwh\samples\TestDrp3.prgYou can change a control position doing:oControl:nTop := ...oControl:nLeft := ... |
drag visualization | Antonio,
to make it easier, to place Logos or Vtitles on a defined Position inside a Dialog,
is it possible, to get the Screen-Position ( Top / Left ) for a given ID-Number of a Control from Resources ?
Sample :
I want to place with ABpaint a Logo above a Get-Field with ID 100 ( Position Top = 100, Left = 20 )
The Top / Left Calculation of the Logo would be :
Top = Get-Top - Space - Logo-Height
Left = Get Left
It would make it much easier, to place something on Screen in Relation to a Control.
Thank You
Best Regards
Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> |
drag visualization | Uwe,
Try:
[code=fw:q8ze102a]<div class="fw" id="{CB}" style="font-family: monospace;">nID := <span style="color: #000000;">100</span><br /><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;">(</span> oDlg:<span style="color: #000000;">aControls</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">if</span> oDlg:<span style="color: #000000;">aControls</span><span style="color: #000000;">[</span>i<span style="color: #000000;">]</span>:<span style="color: #000000;">nID</span> == nID<br /> nTop:= oDlg:<span style="color: #000000;">aControls</span><span style="color: #000000;">[</span>i<span style="color: #000000;">]</span><br /> nLeft:= oDlg:<span style="color: #000000;">aControls</span><span style="color: #000000;">[</span>i<span style="color: #000000;">]</span><br /> <span style="color: #00C800;">endif</span><br /><span style="color: #00C800;">endif</span></div>[/code:q8ze102a]
James |
drag zone on window without title | In this application I can drag the window from everywhere on the red zone.
Does someone know how to do this?
Thanks in advance
Otto
[img:182lv5p6]http://www.atzwanger.com/fw/crossedout.jpg[/img:182lv5p6] |
drag zone on window without title | Otto,
You have to use bLClicked to set a lDrag variable to .T., then use bMMoved to move the window and finally bLButtonUp to set the lDrag to .F.
oWnd:bLClicked = { || lDrag := .T. }
oWnd:bMMoved = { |nRow, nCol | If( lDrag, oWnd:Move( nRow, nCol ),) }
oWnd:bLButtonUp = { || lDrag := .F. } |
drag zone on window without title | Otto,
Here you have a working sample:
[code:39p8mxes]
#include "FiveWin.ch"
function Main()
local oWnd, nRowPos, nColPos, lDrag := .F.
DEFINE WINDOW oWnd STYLE WS_POPUP COLOR "W/R"
oWnd:bLClicked := { | nRow, nCol | nRowPos := nRow, nColPos := nCol, lDrag := .T. }
oWnd:bMMoved = { | nRow, nCol | If( lDrag, oWnd:Move( oWnd:nTop + nRow - nRowPos,;
oWnd:nLeft + nCol - nColPos ),) }
oWnd:bLButtonUp := { || lDrag := .F. }
ACTIVATE WINDOW oWnd
return nil
[/code:39p8mxes] |
drag zone on window without title | Hello Antonio,
thank you for your help.
Could you please have another look.
I would need this for MDI windows.
The ECR prints to the screen and there can be many receipts at one time.
The cook can with a touch screen sort the receipts and click crossed out the meals he so far has prepared.
A timer watch the directory and brings up the receipt to the screen. First all the meal are announced with Playsound() – thanks to you it is working .
It would be nice if the zone to drag the receipts would be bigger than the title because you have to use your fingers.
#include "FiveWin.ch"
#include "InKey.ch"
#include "xbrowse.ch"
static oWnd
static nTop:=0
//----------------------------------------------------------------------------//
function Main()
local oBar
DEFINE WINDOW oWnd MDI ;
TITLE "Küchenmeister"
DEFINE BUTTONBAR oBar 3D OF oWnd
DEFINE BUTTON OF oBar ACTION CustomerBrowse()
// SET MESSAGE OF oWnd TO "FiveWin xBase power!" CENTERED
ACTIVATE WINDOW oWnd MAXIMIZED
return nil
//----------------------------------------------------------------------------//
function CustomerBrowse()
local oWndChild, oBrw
local cAlias
local nRowPos, nColPos, lDrag := .F.
USE Customer NEW ALIAS ( cAlias := GetNewAlias( "CUST" ) ) SHARED
DEFINE WINDOW oWnd ChildSTYLE MDICHILD TITLE Alias() // WS_POPUP COLOR "W/R"
oBrw := TXBrowse():New( oWndChild )
oBrw:nMarqueeStyle := MARQSTYLE_HIGHLROW
oBrw:nColDividerStyle := LINESTYLE_BLACK
oBrw:lColDividerComplete := .t.
oBrw:SetRDD()
oBrw:CreateFromCode()
// oWndChild:oClient := oBrw
oWndChild:bLClicked := { | nRow, nCol | nRowPos := nRow, nColPos := nCol, lDrag := .T. }
oWndChild:bMMoved = { | nRow, nCol | If( lDrag, oWndChild:Move( oWndChild:nTop + nRow - nRowPos,;
oWndChild:nLeft + nCol - nColPos ),) }
oWndChild:bLButtonUp := { || lDrag := .F. }
return nil
// oWndChild:Center()
ACTIVATE WINDOW oWndChild ON INIT (oWndChild:nLeft(320),oWndChild:nTop(nTop*20),oWndChild:nWidth(250), oBrw:SetFocus())
return nil
//----------------------------------------------------------------------------//
function GetNewAlias( cDbfName )
static n := 0
nTop:=n
return cDbfName + StrZero( ++n, 2 )
//----------------------------------------------------------------------------// |
drag zone on window without title | Otto,
> It would be nice if the zone to drag the receipts would be bigger than the title because you have to use your fingers.
Please post a screenshot, thanks
BTW, your proposed example fails to properly run. Please check it before posting it |
drag zone on window without title | Antonio, which one do you mean?
Thanks in advance
Otto |
drag zone on window without title | Otto,
Here you have it:
[code:2yvq4sdh]
#include "FiveWin.ch"
#include "InKey.ch"
#include "xbrowse.ch"
static nTop:=0
//----------------------------------------------------------------------------//
function Main()
local oWnd, oBar
DEFINE WINDOW oWnd MDI ;
TITLE "Küchenmeister"
DEFINE BUTTONBAR oBar 3D OF oWnd
DEFINE BUTTON OF oBar ACTION CustomerBrowse()
// SET MESSAGE OF oWnd TO "FiveWin xBase power!" CENTERED
ACTIVATE WINDOW oWnd MAXIMIZED
return nil
//----------------------------------------------------------------------------//
function CustomerBrowse()
local oWnd, oBrw
local cAlias
local nRowPos, nColPos, lDrag := .F.
USE Customer NEW ALIAS ( cAlias := GetNewAlias( "CUST" ) ) SHARED
DEFINE WINDOW oWnd MDICHILD TITLE Alias() // WS_POPUP COLOR "W/R"
oBrw := TXBrowse():New( oWnd )
oBrw:nMarqueeStyle := MARQSTYLE_HIGHLROW
oBrw:nColDividerStyle := LINESTYLE_BLACK
oBrw:lColDividerComplete := .t.
oBrw:SetRDD()
oBrw:CreateFromCode()
// oWndChild:oClient := oBrw
oWnd:bLClicked := { | nRow, nCol | nRowPos := nRow, nColPos := nCol, lDrag := .T. }
oWnd:bMMoved = { | nRow, nCol | If( lDrag, oWnd:Move( oWnd:nTop + nRow - nRowPos,;
oWnd:nLeft + nCol - nColPos,,, .T. ),) }
oWnd:bLButtonUp := { || lDrag := .F. }
ACTIVATE WINDOW oWnd ON INIT (oWnd:nLeft(320),oWnd:nTop(nTop*20),oWnd:nWidth(250), oBrw:SetFocus())
return nil
//----------------------------------------------------------------------------//
function GetNewAlias( cDbfName )
static n := 0
nTop:=n
return cDbfName + StrZero( ++n, 2 )
//----------------------------------------------------------------------------//
[/code:2yvq4sdh] |
drag zone on window without title | Antonio, thank you very much.
Now I start the finishing.
Regards,
Otto
PS: I helped Ruth to set up a portal for our codesnips project. Ruth placed the FW logo on it.
Is it OK for you? |
drag zone on window without title | Otto,
>
PS: I helped Ruth to set up a portal for our codesnips project. Ruth placed the FW logo on it. Is it OK for you?
>
Yes, its fine, you are welcome <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
dragging of a button | Hello, I would like to limit dragging of a button only to vertically.
Can someone please help me.
Thanks in advance
Otto |
dragging of a button | Otto,
The right way would be to redefine Methods MouseMove() and LButtonUp() of Class TControl,
but in order to make it simpler you may try to use the DATAs bDrag and bPostDrag (both are codeblocks).
See the parameters that they use. bDrag is evaluated when the control is moving, bPostDrag only once when
the mouse button is released:
[code=fw:2pzl6l6z]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #00C800;">if</span> Valtype<span style="color: #000000;">(</span> ::<span style="color: #000000;">bDrag</span> <span style="color: #000000;">)</span> == <span style="color: #ff0000;">'B'</span><br /> Eval<span style="color: #000000;">(</span> ::<span style="color: #000000;">bDrag</span>, ::<span style="color: #000000;">nTop</span> + nRow - nMRow, ::<span style="color: #000000;">nLeft</span> + nCol - nMCol <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span></div>[/code:2pzl6l6z]
[code=fw:2pzl6l6z]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #00C800;">if</span> lMoved .AND. valtype<span style="color: #000000;">(</span> ::<span style="color: #000000;">bPostDrag</span> <span style="color: #000000;">)</span> == <span style="color: #ff0000;">'B'</span><br /> Eval<span style="color: #000000;">(</span> ::<span style="color: #000000;">bPostDrag</span>, <span style="color: #00C800;">SELF</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span></div>[/code:2pzl6l6z]
using those codeblocks you may control the new coordinates of the button, and modify them to allow the vertical move only.
I have not tested it myself, but it may work and it is much easier than redefining both methods. |
dragging of a button | Dear Antonio,
thank you for your help.
oBtn:bDrag := { | y,x,flags | oBtn:nLeft := 1000 }
For testing purpose I tried the following codeblock and it seems I can achieve what I want to do.
Best regards,
Otto |
dragging of a button | Otto,
I created a little test
I used a Group in design-mode to define a area
It works in all directions.
[img:2mfev1u0]http://www.pflegeplus.com/IMAGES/BMoveT.jpg[/img:2mfev1u0]
[img:2mfev1u0]http://www.pflegeplus.com/IMAGES/BMoveL.jpg[/img:2mfev1u0]
[img:2mfev1u0]http://www.pflegeplus.com/IMAGES/BMoveB.jpg[/img:2mfev1u0]
[img:2mfev1u0]http://www.pflegeplus.com/IMAGES/BMoveR.jpg[/img:2mfev1u0]
[b:2mfev1u0]The calculation :[/b:2mfev1u0]
[code=fw:2mfev1u0]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">FUNCTION</span> BTN_MOVE<span style="color: #000000;">(</span>oBtn3, x, y<span style="color: #000000;">)</span><br /><span style="color: #00C800;">LOCAL</span> nNewTop := x, nNewLeft := y, lNew := .F.<br /><br /><span style="color: #00C800;">IF</span> x < oGroup:<span style="color: #000000;">nTop</span> <br /> nNewTop := oGroup:<span style="color: #000000;">nTop</span><br /> lNew := .T.<br /><span style="color: #00C800;">ENDIF</span><br /><span style="color: #00C800;">IF</span> y < oGroup:<span style="color: #000000;">nLeft</span> <br /> nNewLeft := oGroup:<span style="color: #000000;">nLeft</span><br /> lNew := .T.<br /><span style="color: #00C800;">ENDIF</span><br /><span style="color: #00C800;">IF</span> x + oBtn3:<span style="color: #000000;">nHeight</span> > oGroup:<span style="color: #000000;">nBottom</span> <br /> nNewTop := oGroup:<span style="color: #000000;">nBottom</span> - oBtn3:<span style="color: #000000;">nHeight</span><br /> lNew := .T.<br /><span style="color: #00C800;">ENDIF</span><br /><span style="color: #00C800;">IF</span> y + oBtn3:<span style="color: #000000;">nWidth</span> > oGroup:<span style="color: #000000;">nRight</span> <br /> nNewLeft := oGroup:<span style="color: #000000;">nRight</span> - oBtn3:<span style="color: #000000;">nWidth</span><br /> lNew := .T.<br /><span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">IF</span> lNew = .T. <span style="color: #B900B9;">// only moved on wrong area</span><br /> oBtn3:<span style="color: #0000ff;">Move</span><span style="color: #000000;">(</span> nNewTop, nNewLeft, , , .T. <span style="color: #000000;">)</span><br /><span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">RETURN</span><span style="color: #000000;">(</span> <span style="color: #00C800;">NIL</span> <span style="color: #000000;">)</span><br /> </div>[/code:2mfev1u0]
best regards
Uwe <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> |
dragging of a button | Hallo Uwe,
herzlichen Dank.
Kannst du bitte das gesamte Beispiel posten.
Liebe Grüße
Otto |
dragging of a button | Otto,
the Download ( 3,6 MB )
[b:2pkshve9]The button can be moved only inside the group
a right mouseclick inside the dialog ( NOT group ) opens a alert with informations about button and group. Just move and resize the group around the button[/b:2pkshve9]
[color=#0000FF:2pkshve9][b:2pkshve9]It works in the other direction as well.
I mean, moving or resizing the group, the button will be adjusted to the new position / size.[/b:2pkshve9][/color:2pkshve9]
<!-- m --><a class="postlink" href="http://www.pflegeplus.com/DOWNLOADS/Movebtn1.zip">http://www.pflegeplus.com/DOWNLOADS/Movebtn1.zip</a><!-- m -->
[img:2pkshve9]http://www.pflegeplus.com/IMAGES/BtnMove1.jpg[/img:2pkshve9]
best regards
Uwe <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> |
dragging of a button | Hallo Uwe,
herzlichen Dank.
Ich probiere nun deine Funktion in mein Programm einzubauen.
lg
Otto |
dragging of a button | Otto,
a little change, to move multiple buttons with different sizes
In short, what You need :
[b:1r96onq3][color=#BF00FF:1r96onq3]// LOCAL nNewPos[5][3] = 5 buttons
// the first Button, the array = nNewPos[1]
oBtn[1]:bDrag := { | x,y,flags | nNewPos[1] := BTN_MOVE(oBtn[1], x, y, oBtn[1]:nWidth, oBtn[1]:nHeight) }
oBtn[1]:bMoved := { || IIF( nNewPos[1][1] = .T., oBtn[1]:Move( nNewPos[1][2], nNewPos[1][3], , , .T. ), NIL ) }[/color:1r96onq3][/b:1r96onq3]
ON INIT MAKE_AREA(oDlg) // only needed to find the area !
Maybe as a help to find the needed area, add these lines ( group ).
From the alert You can get the values.
FUNCTION MAKE_AREA(oDlg)
// Group-startposition and size : Top, Left, Bottom, Right
oGroup := TGroup():New( 100, 100, 300, 300, "", oDlg, NIL, NIL, .T. , .T. , NIL, .T. )
oGroup:SETCOLOR( , 23324454)
RETURN( NIL )
[color=#008000:1r96onq3][b:1r96onq3]Replace the group-values with the needed values
FUNCTION BTN_MOVE(oBtn, x, y, nWidth, nHeight)
LOCAL nNewTop := x, nNewLeft := y, lMove := .F.
IF x < oGroup:nTop
nNewTop := oGroup:nTop + 8 // Why needed + 8 ??
lMove := .T.
ENDIF
IF y < oGroup:nLeft
nNewLeft := oGroup:nLeft
lMove := .T.
ENDIF
IF x + nHeight > oGroup:nBottom
nNewTop := oGroup:nBottom - nHeight
lMove := .T.
ENDIF
IF y + nWidth > oGroup:nRight
nNewLeft := oGroup:nRight - nWidth
lMove := .T.
ENDIF
RETURN( {lMove, nNewTop, nNewLeft} )[/b:1r96onq3][/color:1r96onq3]
the Download ( 3,6 MB )
<!-- m --><a class="postlink" href="http://www.pflegeplus.com/DOWNLOADS/Movebtn2.zip">http://www.pflegeplus.com/DOWNLOADS/Movebtn2.zip</a><!-- m -->
[img:1r96onq3]http://www.pflegeplus.com/IMAGES/BtnMove2.jpg[/img:1r96onq3]
[img:1r96onq3]http://www.pflegeplus.com/IMAGES/BtnMove3.jpg[/img:1r96onq3]
best regards
Uwe <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> |
draw a group on window | I wish draw an image over the wallImage of a window main , a roundbox , an other text
Now I use this command to draw an image inton a window and write a test into a window :
::oWndMain:bPainted := {|hDC| (PalBmpDraw( hDC, 0, 0, ::oImagen:hBitmap,, ::oWndMain:nWidth, ::oWndMain:nHeight,, .T.),;
Scrivitesto(hDC)) }
FUNCTION Scrivitesto (hDC)
Local aRect2:= {oApp:oWndMain:nHeight-120,;
oApp:oWndmain:nWidth-420,;
oApp:oWndMain:nHeight-10,;
oApp:oWndMain:nWidth-10}
SetBkMode(hDC,1)
SetTextColor(hDC,CLR_RED)
DrawTextEx( hDC, oApp:cBuild+" - "+oApp:cUrl, aRect2, 1 )
return nil |
draw a group on window | Silvio,
This is the most extrem situation :
painting a text on top of a painted alphablended imgage
of the main-window image.
Text can be 3D or with shadow
[img:35fd6lvm]http://www.pflegeplus.com/pictures/alpha8.jpg[/img:35fd6lvm]
Best Regards
Uwe <!-- s:!: --><img src="{SMILIES_PATH}/icon_exclaim.gif" alt=":!:" title="Exclamation" /><!-- s:!: --> |
draw a group on window | Uwe,
I saw a Prg of Minigui
and I wish remake it on fwh ...and so I saw it can be too hard on fwh
I have a Main Window maximized Nosize
I have a image wall paper into this window
I have a frame ( on minigui is called group ) at the right of this window
it is transparent and on this group there some says
on bottom on right I have some text with a bmp
If I rem nosize all run ok and everything remains the same coordinates if I need to resize the window |
draw a line for 5 seconds | Some more tests and improvements
Download :
<!-- m --><a class="postlink" href="http://www.pflegeplus.com/DOWNLOADS/Drawline1.zip">http://www.pflegeplus.com/DOWNLOADS/Drawline1.zip</a><!-- m -->
[img:30mclzs8]http://www.pflegeplus.com/IMAGES/Drawline1.jpg[/img:30mclzs8]
best regards
Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> |
draw a line for 5 seconds | I must show a line on a dialog for 5 second when I press a button
I try insert a timer after draw the line and refresh the dialog but it sometimes run
test sample
[code=fw:10ctnr79]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"constant.ch"</span><br /><br /><span style="color: #00C800;">static</span> oDlgMain<br /><br /><span style="color: #00C800;">Function</span> Test<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">Local</span> nBottom := <span style="color: #000000;">22</span><br /> <span style="color: #00C800;">Local</span> nRight := <span style="color: #000000;">66</span><br /> <span style="color: #00C800;">Local</span> nWidth := <span style="color: #0000ff;">Max</span><span style="color: #000000;">(</span> nRight * DLG_CHARPIX_W, <span style="color: #000000;">180</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">Local</span> nHeight := nBottom * DLG_CHARPIX_H<br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlgMain ;<br /> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"test"</span> ;<br /> <span style="color: #0000ff;">SIZE</span> nWidth, nHeight <span style="color: #0000ff;">PIXEL</span> ;<br /> <span style="color: #0000ff;">STYLE</span> nOr<span style="color: #000000;">(</span> DS_MODALFRAME, WS_POPUP, WS_CAPTION, <span style="color: #000000;">4</span> <span style="color: #000000;">)</span><br /><br /><br /><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlgMain <span style="color: #0000ff;">center</span> ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">(</span>ShowButtonLines<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><span style="color: #B900B9;">//-------------------------------------------------------------------------------------------------------------//</span><br /><span style="color: #00C800;">Function</span> ShowButtonLines<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">Local</span> ob<span style="color: #000000;">[</span><span style="color: #000000;">5</span><span style="color: #000000;">]</span><br /> <span style="color: #00C800;">Local</span> oFont<br /> <span style="color: #00C800;">local</span> hsize:= <span style="color: #000000;">15</span><br /> <span style="color: #00C800;">local</span> Vsize:= <span style="color: #000000;">15</span><br /> <span style="color: #00C800;">Local</span> hdc:= oDlgMain:<span style="color: #000000;">GetDc</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"MS SANS SERIF"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-12</span><br /><br /> @ <span style="color: #000000;">50</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">BTNBMP</span> ob<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">OF</span> oDlgMain ;<br /> <span style="color: #0000ff;">SIZE</span> hsize,Vsize ;<br /> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"1"</span> <span style="color: #000000;">2007</span> ;<br /> <span style="color: #0000ff;">FONT</span> oFont BOTTOM ;<br /> <span style="color: #0000ff;">ACTION</span> Temporizzatore<span style="color: #000000;">(</span><span style="color: #000000;">1</span>,oDlgMain<span style="color: #000000;">)</span><br /><br /><br /> ob<span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span>:<span style="color: #000000;">lEllipse</span> = .T.<br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> <br /><span style="color: #B900B9;">//----------------------------------------------------------------------------------------------------------------//</span><br /><span style="color: #00C800;">Function</span> Temporizzatore<span style="color: #000000;">(</span>nIndex,oDlg<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">Local</span> oOutLic<br /> <span style="color: #00C800;">Local</span> nInterval := <span style="color: #000000;">1000</span><br /> <span style="color: #00C800;">Local</span> nTimeLic:= <span style="color: #000000;">0</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">TIMER</span> oOutLic <span style="color: #0000ff;">INTERVAL</span> nInterval <span style="color: #0000ff;">OF</span> oDlg ;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> nTimeLic ++, <span style="color: #00C800;">if</span> <span style="color: #000000;">(</span> nTimeLic == <span style="color: #000000;">2</span>, <span style="color: #000000;">(</span>oOutLic:<span style="color: #000000;">end</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>,oDlg:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>,Show_Paylines<span style="color: #000000;">(</span>nIndex,oDlg<span style="color: #000000;">)</span> <span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">TIMER</span> oOutLic<br /> <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><span style="color: #B900B9;">//--------------------------------------------------------------------------------------------------------------------------------//</span><br /> <span style="color: #00C800;">Static</span> <span style="color: #00C800;">Function</span> Show_Paylines<span style="color: #000000;">(</span>nIndex,oDlg<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">Local</span> stop_interval := <span style="color: #000000;">30000</span><br /> <span style="color: #00C800;">local</span> cc := <span style="color: #000000;">0</span><br /> <span style="color: #00C800;">local</span> hdc:= oDlg:<span style="color: #000000;">getDc</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">Do</span> <span style="color: #00C800;">case</span><br /> <span style="color: #00C800;">case</span> nIndex= <span style="color: #000000;">1</span><br /> Disegna_Linea<span style="color: #000000;">(</span> hDC, <span style="color: #000000;">160</span>, <span style="color: #000000;">30</span>, <span style="color: #000000;">160</span>, <span style="color: #000000;">320</span>, CLR_HRED,<span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">case</span> nIndex= <span style="color: #000000;">2</span><br /> <br /> <span style="color: #00C800;">case</span> nIndex= <span style="color: #000000;">3</span><br /> <br /> <span style="color: #00C800;">case</span> nIndex= <span style="color: #000000;">4</span><br /> <br /> <span style="color: #00C800;">case</span> nIndex= <span style="color: #000000;">5</span><br /> <br /> <span style="color: #00C800;">endcase</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><span style="color: #B900B9;">//-----------------------------------------------------------------------------------------------------------//</span><br /> <span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> Disegna_Linea<span style="color: #000000;">(</span> hDC, nTop, nLeft, nBottom, nRight, nColor,nTipo <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> hPen := CREATEPEN<span style="color: #000000;">(</span> PS_SOLID, <span style="color: #000000;">4</span>, nColor <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> hOldPen := SELECTOBJECT<span style="color: #000000;">(</span> hDC, hPen <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">do</span> <span style="color: #00C800;">case</span><br /> <span style="color: #00C800;">case</span> nTipo = <span style="color: #000000;">1</span><br /> MOVETO<span style="color: #000000;">(</span> hDC, nLeft, nTop <span style="color: #000000;">)</span><br /> LINETO<span style="color: #000000;">(</span> hDC, nRight, nTop <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">case</span> nTipo = <span style="color: #000000;">2</span><br /> MOVETO<span style="color: #000000;">(</span> hDC, nRight, nBottom <span style="color: #000000;">)</span><br /> LINETO<span style="color: #000000;">(</span> hDC,nBottom, nRight <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">case</span> nTipo = <span style="color: #000000;">3</span><br /> MOVETO<span style="color: #000000;">(</span> hDC,nLeft, nTop<span style="color: #000000;">)</span><br /> LINETO<span style="color: #000000;">(</span> hDC, nBottom, nRight <span style="color: #000000;">)</span><br /><br /><br /> <span style="color: #00C800;">endcase</span><br /><br /> SELECTOBJECT<span style="color: #000000;">(</span> hDC, hOldPen <span style="color: #000000;">)</span><br /><br /> DELETEOBJECT<span style="color: #000000;">(</span> hPen <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:10ctnr79] |
draw a line for 5 seconds | Silvio,
have a look at
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=31628&p=184653#p184653">viewtopic.php?f=3&t=31628&p=184653#p184653</a><!-- l -->
best regards
Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> |
draw a line for 5 seconds | Uwe,
the idea can be good but
I use the functions
DRAW_BOX1(oDlg)
DRAW_BOX2(oDlg)
AUTODELETE(oDlg)
and give me this error
[code=fw:1tq5y08x]<div class="fw" id="{CB}" style="font-family: monospace;">Total memory allocated: <span style="color: #000000;">699410</span> bytes <span style="color: #000000;">(</span><span style="color: #000000;">40185</span> blocks<span style="color: #000000;">)</span><br />WARNING! Memory allocated but not released: <span style="color: #000000;">1732</span> bytes <span style="color: #000000;">(</span><span style="color: #000000;">18</span> blocks<span style="color: #000000;">)</span><br />source\compiler\hbpcode.c<span style="color: #000000;">(</span><span style="color: #000000;">680</span><span style="color: #000000;">)</span> hb_compGenPCode3<span style="color: #000000;">(</span><span style="color: #000000;">)</span> Block <span style="color: #000000;">1</span> 0xb11aa4 <span style="color: #000000;">(</span><span style="color: #0000ff;">size</span> <span style="color: #000000;">100</span><span style="color: #000000;">)</span> <span style="color: #ff0000;">"$õ.l7d_.yyyyyyyd..l7d_.yyyyyyyd."</span><br />source\compiler\harbour.c<span style="color: #000000;">(</span><span style="color: #000000;">709</span><span style="color: #000000;">)</span> hb_compVariableAdd<span style="color: #000000;">(</span><span style="color: #000000;">)</span> Block <span style="color: #000000;">2</span> 0xb136b0 <span style="color: #000000;">(</span><span style="color: #0000ff;">size</span> <span style="color: #000000;">28</span><span style="color: #000000;">)</span> <span style="color: #ff0000;">"<span style="color: #000000;">\3</span>8<span style="color: #000000;">\0</span>8<span style="color: #000000;">\B</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>3<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\F</span>4<span style="color: #000000;">\0</span>3<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\2</span>0<span style="color: #000000;">\A</span>0<span style="color: #000000;">\B</span>2<span style="color: #000000;">\0</span>0<span style="color: #000000;">\C</span>8<span style="color: #000000;">\0</span>0<span style="color: #000000;">\9</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0"</span><br />source\compiler\harbour.c<span style="color: #000000;">(</span><span style="color: #000000;">1844</span><span style="color: #000000;">)</span> hb_compFunctionNew<span style="color: #000000;">(</span><span style="color: #000000;">)</span> Block <span style="color: #000000;">3</span> 0xb2a3b0 <span style="color: #000000;">(</span><span style="color: #0000ff;">size</span> <span style="color: #000000;">164</span><span style="color: #000000;">)</span> <span style="color: #ff0000;">"<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>2<span style="color: #000000;">\0</span>0<span style="color: #000000;">\3</span>9<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>1<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\B</span>0<span style="color: #000000;">\3</span>6<span style="color: #000000;">\B</span>1<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0"</span><br />source\compiler\harbour.c<span style="color: #000000;">(</span><span style="color: #000000;">709</span><span style="color: #000000;">)</span> hb_compVariableAdd<span style="color: #000000;">(</span><span style="color: #000000;">)</span> Block <span style="color: #000000;">4</span> 0xb229c8 <span style="color: #000000;">(</span><span style="color: #0000ff;">size</span> <span style="color: #000000;">28</span><span style="color: #000000;">)</span> <span style="color: #ff0000;">"<span style="color: #000000;">\1</span>4<span style="color: #000000;">\8</span>9<span style="color: #000000;">\B</span>2<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>1<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\F</span>1<span style="color: #000000;">\0</span>3<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\2</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\1</span>1<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0"</span><br />source\compiler\hbpcode.c<span style="color: #000000;">(</span><span style="color: #000000;">680</span><span style="color: #000000;">)</span> hb_compGenPCode3<span style="color: #000000;">(</span><span style="color: #000000;">)</span> Block <span style="color: #000000;">5</span> 0xb1bf10 <span style="color: #000000;">(</span><span style="color: #0000ff;">size</span> <span style="color: #000000;">100</span><span style="color: #000000;">)</span> <span style="color: #ff0000;">"<span style="color: #000000;">\0</span>D<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\7</span>4<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\4</span>9<span style="color: #000000;">\0</span>0<span style="color: #000000;">\B</span>0<span style="color: #000000;">\0</span>1<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\5</span>7<span style="color: #000000;">\B</span>6<span style="color: #000000;">\4</span>9<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>1<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0"</span><br />source\compiler\harbour.c<span style="color: #000000;">(</span><span style="color: #000000;">1844</span><span style="color: #000000;">)</span> hb_compFunctionNew<span style="color: #000000;">(</span><span style="color: #000000;">)</span> Block <span style="color: #000000;">6</span> 0xb228c4 <span style="color: #000000;">(</span><span style="color: #0000ff;">size</span> <span style="color: #000000;">164</span><span style="color: #000000;">)</span> <span style="color: #ff0000;">"<span style="color: #000000;">\4</span>4<span style="color: #000000;">\E</span>4<span style="color: #000000;">\B</span>1<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>2<span style="color: #000000;">\0</span>0<span style="color: #000000;">\1</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>1<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\C</span>8<span style="color: #000000;">\2</span>9<span style="color: #000000;">\B</span>2<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0"</span><br />source\compiler\harbour.c<span style="color: #000000;">(</span><span style="color: #000000;">709</span><span style="color: #000000;">)</span> hb_compVariableAdd<span style="color: #000000;">(</span><span style="color: #000000;">)</span> Block <span style="color: #000000;">7</span> 0xb2e84c <span style="color: #000000;">(</span><span style="color: #0000ff;">size</span> <span style="color: #000000;">28</span><span style="color: #000000;">)</span> <span style="color: #ff0000;">"<span style="color: #000000;">\1</span>C<span style="color: #000000;">\E</span>0<span style="color: #000000;">\B</span>1<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>2<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\E</span>8<span style="color: #000000;">\0</span>3<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\2</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\8</span>6<span style="color: #000000;">\0</span>1<span style="color: #000000;">\6</span>C<span style="color: #000000;">\1</span>A<span style="color: #000000;">\6</span>4<span style="color: #000000;">\6</span>A<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0"</span><br />source\compiler\harbour.c<span style="color: #000000;">(</span><span style="color: #000000;">709</span><span style="color: #000000;">)</span> hb_compVariableAdd<span style="color: #000000;">(</span><span style="color: #000000;">)</span> Block <span style="color: #000000;">8</span> 0xb2e474 <span style="color: #000000;">(</span><span style="color: #0000ff;">size</span> <span style="color: #000000;">28</span><span style="color: #000000;">)</span> <span style="color: #ff0000;">"<span style="color: #000000;">\D</span>4<span style="color: #000000;">\0</span>9<span style="color: #000000;">\B</span>2<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>2<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\E</span>7<span style="color: #000000;">\0</span>3<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\2</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\4</span>C<span style="color: #000000;">\E</span>8<span style="color: #000000;">\B</span>2<span style="color: #000000;">\0</span>0"</span><br />source\compiler\harbour.c<span style="color: #000000;">(</span><span style="color: #000000;">709</span><span style="color: #000000;">)</span> hb_compVariableAdd<span style="color: #000000;">(</span><span style="color: #000000;">)</span> Block <span style="color: #000000;">9</span> 0xb2e434 <span style="color: #000000;">(</span><span style="color: #0000ff;">size</span> <span style="color: #000000;">28</span><span style="color: #000000;">)</span> <span style="color: #ff0000;">"<span style="color: #000000;">\0</span>8<span style="color: #000000;">\E</span>5<span style="color: #000000;">\B</span>1<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>2<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\E</span>6<span style="color: #000000;">\0</span>3<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\2</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>1<span style="color: #000000;">\0</span>0<span style="color: #000000;">\3</span>8<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\7</span>4<span style="color: #000000;">\E</span>4<span style="color: #000000;">\B</span>2<span style="color: #000000;">\0</span>0"</span><br />source\compiler\harbour.c<span style="color: #000000;">(</span><span style="color: #000000;">709</span><span style="color: #000000;">)</span> hb_compVariableAdd<span style="color: #000000;">(</span><span style="color: #000000;">)</span> Block <span style="color: #000000;">10</span> 0xb1e538 <span style="color: #000000;">(</span><span style="color: #0000ff;">size</span> <span style="color: #000000;">28</span><span style="color: #000000;">)</span> <span style="color: #ff0000;">"<span style="color: #000000;">\1</span>4<span style="color: #000000;">\8</span>9<span style="color: #000000;">\B</span>2<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>3<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\E</span>5<span style="color: #000000;">\0</span>3<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\2</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\4</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\3</span>4<span style="color: #000000;">\E</span>4<span style="color: #000000;">\B</span>2<span style="color: #000000;">\0</span>0"</span><br />source\compiler\hbpcode.c<span style="color: #000000;">(</span><span style="color: #000000;">658</span><span style="color: #000000;">)</span> hb_compGenPCode2<span style="color: #000000;">(</span><span style="color: #000000;">)</span> Block <span style="color: #000000;">11</span> 0xb1be24 <span style="color: #000000;">(</span><span style="color: #0000ff;">size</span> <span style="color: #000000;">200</span><span style="color: #000000;">)</span> <span style="color: #ff0000;">"<span style="color: #000000;">\0</span>D<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\7</span>4<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\8</span>5<span style="color: #000000;">\E</span>7<span style="color: #000000;">\0</span>3<span style="color: #000000;">\7</span>E<span style="color: #000000;">\0</span>3<span style="color: #000000;">\E</span>8<span style="color: #000000;">\0</span>3<span style="color: #000000;">\8</span>6<span style="color: #000000;">\0</span>1<span style="color: #000000;">\7</span>E<span style="color: #000000;">\0</span>4<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\8</span>6<span style="color: #000000;">\0</span>3<span style="color: #000000;">\3</span>0<span style="color: #000000;">\0</span>7<span style="color: #000000;">\0</span>0<span style="color: #000000;">\6</span>C<span style="color: #000000;">\3</span>8<span style="color: #000000;">\6</span>4<span style="color: #000000;">\0</span>C<span style="color: #000000;">\0</span>0<span style="color: #000000;">\5</span>F<span style="color: #000000;">\0</span>3<span style="color: #000000;">\5</span>9"</span><br />source\compiler\harbour.c<span style="color: #000000;">(</span><span style="color: #000000;">1844</span><span style="color: #000000;">)</span> hb_compFunctionNew<span style="color: #000000;">(</span><span style="color: #000000;">)</span> Block <span style="color: #000000;">12</span> 0xb2090c <span style="color: #000000;">(</span><span style="color: #0000ff;">size</span> <span style="color: #000000;">164</span><span style="color: #000000;">)</span> <span style="color: #ff0000;">"<span style="color: #000000;">\A</span>4<span style="color: #000000;">\3</span>2<span style="color: #000000;">\B</span>2<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>1<span style="color: #000000;">\0</span>0<span style="color: #000000;">\3</span>9<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>1<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\3</span>8<span style="color: #000000;">\E</span>5<span style="color: #000000;">\B</span>1<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0"</span><br />source\compiler\harbour.c<span style="color: #000000;">(</span><span style="color: #000000;">2763</span><span style="color: #000000;">)</span> hb_compPrepareOptimize<span style="color: #000000;">(</span><span style="color: #000000;">)</span> Block <span style="color: #000000;">13</span> 0xb2ef6c <span style="color: #000000;">(</span><span style="color: #0000ff;">size</span> <span style="color: #000000;">16</span><span style="color: #000000;">)</span> <span style="color: #ff0000;">"<span style="color: #000000;">\0</span>E<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\4</span>6<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\4</span>C<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\7</span>B<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0"</span><br />source\compiler\hbpcode.c<span style="color: #000000;">(</span><span style="color: #000000;">747</span><span style="color: #000000;">)</span> hb_compGenPCodeN<span style="color: #000000;">(</span><span style="color: #000000;">)</span> Block <span style="color: #000000;">14</span> 0xb231a8 <span style="color: #000000;">(</span><span style="color: #0000ff;">size</span> <span style="color: #000000;">200</span><span style="color: #000000;">)</span> <span style="color: #ff0000;">"<span style="color: #000000;">\0</span>D<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\7</span>4<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\8</span>5<span style="color: #000000;">\D</span>B<span style="color: #000000;">\0</span>3<span style="color: #000000;">\6</span>7<span style="color: #000000;">\0</span>1<span style="color: #000000;">\0</span>0<span style="color: #000000;">\7</span>9<span style="color: #000000;">\2</span>2<span style="color: #000000;">\1</span>C<span style="color: #000000;">\2</span>D<span style="color: #000000;">\8</span>6<span style="color: #000000;">\0</span>1<span style="color: #000000;">\6</span>C<span style="color: #000000;">\1</span>A<span style="color: #000000;">\6</span>4<span style="color: #000000;">\6</span>A<span style="color: #000000;">\1</span>D<span style="color: #000000;">\4</span>D<span style="color: #000000;">\6</span>9<span style="color: #000000;">\2</span>0<span style="color: #000000;">\6</span>4<span style="color: #000000;">\6</span>9<span style="color: #000000;">\7</span>3<span style="color: #000000;">\7</span>0<span style="color: #000000;">\6</span>9<span style="color: #000000;">\6</span>1"</span><br />source\compiler\harbour.c<span style="color: #000000;">(</span><span style="color: #000000;">1844</span><span style="color: #000000;">)</span> hb_compFunctionNew<span style="color: #000000;">(</span><span style="color: #000000;">)</span> Block <span style="color: #000000;">15</span> 0xb29f20 <span style="color: #000000;">(</span><span style="color: #0000ff;">size</span> <span style="color: #000000;">164</span><span style="color: #000000;">)</span> <span style="color: #ff0000;">"<span style="color: #000000;">\1</span>C<span style="color: #000000;">\3</span>6<span style="color: #000000;">\B</span>1<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>1<span style="color: #000000;">\0</span>0<span style="color: #000000;">\2</span>B<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0"</span><br />source\compiler\hbpcode.c<span style="color: #000000;">(</span><span style="color: #000000;">680</span><span style="color: #000000;">)</span> hb_compGenPCode3<span style="color: #000000;">(</span><span style="color: #000000;">)</span> Block <span style="color: #000000;">16</span> 0xb2a130 <span style="color: #000000;">(</span><span style="color: #0000ff;">size</span> <span style="color: #000000;">100</span><span style="color: #000000;">)</span> <span style="color: #ff0000;">"<span style="color: #000000;">\2</span>4<span style="color: #000000;">\D</span>5<span style="color: #000000;">\0</span>3<span style="color: #000000;">\6</span>C<span style="color: #000000;">\3</span>7<span style="color: #000000;">\6</span>4<span style="color: #000000;">\5</span>F<span style="color: #000000;">\0</span>1<span style="color: #000000;">\5</span>C<span style="color: #000000;">\1</span>E<span style="color: #000000;">\5</span>C<span style="color: #000000;">\0</span>A<span style="color: #000000;">\5</span>D<span style="color: #000000;">\E</span>A<span style="color: #000000;">\0</span>1<span style="color: #000000;">\5</span>D<span style="color: #000000;">\0</span>E<span style="color: #000000;">\0</span>1<span style="color: #000000;">\5</span>C<span style="color: #000000;">\0</span>A<span style="color: #000000;">\5</span>C<span style="color: #000000;">\0</span>A<span style="color: #000000;">\5</span>D<span style="color: #000000;">\F</span>F<span style="color: #000000;">\0</span>0<span style="color: #000000;">\5</span>C<span style="color: #000000;">\0</span>8<span style="color: #000000;">\1</span>4<span style="color: #000000;">\0</span>9<span style="color: #000000;">\6</span>C<span style="color: #000000;">\3</span>7<span style="color: #000000;">\6</span>4"</span><br />source\compiler\harbour.c<span style="color: #000000;">(</span><span style="color: #000000;">709</span><span style="color: #000000;">)</span> hb_compVariableAdd<span style="color: #000000;">(</span><span style="color: #000000;">)</span> Block <span style="color: #000000;">17</span> 0xb2b05c <span style="color: #000000;">(</span><span style="color: #0000ff;">size</span> <span style="color: #000000;">28</span><span style="color: #000000;">)</span> <span style="color: #ff0000;">"<span style="color: #000000;">\3</span>8<span style="color: #000000;">\0</span>8<span style="color: #000000;">\B</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>3<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\D</span>4<span style="color: #000000;">\0</span>3<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\2</span>0<span style="color: #000000;">\4</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\3</span>8<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0"</span><br />source\compiler\harbour.c<span style="color: #000000;">(</span><span style="color: #000000;">1844</span><span style="color: #000000;">)</span> hb_compFunctionNew<span style="color: #000000;">(</span><span style="color: #000000;">)</span> Block <span style="color: #000000;">18</span> 0xb2b500 <span style="color: #000000;">(</span><span style="color: #0000ff;">size</span> <span style="color: #000000;">164</span><span style="color: #000000;">)</span> <span style="color: #ff0000;">"<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>2<span style="color: #000000;">\0</span>0<span style="color: #000000;">\3</span>9<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>1<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\5</span>C<span style="color: #000000;">\B</span>0<span style="color: #000000;">\B</span>2<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0<span style="color: #000000;">\0</span>0"</span><br /> </div>[/code:1tq5y08x] |
draw a line for 5 seconds | Uwe,
RUN OK BUT HERE NOT RUN |
draw a line for 5 seconds | Silvio,
did You RECOMPILE the original sample ?
It seems inside Your App, something is missing.
I don't get any error-messages. ( tested on WINDOWS10 and FWH September 2015 )
A solution of Your other problem : moving a record of a DB,F is included as well.
The LINE-solution :
the Height of the BOX-function is defined with the pen-size and shows a line
NO extra-function needed.
best regards
Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> |
draw a line for 5 seconds | Added SINGLE-line painting on ion
Download :
<!-- m --><a class="postlink" href="http://www.pflegeplus.com/DOWNLOADS/Drawline1.zip">http://www.pflegeplus.com/DOWNLOADS/Drawline1.zip</a><!-- m -->
A mouseclick on any other control deletes the line
[img:1brl4bu2]http://www.pflegeplus.com/IMAGES/Testline1.jpg[/img:1brl4bu2]
best regards
Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> |
draw a line for 5 seconds | Uwe,
I can draw the line but on my app it is different because the lines must be draw from a procedure and not from user :
function calc_reward(aCombinations)
Local payout := 0
Local partial_payout := 0
Local nRow:= 300
Local nCol:= 35
Local oFontSAY
DEFINE FONT oFontSAY NAME "MS SANS SERIF" SIZE 0,-12
// Line 2
partial_payout := calc_line(aCombinations[2][1], aCombinations[2][2], aCombinations[2][3])
LogFile( "test.txt", {"calc line 1",partial_payout } )
if (partial_payout > 0)
@ 300,ncol SAY "Line 2 pays " + str(partial_payout) OF oDlgMain SIZE 200,25 PIXEL FONT oFontSAY
payout += partial_payout
[b:19ftk5fk]highlight_line(1)[/b:19ftk5fk]
Endif
....
return nil
the function [b:19ftk5fk]highlight_line(1)[/b:19ftk5fk] must draw the line 1
Function highlight_line(nIndex)
Local hdc:= oDlgMain:GetDc()
do case
case nIndex= 1
DRAWBOX( hDC, 160, 30, 160, 320, CLR_HRED,1 )
case nIndex= 2
DRAWBOX( hDC, 60, 30, 60, 320, CLR_RED,1 )
case nIndex= 3
DRAWBOX( hDC, 260, 30, 260, 320, CLR_YELLOW,1 )
case nIndex= 4
DRAWBOX( hDC, 15, 26, 300, 300, CLR_BLACK,3 )
case nIndex= 5
DRAWBOX( hdc,300, 40, 300, 22, CLR_BLUE, 3 )
endcase
return nil |
draw a line for 5 seconds | Silvio,
[b:3kni2phh]please keep the syntax [/b:3kni2phh]:
A defined nIndex shows a different line
[b:3kni2phh]< Left, Top, Right, Bottom, Radius1, Radius2, Color, Pen >[/b:3kni2phh] <!-- s:!: --><img src="{SMILIES_PATH}/icon_exclaim.gif" alt=":!:" title="Exclamation" /><!-- s:!: -->
Index = 4 and Index = 5 is NOT clear
[color=#FF0000:3kni2phh]case nIndex= 1
DRAWBOX( hDC, 160, 30, 160, 320, CLR_HRED,1 )
[b:3kni2phh]RoundBox( hDC, 30, 160, 320, 161, 10, 10, CLR_HRED,1 ) [/b:3kni2phh]
case nIndex= 2
DRAWBOX( hDC, 60, 30, 60, 320, CLR_RED,1 )
case nIndex= 3
DRAWBOX( hDC, 260, 30, 260, 320, CLR_YELLOW,1 )
case nIndex= 4
DRAWBOX( hDC, 15, 26, 300, 300, CLR_BLACK,3 ) ???????????
case nIndex= 5
DRAWBOX( hdc,300, 40, 300, 22, CLR_BLUE, 3 ) ??????????[/color:3kni2phh]
Draw a line
oBtn[1]:bGotFocus = { |nKey, nFlags| ( DRAW_LINE1(oDlg, [color=#0000FF:3kni2phh]1[/color:3kni2phh]), oDlg:Refresh() ) }
Delete the line on focus-change
oBtn[1]:bLostFocus = { |nKey, nFlags| ( DRAW_LINE1(oDlg,[color=#FF0000:3kni2phh] 0[/color:3kni2phh]), oDlg:Refresh() ) }
[color=#0040FF:3kni2phh][b:3kni2phh]// ---------------------- show SINGLE LINE or BOX -----
STATIC FUNCTION DRAW_LINE1(oDlg, nIndex)
// Left, Top, Right, Bottom, Radius1, Radius2, Color, Pen
oDlg:bPainted := < |hDC|
IIF( nIndex= 0, RoundBox( hDC, 0, 0, 0, 0, 0, 0, 0, NIL ), NIL )
IIF( nIndex= 1, RoundBox( hDC, 30, 160, 320, 161, 10, 10, CLR_HRED,1 ), NIL )
IIF( nIndex= 2, RoundBox( hDC, 30, 60, 320, 61, 10, 10, CLR_RED,1 ), NIL )
IIF( nIndex= 3, RoundBox( hDC, 30, 260, 320, 261, 10, 10, CLR_YELLOW,1 ), NIL )
IIF( nIndex= 4, RoundBox( hDC, 305, 608, 485, 609, 10, 10, CLR_BLACK,3 ), NIL )
IIF( nIndex= 5, RoundBox( hDC, 305, 300, 485, 301, 10, 10, CLR_BLUE, 3 ), NIL )
// difference between TOP and BOTTOM + 1
RETURN NIL
>[/b:3kni2phh][/color:3kni2phh]
best regards
Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> |
draw and bitmaps | if a draw an arrow can transform it to bitmap ? and give it an action ? |
draw and bitmaps | You can use a TBtnBmp |
draw and bitmaps | perhaps U not understand me
i made an small arrow and i show it on my window now i want transform it as a bitmap as an control and i want click on it to make an action..it is possible? |
draw and bitmaps | Silvio, could you post a screenshot?
Regards,
Otto |
draw and bitmaps | i'll wish not show this but Ucan understand me.
i made tabs with office 2007 style with bmps and now i see btnbmp to navigate on each tab .
i tryed to modify btnbmp to office 2007 but on tabs the btnbmps are smaller and i cannot see the difference.
Now i thinked to create two arrows left and right , i draw with graphics functions , now i want transform it to create a bitmap or link to each arrow an action , i also created a box with an Xon centre to simulate a close to close each tab.
to see ttabs 2007 U can see on this forum i posted an images yesterday. |
draw with poligon | [url=http://imageshack.us:29mof9xb][img:29mof9xb]http://img247.imageshack.us/img247/622/slightright2wg7.png[/img:29mof9xb][/url:29mof9xb]
I must create this bitmap with poligon function so that it is divided in four various pieces so that I can move them with the mouse : the three bars and the small triangle (with drag and drop)
it' is possible ? |
draw with poligon | Silvio,
You may check where the mouse is clicked and change the mouse cursor to a one that also paints the portion that you want to move. When the mouse is released then you check where it is and change the drawing accordingly. |
draw with poligon | thanks but i not know how make it
can you create a small test to work on ? |
draw with poligon | Silvio,
Please implement the PolyPoligon() calls to draw the different parts of your drawing first, thanks
Then I will show you how to move them, |
draw with poligon | i not know how make it |
draw with poligon | Antonio,
this is the code
#include "FiveWin.ch"
Function Main()
Local obtn,oWnd
Local oGrayBrush := CreateSolidBrush( GetSysColor(15) )
local hDC := GetDC()
DEFINE WINDOW oWnd TITLE "Testing button" ;
FROM 3, 3 TO 20, 80 ;
COLOR CLR_BLACK, GetSysColor( COLOR_BTNFACE )
obtn:=Arrow_SX(hDC,11, oWnd:nWidth - 25 + 2 , oGrayBrush)
ACTIVATE WINDOW oWnd
Return nil
static Function DrawPolygon( hDC, aPoints, nColor )
local n
local nLen := len( aPoints )
local hPen, hOldPen
if nColor != nil
hPen := CreatePen( PS_SOLID,1,nColor)
hOldPen := SelectObject( hDC, hPen )
endif
Moveto( hDC, aPoints[1,1], aPoints[1,2])
for n := 2 to nLen
Lineto( hDC, aPoints[n,1], aPoints[n,2])
next
Lineto( hDC, aPoints[1,1], aPoints[1,2])
if nColor != nil
SelectObject(hDC,hOldPen)
DeleteObject( hPen )
endif
return 0
Function Arrow_SX ( hDC,nTop,nLeft, nColor )
DrawPolygon( hDC, { {nLeft+4,nTop } ,;
{nLeft ,nTop+4 } ,;
{nLeft+4,nTop+8 } ,;
{nLeft+4,nTop } }, nColor )
return 0
How I can move it ? |
draw with poligon | Silvio,
You have to find the area where the mouse is clicked and then select a mouse cursor based on the underlying drawing |
drawing on pictures | Hello Uwe,
can we make a directory browsing with Fivewin search all photos and then automatically print the file name on the photo.
I would like to make a simple program that allows me to personalize Bootstrap templates quickly.
I attache a screenshot.
[img:2mtt55n2]https://mybergland.com/fwforum/printonphoto.jpg[/img:2mtt55n2]
Thank you in advance
Otto |
drawing on pictures | Hello,
I have now a little program to print the filename + size on the template photos.
This way it is easy to insert your own photos into a template.
Next is to parse the text and create varables for the text.
Best regards
Otto
[img:zlmyqhyz]https://mybergland.com/fwforum/template.jpg[/img:zlmyqhyz] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.