Author | Topic: XbpMenu() position | |
---|---|---|
Carlos a Beling | XbpMenu() position on Tue, 11 Jan 2011 10:10:53 -0200 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> </head> <body bgcolor="#ffffff" text="#000000"> Hello:<br> good morning.<br> <br> As I had not answer about the post below that I posted in the NG Bug Report, I think that it may be really some thing that might be send to you.<br> If it is not the case I apologize;<br> <br> <br> <the first one post><br> Em 8/1/2011 13:14, Carlos a Beling escreveu:<br> <br> <tt>Good afternoon.<br> </tt><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><span class="Apple-style-span" style="font-family: arial,sans-serif; font-size: 16px;"><tt><span title="Eu usei o programa OwnerDraw.prg e criei uma nova classe." style="background-color: rgb(255, 255, 255);">I used the program OwnerDraw.prg and created a new one class.<span class="Apple-converted-space"> <br> I need to know a position of the menu item that is highlighted for to show a tip below it.<br> </span></span><span title="Estou tendo um problema porque seu método :currentPos()está retornando :currentpos()[02]" style="background-color: rgb(255, 255, 255);">The problem is that the method oXbpMenu:currentPos() is returning strange value in oXbpMenu:currentpos()[02]<span class="Apple-converted-space"></span></span><span title="inválida." style="background-color: rgb(255, 255, 255);">.<span class="Apple-converted-space"> </span><br> </span></tt><span title="Exibi a posição através dos comandos abaixo colocados em :drawItem()" style="background-color: rgb(255, 255, 255);"><tt>So, I displayed the positions in the oXbpMenu:setParent() in the method oXbpMenu:drawItem()<span class="Apple-converted-space"> </span>and I got the positions as follow:</tt><br> <br> </span><span title="cls" style="background-color: rgb(255, 255, 255);">cls<span class="Apple-converted-space"> <br> <tt>QOut('Mouse Position ', GetPointerPos()) ==> {160, 153} </tt><br> </span></span><tt><span title="QOut('Setparent() ', ::setParent()) ==> XbpCrt" style="background-color: rgb(255, 255, 255);">QOut('SetParent() ', ::SetParent ()) ==> XbpCrt<span class="Apple-converted-space"> </span><br> </span><span title="QOut('Setparent():currentpos()', ::setParent():currentPos()) ==> {152, 106}" style="background-color: rgb(255, 255, 255);">QOut('SetParent():currentpos()', ::SetParent():currentPos ()) ==> {152, 106}<span class="Apple-converted-space"> </span><br> </span><span title="QOut('oXbpMenu:CurrentPos() ', ::currentPos()) ==> {1, -345}" style="background-color: rgb(255, 255, 255);">QOut('oXbpMenu:CurrentPos() ', ::currentPos()) ==> {1, -345} <<<<<<<<<<span class="Apple-converted-space"> </span><br> </span></tt></span></span><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><span class="Apple-style-span" style="font-family: arial,sans-serif; font-size: 16px;"><span title="QOut('Bound rect ', aInfo[4]) ==> { 0, 1, 200, 24}" style="background-color: rgb(255, 255, 255);"><tt>QOut('Bound rect ', aInfo[4]) ==> {0, 1, 200, 24}</tt></span></span></span><br> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><span class="Apple-style-span" style="font-family: arial,sans-serif; font-size: 16px;"><tt><span title="QOut('oXbpMenu:CurrentPos() ', ::currentPos()) ==> {1, -345}" style="background-color: rgb(255, 255, 255);"></span><span title="QOut('Item number ', aInfo[1]) ==> 18" style="background-color: rgb(255, 255, 255);">QOut('Item number ', aInfo[1]) ==> 18<span class="Apple-converted-space"> </span><br> </span><span title="QOut('Action ', aInfo[2]) ==> 1" style="background-color: rgb(255, 255, 255);">QOut('Action ', aInfo[2]) ==> 1<span class="Apple-converted-space"> </span><br> </span><span title="QOut('State ', aInfo[3]) ==> 256" style="background-color: rgb(255, 255, 255);">QOut('State ', aInfo[3]) ==> 256<span class="Apple-converted-space"> </span><br> </span></tt><span title="QOut('Bound rect ', aInfo[4]) ==> { 0, 1, 200, 24}" style="background-color: rgb(255, 255, 255);"><tt><span class="Apple-converted-space"></span></tt><br> </span><span title="É algum erro já conhecido, ou está correto?" style="background-color: rgb(255, 255, 255);">It is a bug already known, or I made some mistake?</span></span></span><br> <br> Beling<br> TIA<br> </the first one post><br> <br> </the second post><br> Good morning:<br> trying to have the position of oXbpMenu() in the appdesktop() I used the function below:<br> <br> FUNCTION ApiGetXbpPosition_(oXbp)<br> // Return the position of <oXbp> in AppDeskTop(), in the format<br> // {nBottomX, nBottomY}<br> STATIC cCall<br> LOCAL cBinPos, nY, nDll<br> <br> if cCall == NIL<br> nDll := ApiLoadDll_('User32.dll')<br> cCall := DllPrepareCall(ndll, DLL_STDCALL, 'ClientToScreen')<br> endif<br> <br> cBinPos := Replicate(Chr(0), 8)<br> nY := ((AppDesktop():currentSize()[2] - 1) - oXbp:currentSize()[2])<br> DllExecuteCall(cCall, oXbp:getHWND(), @cBinPos)<br> RETURN {Bin2U(Left(cBinPos,4)), (nY - Bin2U(Right(cBinPos,4)))}<br> <br> The problem is that it always return {0, 515} indenpending on the oXbpMenu() position.<br> Please, what is wrong?<br> <br> Beling <br> HTH<br> <br> <br> </the second post><br> </body> </html> | |
AUGE_OHR | Re: XbpMenu() position on Tue, 11 Jan 2011 23:56:49 +0100 hi, >As I had not answer about the post below that I posted in the NG Bug >Report, > I think that it may be really some thing that might be send to you. >If it is not the case I apologize; i did have ask you if you use SetMouse() with :mouseMode := XBPCRT_MOUSEMODE_PM all your Coordinate seem me to be XBPCRT_MOUSEMODE_VIO. about Tooltip : i never have see it in a Menu greetings by OHR Jimmy | |
Carlos a Beling | Re: XbpMenu() position on Wed, 12 Jan 2011 15:51:42 -0200 Hello Jimmy: good afternoon. Many thanks. Excuse me if I did not answer your question about the mouse. I use ::oCrt:mouseMode := XBPCRT_MOUSEMODE_VIO Please see the attached image for seeing what I meant about tooltip. Beling Best regards Em 11/1/2011 20:56, AUGE_OHR escreveu: > hi, > >> As I had not answer about the post below that I posted in the NG Bug >> Report, >> I think that it may be really some thing that might be send to you. >> If it is not the case I apologize; > i did have ask you if you use SetMouse() with :mouseMode := > XBPCRT_MOUSEMODE_PM > all your Coordinate seem me to be XBPCRT_MOUSEMODE_VIO. > > about Tooltip : i never have see it in a Menu > > greetings by OHR > Jimmy > > Tip.gif | |
Andreas Herdt | Re: XbpMenu() position on Thu, 13 Jan 2011 15:29:35 +0100 Hi, I can reproduced the behaviour described in <the first post> when the fading effect is enabled for menus. After I have disabled the fading :currentPos() returns valid values. Well, :currentPos() returns valid values when fading is enabled, too. When fading is enabled the menu is drawn offscreen initialy and then faded into the desired area. Hope this helps. Andreas Herdt Alaska Software -------------------------------------------------------------------- Technical Support: support@alaska-software.com News Server: news.alaska-software.com Homepage: http://www.alaska-software.com WebKnowledgeBase: http://www.alaska-software.com/kbase.shtm Fax European Office: +49 (0) 61 96 - 77 99 99 23 Fax US Office: +1 (646) 218 1281 -------------------------------------------------------------------- Am 11.01.2011 13:10, schrieb Carlos a Beling: > Hello: > good morning. > > As I had not answer about the post below that I posted in the NG Bug Report, I > think that it may be really some thing that might be send to you. > If it is not the case I apologize; > > > <the first one post> > Em 8/1/2011 13:14, Carlos a Beling escreveu: > > Good afternoon. > I used the program OwnerDraw.prg and created a new one class. > I need to know a position of the menu item that is highlighted for to show a tip > below it. > The problem is that the method oXbpMenu:currentPos() is returning strange value > in oXbpMenu:currentpos()[02]. > So, I displayed the positions in the oXbpMenu:setParent() in the method > oXbpMenu:drawItem()and I got the positions as follow: > > cls > QOut('Mouse Position ', GetPointerPos()) ==> {160, 153} > QOut('SetParent() ', ::SetParent ()) ==> XbpCrt > QOut('SetParent():currentpos()', ::SetParent():currentPos ()) ==> {152, 106} > QOut('oXbpMenu:CurrentPos() ', ::currentPos()) ==> {1, -345} <<<<<<<<< > QOut('Bound rect ', aInfo[4]) ==> {0, 1, 200, 24} > QOut('Item number ', aInfo[1]) ==> 18 > QOut('Action ', aInfo[2]) ==> 1 > QOut('State ', aInfo[3]) ==> 256 > > It is a bug already known, or I made some mistake? > > Beling > TIA > </the first one post> > > </the second post> > Good morning: > trying to have the position of oXbpMenu() in the appdesktop() I used the > function below: > > FUNCTION ApiGetXbpPosition_(oXbp) > // Return the position of <oXbp> in AppDeskTop(), in the format > // {nBottomX, nBottomY} > STATIC cCall > LOCAL cBinPos, nY, nDll > > if cCall == NIL > nDll := ApiLoadDll_('User32.dll') > cCall := DllPrepareCall(ndll, DLL_STDCALL, 'ClientToScreen') > endif > > cBinPos := Replicate(Chr(0), 8) > nY := ((AppDesktop():currentSize()[2] - 1) - oXbp:currentSize()[2]) > DllExecuteCall(cCall, oXbp:getHWND(), @cBinPos) > RETURN {Bin2U(Left(cBinPos,4)), (nY - Bin2U(Right(cBinPos,4)))} > > The problem is that it always return {0, 515} indenpending on the oXbpMenu() > position. > Please, what is wrong? > > Beling > HTH > > > </the second post> | |
Thomas Braun | Re: XbpMenu() position on Thu, 13 Jan 2011 17:36:05 +0100 Andreas Herdt wrote: > Well, :currentPos() returns valid values when fading is enabled, too. valid != useful SCNR Thomas | |
Carlos a Beling | Re: XbpMenu() position on Mon, 17 Jan 2011 14:53:39 -0200 Hello Andreas: good evening. Many thanks. I´d like to know how do I get the relative position in relatiion to the AppDesktop() showing a tip (please see the attach in my answer in this NG to OHR in 12.11.2011, 15:31) or something else. Beling Greetings Em 13/1/2011 12:29, Andreas Herdt escreveu: > Hi, > > I can reproduced the behaviour described in <the first post> when the > fading > effect is enabled for menus. After I have disabled the fading > :currentPos() > returns valid values. > > Well, :currentPos() returns valid values when fading is enabled, too. > When > fading is enabled the menu is drawn offscreen initialy and then faded > into > the desired area. > > Hope this helps. > |