messages
listlengths
1
1
topic
stringlengths
2
60
[ { "date": "2006-08-18", "forum": "FiveWin for Harbour/xHarbour", "text": "Try this: oSay:SetFont( oNewFont )\nAfter changing font do: oSay:SetTex( oSay:cCaption ) to check the change. It would be OK.", "time": "17:24", "topic": "Changing font from oSay", "username": "manuramos" } ]
Changing font from oSay
[ { "date": "2006-08-19", "forum": "FiveWin for Harbour/xHarbour", "text": "Manuramos,\n\nThank you very much , this i needed to complete to make windows resizing the controls , also with the font.\n\nYou may see the result in the thread from silvio (controls ...)\n\nFrank", "time": "11:31", "topic": "Changing font from oSay", "username": "Frank Demont" } ]
Changing font from oSay
[ { "date": "2022-12-04", "forum": "FiveWin for Harbour/xHarbour", "text": "Hello,\n\nI think I asked this question some years ago, but I can't it find it anymore, nore do I remember the solution that was given then.\n\nThis is my question:\n\nIn a window, I use a combobox. The list that is defined, need to be changed, depending on changing the data in the window.\n\nHow can I change a itemlist of an active combobox in my window?\n\nThank you very much in advance for any help.", "time": "12:58", "topic": "Changing itemlist in a combobox", "username": "driessen" } ]
Changing itemlist in a combobox
[ { "date": "2022-12-04", "forum": "FiveWin for Harbour/xHarbour", "text": "Changing the Array ?\n\n[url:3jc4se7k]http://fivetechsupport.com/forums/viewtopic.php?p=253129&sid=3f9d268fcc951d1bf053930a22ed9d1e#p253129[/url:3jc4se7k]", "time": "13:18", "topic": "Changing itemlist in a combobox", "username": "Marc Venken" } ]
Changing itemlist in a combobox
[ { "date": "2022-12-04", "forum": "FiveWin for Harbour/xHarbour", "text": "Driessen:\nAlgo asi?\n[code=fw:iwn36vsh]<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: #00C800;\">function</span> Prue_Combo<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />   <span style=\"color: #00C800;\">local</span> oDlg, oCom1, oCom2, cVar1, cVar2<br />   <span style=\"color: #00C800;\">local</span> aList1, aList2<br /><br />   aList1 := <span style=\"color: #000000;\">&#123;</span><span style=\"color: #ff0000;\">\"Opcion1\"</span>,<span style=\"color: #ff0000;\">\"Opcion2\"</span><span style=\"color: #000000;\">&#125;</span><br /><br />   aList2 := <span style=\"color: #000000;\">&#123;</span><span style=\"color: #ff0000;\">\"Opcion 1 - Item 1\"</span>, <span style=\"color: #ff0000;\">\"Opcion 1 - Item2\"</span>, <span style=\"color: #ff0000;\">\"Opcion 1 - Iteme3\"</span><span style=\"color: #000000;\">&#125;</span><br />   <br />   cVar1 := aList1<span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">1</span><span style=\"color: #000000;\">&#93;</span><br /><br />   cVar2 := aList2<span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">1</span><span style=\"color: #000000;\">&#93;</span><br /><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;\">1</span>,<span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #000000;\">300</span>, <span style=\"color: #000000;\">600</span> <span style=\"color: #0000ff;\">PIXEL</span> <span style=\"color: #0000ff;\">TITLE</span> <span style=\"color: #ff0000;\">\"Combobox Relacionados\"</span><br /><br />   @ <span style=\"color: #000000;\">20</span>, <span style=\"color: #000000;\">10</span> <span style=\"color: #0000ff;\">COMBOBOX</span> oCom1 <span style=\"color: #0000ff;\">VAR</span> cVar1 <span style=\"color: #0000ff;\">ITEMS</span> aList1 <span style=\"color: #0000ff;\">SIZE</span> <span style=\"color: #000000;\">130</span>,<span style=\"color: #000000;\">200</span> <span style=\"color: #0000ff;\">PIXEL</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;\">&#40;</span> aList2:=MiFunction<span style=\"color: #000000;\">&#40;</span>oCom1<span style=\"color: #000000;\">&#41;</span>,oCom2:<span style=\"color: #000000;\">SetItems</span><span style=\"color: #000000;\">&#40;</span>aList2 <span style=\"color: #000000;\">&#41;</span>, oCom2:<span style=\"color: #000000;\">Set</span><span style=\"color: #000000;\">&#40;</span>aList2<span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">1</span><span style=\"color: #000000;\">&#93;</span><span style=\"color: #000000;\">&#41;</span><span style=\"color: #000000;\">&#41;</span><br /><br />   @ <span style=\"color: #000000;\">20</span>,<span style=\"color: #000000;\">160</span> <span style=\"color: #0000ff;\">COMBOBOX</span> oCom2 <span style=\"color: #0000ff;\">VAR</span> cVar2 <span style=\"color: #0000ff;\">ITEMS</span> aList2 <span style=\"color: #0000ff;\">SIZE</span> <span style=\"color: #000000;\">130</span>,<span style=\"color: #000000;\">200</span> <span style=\"color: #0000ff;\">PIXEL</span> <span style=\"color: #0000ff;\">OF</span> oDlg<br />   <br />   @ <span style=\"color: #000000;\">100</span>,<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">300</span>/<span style=\"color: #000000;\">2</span><span style=\"color: #000000;\">&#41;</span>-<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">100</span>/<span style=\"color: #000000;\">2</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #0000ff;\">BUTTON</span> <span style=\"color: #ff0000;\">\"Ok\"</span> <span style=\"color: #0000ff;\">SIZE</span> <span style=\"color: #000000;\">100</span>, <span style=\"color: #000000;\">20</span> <span style=\"color: #0000ff;\">PIXEL</span> <span style=\"color: #0000ff;\">OF</span> oDlg ;<br />            <span style=\"color: #0000ff;\">ACTION</span> oDlg:<span style=\"color: #000000;\">End</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />  <br />   <span style=\"color: #0000ff;\">ACTIVATE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDlg <span style=\"color: #0000ff;\">CENTERED</span> <br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">nil</span><br /><br /><span style=\"color: #00C800;\">Function</span> MiFunction<span style=\"color: #000000;\">&#40;</span>oCom1<span style=\"color: #000000;\">&#41;</span><br /><span style=\"color: #00C800;\">local</span> aResp<br /><span style=\"color: #00C800;\">IF</span> oCom1:<span style=\"color: #000000;\">nAt</span> = <span style=\"color: #000000;\">1</span><br />   aResp :=  <span style=\"color: #000000;\">&#123;</span><span style=\"color: #ff0000;\">\"Opcion 1 - Item 1\"</span>, <span style=\"color: #ff0000;\">\"Opcion 1 - Item 2\"</span>, <span style=\"color: #ff0000;\">\"Opcion 1 - Iteme 3\"</span><span style=\"color: #000000;\">&#125;</span><br />   <span style=\"color: #00C800;\">ELSE</span> <br />   aResp := <span style=\"color: #000000;\">&#123;</span><span style=\"color: #ff0000;\">\"Opcion 2 - Item 1\"</span>, <span style=\"color: #ff0000;\">\"Opcion 2 - Item 2\"</span>, <span style=\"color: #ff0000;\">\"Opcion 2 - Item 3\"</span>,<span style=\"color: #ff0000;\">\"Opcion 2 - Item 4\"</span><span style=\"color: #000000;\">&#125;</span><br /><span style=\"color: #00C800;\">ENDIF</span><br /><span style=\"color: #00C800;\">Return</span> aResp<br /> </div>[/code:iwn36vsh]", "time": "13:36", "topic": "Changing itemlist in a combobox", "username": "cmsoft" } ]
Changing itemlist in a combobox
[ { "date": "2012-02-08", "forum": "FiveWin for Harbour/xHarbour", "text": "I have for example a toolbar with initial button images on top and on the left I have outlook style butons.\n\n[img:1hat10ss]http&#58;//i65&#46;photobucket&#46;com/albums/h235/codemaker_bg/toolbar1&#46;jpg[/img:1hat10ss]\n\nWhat I need is to [b:1hat10ss]dynamicaly change[/b:1hat10ss] the set of icons on the toolbar when I click some button on any of the vertical left buttons.\nThe program initialy starts for example with 7 buttons (each has a specific ACTION assigned) in the toolbar and the first button on vertical left is activated.\n\nNow I want to click on the 3rd button on the left and I need to change all the toolbar icons and their coresponding ACTIONs, because the new set of icons will do another set of jobs.\nThen later, I need to be able to click on the left on some other button and again, all set of toolbar buttons (and ACTIONS) must change.\n\nIs this possible or I need to do some coding by replacing the each button image in toolbar and assign a new ACTION to it? And also, hide the rest of the buttons etc...\n\nI just started to use Toolbars and I might ask some stupid question, but the documentation for Toolbars is not extensive so I need some help\n\nThanks", "time": "00:43", "topic": "Changing the Toolbar content", "username": "codemaker" } ]
Changing the Toolbar content
[ { "date": "2012-02-08", "forum": "FiveWin for Harbour/xHarbour", "text": "Hello Codemaker,\n\n[b:2qhi053s]A Sample to show the Logic changing BMP's and using the same Button with different Actions:[/b:2qhi053s]\n\n1. define a Array for the used BMP's\n2. use => ACTION [color=#FF0000:2qhi053s]oButt3:SetFile( aBtn[4][1], aBtn[4][2] )[/color:2qhi053s] ;\nThat will replace on Button-action 2 the Button 3 ( TRASH.BMP ) \nwith the defined BMP's in Arrayelement 4 ( PENDRIVE.BMP )\n\nTo use different Actions with on Button, \nYou need another Array => .T. or .F. for each Button. \nWith the BMP-change change the Status as well.\nIt means : .T. = Action 1, .F. = Action 2\n\nIn this sample, Button 3 shows on Action the Message : Action 1 ( aAct[3] := .T. ).\nAfter the BMP-change the Action shows the Message : Action 2 ( aAct[3] := .F. defined in Button 2-action ).\n\nMaybe You want to show a [color=#FF0000:2qhi053s]BMP disabled [/color:2qhi053s]as well ?\nThe Array can be : aBtn[5][4] => BTN_UP, BTN_DOWN, [color=#FF0000:2qhi053s]BTN_DISABLE[/color:2qhi053s], BTN_OVERMOUSE \n\nFUNCTION changed in FWH 12.01 !!! ( Drive is included )\nc_path := [color=#FF0000:2qhi053s]GETCURDIR() [/color:2qhi053s]+ \"\\\"\nmaybe You have to use :\nc_path := CURDRIVE() + \":\\\" + GETCURDIR() + \"\\\"\n\n[img:2qhi053s]http&#58;//www&#46;pflegeplus&#46;com/pictures/btnchg&#46;jpg[/img:2qhi053s]\n\n[code=fw:2qhi053s]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"FiveWin.ch\"</span><br /><br /><span style=\"color: #00C800;\">static</span> oWnd, oBar, oBrush, cFile, oButtFont, oCursorHand<br /><br /><span style=\"color: #00C800;\">FUNCTION</span> Main<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><span style=\"color: #00C800;\">LOCAL</span> hDCo, oButt1, oButt2, oButt3, oButt4, oButt5, oButt6<br /><span style=\"color: #00C800;\">LOCAL</span> aBtn<span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">5</span><span style=\"color: #000000;\">&#93;</span><span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">2</span><span style=\"color: #000000;\">&#93;</span>, aAct<span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">5</span><span style=\"color: #000000;\">&#93;</span><br /><br />c_path := GETCURDIR<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> + <span style=\"color: #ff0000;\">\"<span style=\"color: #000000;\">\\\"</span> <br /><br />// can be : aBtn[5][4] => BTN_UP, BTN_DOWN, BTN_DISABLE, BTN_OVERMOUSE <br /><br />aBtn[1][1] := c_path + \"</span>\\project\\ICHAT.BMP<span style=\"color: #ff0000;\">\"<br />aBtn[1][2] := c_path + \"</span>\\project\\ICHAT.BMP<span style=\"color: #ff0000;\">\"<br />aAct[1] := .T.<br /><br />aBtn[2][1] := c_path + \"</span>\\project\\EXPLORER.BMP<span style=\"color: #ff0000;\">\"<br />aBtn[2][2] := c_path + \"</span>\\project\\EXPLORER.BMP<span style=\"color: #ff0000;\">\"<br />aAct[2] := .T.<br /><br />aBtn[3][1] := c_path + \"</span>\\project\\TRASH.BMP<span style=\"color: #ff0000;\">\"<br />aBtn[3][2] := c_path + \"</span>\\project\\TRASH.BMP<span style=\"color: #ff0000;\">\"<br />aAct[3] := .T.<br /><br />aBtn[4][1] := c_path + \"</span>\\project\\PENDRIVE.BMP<span style=\"color: #ff0000;\">\"<br />aBtn[4][2] := c_path + \"</span>\\project\\PENDRIVE.BMP<span style=\"color: #ff0000;\">\"<br />aAct[4] := .T.<br /><br />aBtn[5][1] := c_path + \"</span>\\project\\PALM.BMP<span style=\"color: #ff0000;\">\"<br />aBtn[5][2] := c_path + \"</span>\\project\\PALM.BMP<span style=\"color: #ff0000;\">\"<br />aAct[5] := .T.<br /><br />oDlgFont := TFont():New(\"</span>Arial<span style=\"color: #ff0000;\">\", ,-14,.F.,.F.,,,,.F.) <br />oButtFont := TFont():New(\"</span>Arial<span style=\"color: #ff0000;\">\",,-14,.F.,.F.,,,,.F.)<br />DEFINE CURSOR oCursorHand HAND<br />SetBalloon( .T. )<br /><br />// Style<br />// -------<br />DEFINE BRUSH oBrush  STYLE \"</span>BRICKS<span style=\"color: #ff0000;\">\" <br /><br />DEFINE WINDOW oWnd TITLE \"</span>Testing Source <span style=\"color: #0000ff;\">of</span> Bar-Tools<span style=\"color: #ff0000;\">\"  ;<br />MENU TMenu():New() BRUSH oBrush<br /><br />DEFINE BUTTONBAR oBar OF oWnd SIZE 100,80 3DLOOK 2007 LEFT<br /><br />oBar:oFont := oButtFont<br />oBar:SetColor( 0)<br /><br />oBar:bClrGrad = { | lInvert | If( ! lInvert, ;<br />   { { 0.80,14853684,16314573 }, ;<br />     { 0.80,16314573,14853684 } }, ;<br />   { { 0.80,14853684,14853684 }, ;<br />     { 0.80,14853684,14853684 } } ) }<br /><br />DEFINE BUTTON oButt1 OF oBar FILE aBtn[1][1], aBtn[1][2] ;<br />MESSAGE \"</span><span style=\"color: #0000ff;\">Button</span> <span style=\"color: #000000;\">1</span><span style=\"color: #ff0000;\">\" ; <br />ACTION MsgAlert( \"</span><span style=\"color: #0000ff;\">Button</span> <span style=\"color: #000000;\">1</span><span style=\"color: #ff0000;\">\",\"</span>Attention<span style=\"color: #ff0000;\">\" ) ;<br />PROMPT \"</span><span style=\"color: #0000ff;\">Button</span> <span style=\"color: #000000;\">1</span><span style=\"color: #ff0000;\">\" <br /><br />oButt1:cToolTip := { \"</span> <span style=\"color: #ff0000;\">\" + CRLF + \"</span><span style=\"color: #0000ff;\">Button</span> <span style=\"color: #000000;\">1</span><span style=\"color: #ff0000;\">\", \"</span><span style=\"color: #000000;\">1</span>. <span style=\"color: #0000ff;\">Button</span><span style=\"color: #ff0000;\">\", 1, 0, 128 }<br /><br />DEFINE BUTTON oButt2 OF oBar FILE aBtn[2][1], aBtn[2][2] ;<br />MESSAGE \"</span><span style=\"color: #0000ff;\">Button</span> <span style=\"color: #000000;\">2</span><span style=\"color: #ff0000;\">\" ; <br />ACTION ( oButt3:SetFile( aBtn[4][1], aBtn[4][2] ), aAct[3] := .F. ) ;<br />PROMPT \"</span><span style=\"color: #0000ff;\">Button</span> <span style=\"color: #000000;\">2</span><span style=\"color: #ff0000;\">\" <br /><br />oButt2:cToolTip := { \"</span> <span style=\"color: #ff0000;\">\" + CRLF + \"</span><span style=\"color: #0000ff;\">Button</span> <span style=\"color: #000000;\">2</span><span style=\"color: #ff0000;\">\", \"</span><span style=\"color: #000000;\">2</span>. <span style=\"color: #0000ff;\">Button</span><span style=\"color: #ff0000;\">\", 1, 0, 128 }<br /><br />DEFINE BUTTON oButt3 OF oBar FILE aBtn[3][1], aBtn[3][2] ;<br />MESSAGE \"</span><span style=\"color: #0000ff;\">Button</span> <span style=\"color: #000000;\">3</span><span style=\"color: #ff0000;\">\" ; <br />ACTION ( oButt2:Enable(), ;<br />                 IIF( aAct[3] = .T., MsgAlert( \"</span><span style=\"color: #0000ff;\">Action</span> <span style=\"color: #000000;\">1</span><span style=\"color: #ff0000;\">\" ), MsgAlert( \"</span><span style=\"color: #0000ff;\">Action</span> <span style=\"color: #000000;\">2</span><span style=\"color: #ff0000;\">\" ) ) ) ;<br />PROMPT \"</span><span style=\"color: #0000ff;\">Button</span> <span style=\"color: #000000;\">3</span><span style=\"color: #ff0000;\">\" <br /><br />oButt3:cToolTip := { \"</span> <span style=\"color: #ff0000;\">\" + CRLF + \"</span><span style=\"color: #0000ff;\">Button</span> <span style=\"color: #000000;\">3</span><span style=\"color: #ff0000;\">\", \"</span><span style=\"color: #000000;\">3</span>. <span style=\"color: #0000ff;\">Button</span><span style=\"color: #ff0000;\">\", 1, 0, 128 }<br /><br />DEFINE BUTTON oButt4 OF oBar FILE aBtn[4][1], aBtn[4][2] ;<br />MESSAGE \"</span><span style=\"color: #0000ff;\">Button</span> <span style=\"color: #000000;\">4</span><span style=\"color: #ff0000;\">\" ; <br />ACTION oButt2:Disable() ;<br />PROMPT \"</span><span style=\"color: #0000ff;\">Button</span> <span style=\"color: #000000;\">4</span><span style=\"color: #ff0000;\">\" <br /><br />oButt4:cToolTip := { \"</span> <span style=\"color: #ff0000;\">\" + CRLF + \"</span><span style=\"color: #0000ff;\">Button</span> <span style=\"color: #000000;\">4</span><span style=\"color: #ff0000;\">\", \"</span><span style=\"color: #000000;\">4</span>. <span style=\"color: #0000ff;\">Button</span><span style=\"color: #ff0000;\">\", 1, 0, 128 }<br /><br />DEFINE BUTTON oButt5 OF oBar FILE aBtn[5][1], aBtn[5][2] ;<br />MESSAGE \"</span><span style=\"color: #0000ff;\">Button</span> <span style=\"color: #000000;\">5</span><span style=\"color: #ff0000;\">\" ; <br />ACTION MsgAlert( \"</span><span style=\"color: #0000ff;\">Button</span> <span style=\"color: #000000;\">5</span><span style=\"color: #ff0000;\">\",\"</span>Attention<span style=\"color: #ff0000;\">\" ) ;<br />PROMPT \"</span><span style=\"color: #0000ff;\">Button</span> <span style=\"color: #000000;\">5</span><span style=\"color: #ff0000;\">\" <br /><br />oButt5:cToolTip := { \"</span> <span style=\"color: #ff0000;\">\" + CRLF + \"</span><span style=\"color: #0000ff;\">Button</span> <span style=\"color: #000000;\">5</span><span style=\"color: #ff0000;\">\", \"</span><span style=\"color: #000000;\">5</span>. <span style=\"color: #0000ff;\">Button</span><span style=\"color: #ff0000;\">\", 1, 0, 128 }<br /><br /><br />DEFINE BUTTON oButt6 OF oBar FILE c_path + \"</span>\\project\\Stop.bmp<span style=\"color: #ff0000;\">\"  MESSAGE \"</span>Close<span style=\"color: #ff0000;\">\" ; <br />ACTION ( oWnd:End() ) ;<br />PROMPT \"</span>Close<span style=\"color: #ff0000;\">\" <br /><br />oButt6:cToolTip := { \"</span> <span style=\"color: #ff0000;\">\" + CRLF + \"</span>Close BarTools<span style=\"color: #ff0000;\">\", \"</span>Close<span style=\"color: #ff0000;\">\", 1, 0, 128 }<br /><br />AEval( oWnd:aControls, { | o | o:oCursor := oCursorHand } )<br /><br />SET MESSAGE OF oWnd TO \"</span>Bar-Test<span style=\"color: #ff0000;\">\" ;<br />CENTERED CLOCK KEYBOARD 2007<br /><br />ACTIVATE WINDOW oWnd MAXIMIZED ;<br /><br />RETURN NIL<br /></span></div>[/code:2qhi053s]\n\n[i:2qhi053s][b:2qhi053s]It seems, FWH is getting more and more popular.\nI noticed sometimes more than 20 Guests online.[/b:2qhi053s][/i:2qhi053s]\n\nBest Regards\nUwe <!-- s:lol: --><img src=\"{SMILIES_PATH}/icon_lol.gif\" alt=\":lol:\" title=\"Laughing\" /><!-- s:lol: -->", "time": "11:34", "topic": "Changing the Toolbar content", "username": "ukoenig" } ]
Changing the Toolbar content
[ { "date": "2012-02-08", "forum": "FiveWin for Harbour/xHarbour", "text": "Thank you Uwe, I apreciate your attention.\n\nI am on FW and this and old forum since the version 1.9.2 and as far as I can tell, the xHB/FWH combination is one of the best for middle sized projects. Even for bigger projects, because we can connect to SQL databases, so there is no much limitation. I use FWH all those years up to now and have no reason to switch to any other language. The only problem is that every new FWH version nakes me trouble in compatibility with xHB.... Have no idea why is that so, but this is a huge problem for me, because I don't have always time to spent days and days adjusting xHB and FWH...\nAnd yes, FWH is very popular because of its efficiency and simplicity of use, giving us a very complex and useful resulting applications.\n\nRegarding the problem I have, I probably was not clear anough, my fault.\nI understand the sample you showed to me and this kind of logic works fine on my testings.\nAs you see I have a vertical array of buttons on the left and when I click on any of these vertical buttons, I need the upper horizontal Toolbar to completely redraw, this time with complete new buttons and actions.\nI can use buton image replacements and assigning the new actions to each, but this will be my last option.\n\n- For example, the first vertical button is related to road transportation. When clicked, the upper horizontal Toolbar will show buttons with images for road transport (cars, trucks etc...) and the actions will trigger dialogs about each vechicle in road transport.\n- The second button is related to water transportation. When clicked, the upper horisontal Toolbar will show buttons with images for water transport (boats, ferry, ship etc...) and the actions will trigger dialogs about each vechicle in water transport.\n- The hird button is related to air transportation. When clicked, the upper horisontal Toolbar will show buttons with images for air transport (planes, helicopters etc...) and the actions will trigger dialogs about each vechicle in air transport.\n\nThe problem is that each kind of transport can have different number of buttons. If road transport has 8 buttons in horizontal Toolbar, when the toolbar needs to show air transport which has 5 buttons, I ned to figure out how to \"hide\" and disable the 3 buttons which are left.\nAlso if the water transport needs 11 buttons, how can I show them because I am couple of buttons short regarding the road and air transport....\n\nI thought maybe there is a way to \":END()\" the existing horizontal toolbar and programatically redefine and show the new toolbar \"on the fly\" with new images and actions after each button is clicked, depending of the transportation selected.\n\nMaybe I was now more precise, my english is probably not good enough to express myself clearely\n\nThanks\nBoris", "time": "13:59", "topic": "Changing the Toolbar content", "username": "codemaker" } ]
Changing the Toolbar content
[ { "date": "2012-02-08", "forum": "FiveWin for Harbour/xHarbour", "text": "At first, Your English is fine and I understand Your Problem.\nMaybe a complete replacement will be a Solution.\nI will have a closer look at Your posted Problem.\n\nBest regards\nUwe <!-- s:lol: --><img src=\"{SMILIES_PATH}/icon_lol.gif\" alt=\":lol:\" title=\"Laughing\" /><!-- s:lol: -->", "time": "14:07", "topic": "Changing the Toolbar content", "username": "ukoenig" } ]
Changing the Toolbar content
[ { "date": "2012-02-08", "forum": "FiveWin for Harbour/xHarbour", "text": "Boris,\n\nYou can create and manage as many toolbars as needed <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->\n\nTo switch from one toolbar to another is as easy as:\n[code=fw:2dp3ar7q]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br />         <span style=\"color: #0000ff;\">MENUITEM</span> <span style=\"color: #ff0000;\">\"&ToolBar1...\"</span> <span style=\"color: #0000ff;\">ACTION</span> <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> oWnd:<span style=\"color: #000000;\">oTop</span> == oToolBar2, <span style=\"color: #000000;\">&#40;</span> oWnd:<span style=\"color: #000000;\">oTop</span> := oToolBar1, oToolBar2:<span style=\"color: #000000;\">Hide</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, oToolBar1:<span style=\"color: #000000;\">Show</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #0000ff;\">MESSAGE</span> <span style=\"color: #ff0000;\">\"ToolBar 1\"</span><br />         <span style=\"color: #0000ff;\">MENUITEM</span> <span style=\"color: #ff0000;\">\"T&oolBar2...\"</span> <span style=\"color: #0000ff;\">ACTION</span> <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> oWnd:<span style=\"color: #000000;\">oTop</span> == oToolBar1, <span style=\"color: #000000;\">&#40;</span> oWnd:<span style=\"color: #000000;\">oTop</span> := oToolBar2, oToolBar1:<span style=\"color: #000000;\">Hide</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, oToolBar2:<span style=\"color: #000000;\">Show</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #0000ff;\">MESSAGE</span> <span style=\"color: #ff0000;\">\"ToolBar 2\"</span><br /> </div>[/code:2dp3ar7q]\n\nHere you have a complete working example:\n[code=fw:2dp3ar7q]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #B900B9;\">// Switching toolbars</span><br /><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"FiveWin.ch\"</span><br /><br /><span style=\"color: #00C800;\">static</span> oWnd, oToolBar1, oToolBar2<br /><br /><span style=\"color: #00C800;\">function</span> Main<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />   <span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">WINDOW</span> oWnd <span style=\"color: #0000ff;\">TITLE</span> <span style=\"color: #ff0000;\">\"FWH - Switching toolsbars\"</span> ;<br />      <span style=\"color: #0000ff;\">MENU</span> BuildMenu<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />   oToolBar1 = BuildToolBar1<span style=\"color: #000000;\">&#40;</span> oWnd <span style=\"color: #000000;\">&#41;</span><br />   oToolBar2 = BuildToolBar2<span style=\"color: #000000;\">&#40;</span> oWnd <span style=\"color: #000000;\">&#41;</span><br />   oToolBar2:<span style=\"color: #000000;\">Hide</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />   oWnd:<span style=\"color: #000000;\">oTop</span> = oToolBar1<br /><br />   <span style=\"color: #0000ff;\">DEFINE</span> STATUSBAR <span style=\"color: #0000ff;\">OF</span> oWnd <span style=\"color: #0000ff;\">PROMPT</span> <span style=\"color: #ff0000;\">\"Toolbars test\"</span><br /><br />   <span style=\"color: #0000ff;\">ACTIVATE</span> <span style=\"color: #0000ff;\">WINDOW</span> oWnd <span style=\"color: #0000ff;\">MAXIMIZED</span> ;<br />      <span style=\"color: #0000ff;\">ON</span> <span style=\"color: #0000ff;\">INIT</span> <span style=\"color: #000000;\">&#40;</span> oToolBar2:<span style=\"color: #000000;\">nWidth</span> := oToolBar1:<span style=\"color: #000000;\">nWidth</span> <span style=\"color: #000000;\">&#41;</span><br />   <br />   oToolBar1:<span style=\"color: #000000;\">oImageList</span>:<span style=\"color: #000000;\">End</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />   oToolBar2:<span style=\"color: #000000;\">oImageList</span>:<span style=\"color: #000000;\">End</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">nil</span><br /><br /><span style=\"color: #00C800;\">function</span> BuildMenu<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />   <span style=\"color: #00C800;\">local</span> oMenu<br /><br />   <span style=\"color: #0000ff;\">MENU</span> oMenu<br />      <span style=\"color: #0000ff;\">MENUITEM</span> <span style=\"color: #ff0000;\">\"&Project\"</span><br />      <span style=\"color: #0000ff;\">MENU</span><br />         <span style=\"color: #0000ff;\">MENUITEM</span> <span style=\"color: #ff0000;\">\"&ToolBar1...\"</span> <span style=\"color: #0000ff;\">ACTION</span> <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> oWnd:<span style=\"color: #000000;\">oTop</span> == oToolBar2, <span style=\"color: #000000;\">&#40;</span> oWnd:<span style=\"color: #000000;\">oTop</span> := oToolBar1, oToolBar2:<span style=\"color: #000000;\">Hide</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, oToolBar1:<span style=\"color: #000000;\">Show</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #0000ff;\">MESSAGE</span> <span style=\"color: #ff0000;\">\"ToolBar 1\"</span><br />         <span style=\"color: #0000ff;\">MENUITEM</span> <span style=\"color: #ff0000;\">\"T&oolBar2...\"</span> <span style=\"color: #0000ff;\">ACTION</span> <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> oWnd:<span style=\"color: #000000;\">oTop</span> == oToolBar1, <span style=\"color: #000000;\">&#40;</span> oWnd:<span style=\"color: #000000;\">oTop</span> := oToolBar2, oToolBar1:<span style=\"color: #000000;\">Hide</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, oToolBar2:<span style=\"color: #000000;\">Show</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #0000ff;\">MESSAGE</span> <span style=\"color: #ff0000;\">\"ToolBar 2\"</span><br />         <span style=\"color: #0000ff;\">SEPARATOR</span><br />         <span style=\"color: #0000ff;\">MENUITEM</span> <span style=\"color: #ff0000;\">\"&Exit...\"</span> <span style=\"color: #0000ff;\">ACTION</span> oWnd:<span style=\"color: #000000;\">End</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #0000ff;\">MESSAGE</span> <span style=\"color: #ff0000;\">\"Exit\"</span><br />      <span style=\"color: #0000ff;\">ENDMENU</span><br /><br />      <span style=\"color: #0000ff;\">MENUITEM</span> <span style=\"color: #ff0000;\">\"&Edit\"</span><br />      <span style=\"color: #0000ff;\">MENU</span><br />         <span style=\"color: #0000ff;\">MENUITEM</span> <span style=\"color: #ff0000;\">\"&Search...\"</span> <span style=\"color: #0000ff;\">ACTION</span> <span style=\"color: #0000ff;\">MsgInfo</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"Search\"</span> <span style=\"color: #000000;\">&#41;</span><br />         <span style=\"color: #0000ff;\">MENUITEM</span> <span style=\"color: #ff0000;\">\"&Print...\"</span> <span style=\"color: #0000ff;\">ACTION</span> <span style=\"color: #0000ff;\">MsgInfo</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"Print\"</span> <span style=\"color: #000000;\">&#41;</span><br />      <span style=\"color: #0000ff;\">ENDMENU</span><br /><br />      <span style=\"color: #0000ff;\">MENUITEM</span> <span style=\"color: #ff0000;\">\"&Utilities\"</span><br />      <span style=\"color: #0000ff;\">MENU</span><br />         <span style=\"color: #0000ff;\">MENUITEM</span> <span style=\"color: #ff0000;\">\"&Disable button...\"</span> <span style=\"color: #0000ff;\">ACTION</span> oToolBar:<span style=\"color: #000000;\">EnableButton</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">3</span>, .f. <span style=\"color: #000000;\">&#41;</span><br />         <span style=\"color: #0000ff;\">MENUITEM</span> <span style=\"color: #ff0000;\">\"&Enable button...\"</span> <span style=\"color: #0000ff;\">ACTION</span> oToolBar:<span style=\"color: #000000;\">EnableButton</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">3</span>, .t. <span style=\"color: #000000;\">&#41;</span><br />      <span style=\"color: #0000ff;\">ENDMENU</span><br />   <span style=\"color: #0000ff;\">ENDMENU</span><br /><br /><span style=\"color: #00C800;\">return</span> oMenu<br /><br /><span style=\"color: #00C800;\">function</span> BuildToolBar1<span style=\"color: #000000;\">&#40;</span> oWnd <span style=\"color: #000000;\">&#41;</span><br /><br />   <span style=\"color: #00C800;\">local</span> oToolBar, oImageList<br />   <br />   <span style=\"color: #0000ff;\">DEFINE</span> IMAGELIST oImageList <span style=\"color: #0000ff;\">SIZE</span> <span style=\"color: #000000;\">32</span>, <span style=\"color: #000000;\">32</span><br /><br />   <span style=\"color: #0000ff;\">DEFINE</span> IMGBITMAP <span style=\"color: #0000ff;\">OF</span> oImageList <span style=\"color: #0000ff;\">NAME</span> <span style=\"color: #ff0000;\">\"new\"</span>      <span style=\"color: #0000ff;\">COLOR</span> nRGB<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">255</span>, <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">255</span> <span style=\"color: #000000;\">&#41;</span><br />   <span style=\"color: #0000ff;\">DEFINE</span> IMGBITMAP <span style=\"color: #0000ff;\">OF</span> oImageList <span style=\"color: #0000ff;\">NAME</span> <span style=\"color: #ff0000;\">\"open\"</span>     <span style=\"color: #0000ff;\">COLOR</span> nRGB<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">255</span>, <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">255</span> <span style=\"color: #000000;\">&#41;</span><br />   <span style=\"color: #0000ff;\">DEFINE</span> IMGBITMAP <span style=\"color: #0000ff;\">OF</span> oImageList <span style=\"color: #0000ff;\">NAME</span> <span style=\"color: #ff0000;\">\"check\"</span>    <span style=\"color: #0000ff;\">COLOR</span> nRGB<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">255</span>, <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">255</span> <span style=\"color: #000000;\">&#41;</span><br />   <span style=\"color: #0000ff;\">DEFINE</span> IMGBITMAP <span style=\"color: #0000ff;\">OF</span> oImageList <span style=\"color: #0000ff;\">NAME</span> <span style=\"color: #ff0000;\">\"search\"</span>   <span style=\"color: #0000ff;\">COLOR</span> nRGB<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">255</span>, <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">255</span> <span style=\"color: #000000;\">&#41;</span><br /><br />   <span style=\"color: #0000ff;\">DEFINE</span> TOOLBAR oToolBar <span style=\"color: #0000ff;\">OF</span> oWnd <span style=\"color: #0000ff;\">SIZE</span> <span style=\"color: #000000;\">50</span>, <span style=\"color: #000000;\">58</span> ; <span style=\"color: #B900B9;\">// 50, 50 ;</span><br />      IMAGELIST oImageList BALLOON <span style=\"color: #B900B9;\">// tooltips balloon style</span><br />   <br />   oToolBar:<span style=\"color: #000000;\">SetTextRows</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">&#41;</span><br />   <br />   <span style=\"color: #0000ff;\">DEFINE</span> TBBUTTON <span style=\"color: #0000ff;\">OF</span> oToolBar ;<br />      <span style=\"color: #0000ff;\">ACTION</span>  oToolbar:<span style=\"color: #000000;\">SetText</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">1</span>, <span style=\"color: #ff0000;\">\"Hello\"</span> <span style=\"color: #000000;\">&#41;</span> ; <span style=\"color: #B900B9;\">// Modify first button text</span><br />      TOOLTIP <span style=\"color: #ff0000;\">\"New\"</span> ;<br />      <span style=\"color: #0000ff;\">PROMPT</span>  <span style=\"color: #ff0000;\">\"&New project\"</span> ;<br />      <span style=\"color: #0000ff;\">MESSAGE</span> <span style=\"color: #ff0000;\">\"New\"</span><br />   <br />   <span style=\"color: #0000ff;\">DEFINE</span> TBBUTTON <span style=\"color: #0000ff;\">OF</span> oToolBar ;<br />      <span style=\"color: #0000ff;\">ACTION</span>  oToolBar:<span style=\"color: #000000;\">SetChecked</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">2</span>, .t. <span style=\"color: #000000;\">&#41;</span> ; <span style=\"color: #B900B9;\">// Set pressed the second button </span><br />      TOOLTIP <span style=\"color: #ff0000;\">\"Open\"</span> ;<br />      <span style=\"color: #0000ff;\">PROMPT</span>  <span style=\"color: #ff0000;\">\"Open project\"</span> ;<br />      <span style=\"color: #0000ff;\">MESSAGE</span> <span style=\"color: #ff0000;\">\"Open\"</span><br />      <br />   <span style=\"color: #0000ff;\">DEFINE</span> TBSEPARATOR <span style=\"color: #0000ff;\">OF</span> oToolBar<br />   <br />   <span style=\"color: #0000ff;\">DEFINE</span> TBMENU <span style=\"color: #0000ff;\">OF</span> oToolBar ;<br />      <span style=\"color: #0000ff;\">ACTION</span>  <span style=\"color: #0000ff;\">MsgInfo</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"Menu\"</span> <span style=\"color: #000000;\">&#41;</span> ;<br />      TOOLTIP <span style=\"color: #ff0000;\">\"Menu\"</span> ;<br />      <span style=\"color: #0000ff;\">PROMPT</span>  <span style=\"color: #ff0000;\">\"Menu\"</span> ;<br />      <span style=\"color: #0000ff;\">MENU</span>    BuildPopup<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />   <br />   <span style=\"color: #0000ff;\">DEFINE</span> TBBUTTON <span style=\"color: #0000ff;\">OF</span> oToolBar ;<br />      <span style=\"color: #0000ff;\">ACTION</span>  oToolBar:<span style=\"color: #000000;\">SetChecked</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">2</span>, .f. <span style=\"color: #000000;\">&#41;</span> ; <span style=\"color: #B900B9;\">// MsgInfo( \"Search\" ) ;</span><br />      TOOLTIP <span style=\"color: #ff0000;\">\"Search\"</span> ;<br />      <span style=\"color: #0000ff;\">PROMPT</span>  <span style=\"color: #ff0000;\">\"Search\"</span><br /><br /><span style=\"color: #00C800;\">return</span> oToolBar<br /><br /><span style=\"color: #00C800;\">function</span> BuildToolBar2<span style=\"color: #000000;\">&#40;</span> oWnd <span style=\"color: #000000;\">&#41;</span><br /><br />   <span style=\"color: #00C800;\">local</span> oToolBar, oImageList<br />   <br />   <span style=\"color: #0000ff;\">DEFINE</span> IMAGELIST oImageList <span style=\"color: #0000ff;\">SIZE</span> <span style=\"color: #000000;\">32</span>, <span style=\"color: #000000;\">32</span><br /><br />   <span style=\"color: #0000ff;\">DEFINE</span> IMGBITMAP <span style=\"color: #0000ff;\">OF</span> oImageList <span style=\"color: #0000ff;\">NAME</span> <span style=\"color: #ff0000;\">\"print\"</span>    <span style=\"color: #0000ff;\">COLOR</span> nRGB<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">255</span>, <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">255</span> <span style=\"color: #000000;\">&#41;</span><br />   <span style=\"color: #0000ff;\">DEFINE</span> IMGBITMAP <span style=\"color: #0000ff;\">OF</span> oImageList <span style=\"color: #0000ff;\">NAME</span> <span style=\"color: #ff0000;\">\"internet\"</span> <span style=\"color: #0000ff;\">COLOR</span> nRGB<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">255</span>, <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">255</span> <span style=\"color: #000000;\">&#41;</span><br />   <span style=\"color: #0000ff;\">DEFINE</span> IMGBITMAP <span style=\"color: #0000ff;\">OF</span> oImageList <span style=\"color: #0000ff;\">NAME</span> <span style=\"color: #ff0000;\">\"keys\"</span>     <span style=\"color: #0000ff;\">COLOR</span> nRGB<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">255</span>, <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">255</span> <span style=\"color: #000000;\">&#41;</span><br />   <span style=\"color: #0000ff;\">DEFINE</span> IMGBITMAP <span style=\"color: #0000ff;\">OF</span> oImageList <span style=\"color: #0000ff;\">NAME</span> <span style=\"color: #ff0000;\">\"quit\"</span>     <span style=\"color: #0000ff;\">COLOR</span> nRGB<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">255</span>, <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">255</span> <span style=\"color: #000000;\">&#41;</span><br /><br />   <span style=\"color: #0000ff;\">DEFINE</span> TOOLBAR oToolBar <span style=\"color: #0000ff;\">OF</span> oWnd <span style=\"color: #0000ff;\">SIZE</span> <span style=\"color: #000000;\">50</span>, <span style=\"color: #000000;\">58</span> ; <span style=\"color: #B900B9;\">// 50, 50 ;</span><br />      IMAGELIST oImageList BALLOON <span style=\"color: #B900B9;\">// tooltips balloon style</span><br />   <br />   oToolBar:<span style=\"color: #000000;\">SetTextRows</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">&#41;</span><br />   <br />   <span style=\"color: #0000ff;\">DEFINE</span> TBBUTTON <span style=\"color: #0000ff;\">OF</span> oToolBar ;<br />      <span style=\"color: #0000ff;\">ACTION</span>  <span style=\"color: #0000ff;\">MsgInfo</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"Print\"</span> <span style=\"color: #000000;\">&#41;</span> ;<br />      TOOLTIP <span style=\"color: #ff0000;\">\"Print a report\"</span> ;<br />      <span style=\"color: #0000ff;\">PROMPT</span>  <span style=\"color: #ff0000;\">\"Print a report\"</span><br /><br />   <span style=\"color: #0000ff;\">DEFINE</span> TBSEPARATOR <span style=\"color: #0000ff;\">OF</span> oToolBar<br />      <br />   <span style=\"color: #0000ff;\">DEFINE</span> TBBUTTON <span style=\"color: #0000ff;\">OF</span> oToolBar ;<br />      <span style=\"color: #0000ff;\">ACTION</span>  <span style=\"color: #0000ff;\">MsgInfo</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"Upgrade\"</span> <span style=\"color: #000000;\">&#41;</span> ;<br />      TOOLTIP <span style=\"color: #ff0000;\">\"Search for new versions\"</span> ;<br />      <span style=\"color: #0000ff;\">PROMPT</span>  <span style=\"color: #ff0000;\">\"Upgrade\"</span><br />      <br />   <span style=\"color: #0000ff;\">DEFINE</span> TBBUTTON <span style=\"color: #0000ff;\">OF</span> oToolBar ;<br />      <span style=\"color: #0000ff;\">ACTION</span> <span style=\"color: #0000ff;\">MsgInfo</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"Users\"</span> <span style=\"color: #000000;\">&#41;</span> ;<br />      TOOLTIP <span style=\"color: #ff0000;\">\"Users management\"</span> ;<br />      <span style=\"color: #0000ff;\">PROMPT</span> <span style=\"color: #ff0000;\">\"Users\"</span>   <br /><br />   <span style=\"color: #0000ff;\">DEFINE</span> TBSEPARATOR <span style=\"color: #0000ff;\">OF</span> oToolBar<br /><br />   <span style=\"color: #0000ff;\">DEFINE</span> TBBUTTON <span style=\"color: #0000ff;\">OF</span> oToolBar ;<br />      <span style=\"color: #0000ff;\">ACTION</span>  oWnd:<span style=\"color: #000000;\">End</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> ;<br />      TOOLTIP <span style=\"color: #ff0000;\">\"End Application\"</span> ;<br />      <span style=\"color: #0000ff;\">PROMPT</span>  <span style=\"color: #ff0000;\">\"Exit\"</span><br />      <br /><span style=\"color: #00C800;\">return</span> oToolBar<br /><br /><span style=\"color: #00C800;\">function</span> BuildPopup<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />   <span style=\"color: #00C800;\">local</span> oMenu<br />   <br />   <span style=\"color: #0000ff;\">MENU</span> oMenu <span style=\"color: #0000ff;\">POPUP</span><br />      <span style=\"color: #0000ff;\">MENUITEM</span> <span style=\"color: #ff0000;\">\"One\"</span>   <span style=\"color: #0000ff;\">ACTION</span> <span style=\"color: #0000ff;\">MsgInfo</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"One\"</span> <span style=\"color: #000000;\">&#41;</span><br />      <span style=\"color: #0000ff;\">MENUITEM</span> <span style=\"color: #ff0000;\">\"Two\"</span>   <span style=\"color: #0000ff;\">ACTION</span> <span style=\"color: #0000ff;\">MsgInfo</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"Two\"</span> <span style=\"color: #000000;\">&#41;</span><br />      <span style=\"color: #0000ff;\">MENUITEM</span> <span style=\"color: #ff0000;\">\"Three\"</span> <span style=\"color: #0000ff;\">ACTION</span> <span style=\"color: #0000ff;\">MsgInfo</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"Three\"</span> <span style=\"color: #000000;\">&#41;</span><br />   <span style=\"color: #0000ff;\">ENDMENU</span><br />   <br /><span style=\"color: #00C800;\">return</span> oMenu      <br /> </div>[/code:2dp3ar7q]", "time": "15:01", "topic": "Changing the Toolbar content", "username": "Antonio Linares" } ]
Changing the Toolbar content
[ { "date": "2012-02-08", "forum": "FiveWin for Harbour/xHarbour", "text": "Codemaker,\n\ndone it this way:\n\n[code=fw:13fc7q9r]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br />...<br /><span style=\"color: #B900B9;\">// Define the maximal number of buttons and disable them</span><br />   nBtnMax  := <span style=\"color: #000000;\">40</span><br />   <span style=\"color: #00C800;\">FOR</span> i := nBtnFree <span style=\"color: #0000ff;\">TO</span> nBtnMax<br />      oBtn := TBtnBmp<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #000000;\">NewBar</span><span style=\"color: #000000;\">&#40;</span>,,,,,, IIf<span style=\"color: #000000;\">&#40;</span> i == nBtnFree, .T., .F. <span style=\"color: #000000;\">&#41;</span>, oBar, .F.,,, .F.,,,, <span style=\"color: #ff0000;\">\"B.\"</span> + AllTrim<span style=\"color: #000000;\">&#40;</span> Str<span style=\"color: #000000;\">&#40;</span> i <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span>,,,,,, Upper<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"BOTTOM\"</span> <span style=\"color: #000000;\">&#41;</span>,,, .F. <span style=\"color: #000000;\">&#41;</span><br />      oBtn:<span style=\"color: #000000;\">Disable</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />   <span style=\"color: #00C800;\">NEXT</span> i<br />...<br /><span style=\"color: #B900B9;\">// Define the buttons for the actual modul</span><br />         <span style=\"color: #00C800;\">DO</span> <span style=\"color: #00C800;\">WHILE</span> .T.<br />            <span style=\"color: #00C800;\">IF</span> n <= nBtnMax<br />               oBar:<span style=\"color: #000000;\">aControls</span><span style=\"color: #000000;\">&#91;</span> n <span style=\"color: #000000;\">&#93;</span>:<span style=\"color: #000000;\">Enable</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />               oBar:<span style=\"color: #000000;\">aControls</span><span style=\"color: #000000;\">&#91;</span> n <span style=\"color: #000000;\">&#93;</span> :<span style=\"color: #000000;\">cCaption</span> := ...<br />               oBar:<span style=\"color: #000000;\">aControls</span><span style=\"color: #000000;\">&#91;</span> n <span style=\"color: #000000;\">&#93;</span> :<span style=\"color: #000000;\">cToolTip</span> := ...<br />               oBar:<span style=\"color: #000000;\">aControls</span><span style=\"color: #000000;\">&#91;</span> n <span style=\"color: #000000;\">&#93;</span> :<span style=\"color: #000000;\">cAction</span> := ...<br />               oBar:<span style=\"color: #000000;\">aControls</span><span style=\"color: #000000;\">&#91;</span> n <span style=\"color: #000000;\">&#93;</span> :<span style=\"color: #000000;\">bAction</span> := ..<br />               n ++<br />            <span style=\"color: #00C800;\">ELSE</span><br />               EXIT<br />            <span style=\"color: #00C800;\">ENDIF</span><br />            <span style=\"color: #B900B9;\">// Next button</span><br />         <span style=\"color: #00C800;\">ENDDO</span><br />...<br /><span style=\"color: #B900B9;\">// delete all buttons if swichting the modul</span><br />      <span style=\"color: #00C800;\">FOR</span> n := <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">TO</span> nBtnMax<br />         oBar:<span style=\"color: #000000;\">aControls</span><span style=\"color: #000000;\">&#91;</span> n <span style=\"color: #000000;\">&#93;</span>:<span style=\"color: #000000;\">Disable</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />         oBar:<span style=\"color: #000000;\">aControls</span><span style=\"color: #000000;\">&#91;</span> n <span style=\"color: #000000;\">&#93;</span> :<span style=\"color: #000000;\">cCaption</span> := <span style=\"color: #ff0000;\">\"\"</span><br />         oBar:<span style=\"color: #000000;\">aControls</span><span style=\"color: #000000;\">&#91;</span> n <span style=\"color: #000000;\">&#93;</span> :<span style=\"color: #000000;\">cToolTip</span> := <span style=\"color: #ff0000;\">\"\"</span><br />         oBar:<span style=\"color: #000000;\">aControls</span><span style=\"color: #000000;\">&#91;</span> n <span style=\"color: #000000;\">&#93;</span> :<span style=\"color: #000000;\">cAction</span> := <span style=\"color: #ff0000;\">\"\"</span><br />         oBar:<span style=\"color: #000000;\">aControls</span><span style=\"color: #000000;\">&#91;</span> n <span style=\"color: #000000;\">&#93;</span> :<span style=\"color: #000000;\">bAction</span> := <span style=\"color: #000000;\">&#123;</span> || <span style=\"color: #00C800;\">NIL</span> <span style=\"color: #000000;\">&#125;</span><br />      <span style=\"color: #00C800;\">NEXT</span> n<br /><span style=\"color: #B900B9;\">// Define the buttons for the actual modul</span><br />...</div>[/code:13fc7q9r]\nHTH", "time": "15:50", "topic": "Changing the Toolbar content", "username": "frose" } ]
Changing the Toolbar content
[ { "date": "2012-02-08", "forum": "FiveWin for Harbour/xHarbour", "text": "[quote=\"Antonio Linares\":3n4m0r8v]Boris,\n\nYou can create and manage as many toolbars as needed <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->\n\nTo switch from one toolbar to another is as easy as:\n[code=fw:3n4m0r8v]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br />         <span style=\"color: #0000ff;\">MENUITEM</span> <span style=\"color: #ff0000;\">\"&ToolBar1...\"</span> <span style=\"color: #0000ff;\">ACTION</span> <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> oWnd:<span style=\"color: #000000;\">oTop</span> == oToolBar2, <span style=\"color: #000000;\">&#40;</span> oWnd:<span style=\"color: #000000;\">oTop</span> := oToolBar1, oToolBar2:<span style=\"color: #000000;\">Hide</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, oToolBar1:<span style=\"color: #000000;\">Show</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #0000ff;\">MESSAGE</span> <span style=\"color: #ff0000;\">\"ToolBar 1\"</span><br />         <span style=\"color: #0000ff;\">MENUITEM</span> <span style=\"color: #ff0000;\">\"T&oolBar2...\"</span> <span style=\"color: #0000ff;\">ACTION</span> <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> oWnd:<span style=\"color: #000000;\">oTop</span> == oToolBar1, <span style=\"color: #000000;\">&#40;</span> oWnd:<span style=\"color: #000000;\">oTop</span> := oToolBar2, oToolBar1:<span style=\"color: #000000;\">Hide</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, oToolBar2:<span style=\"color: #000000;\">Show</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #0000ff;\">MESSAGE</span> <span style=\"color: #ff0000;\">\"ToolBar 2\"</span><br /> </div>[/code:3n4m0r8v]\n\n[/quote:3n4m0r8v]\nAntonio, thank you for this solution, it is exactly what I need.\nNow I can move on <!-- s:) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":)\" title=\"Smile\" /><!-- s:) -->\n\nBTW: thanks to Uwe and frose too", "time": "21:41", "topic": "Changing the Toolbar content", "username": "codemaker" } ]
Changing the Toolbar content
[ { "date": "2018-03-16", "forum": "FiveTouch", "text": "[code=fw:3sv83gjq]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"FiveTouch.ch\"</span><br /><br /><span style=\"color: #00C800;\">function</span> Main<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> oDlg<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">SIZE</span> ScreenWidth<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, ScreenHeight<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;oDlg:<span style=\"color: #000000;\">SetStyleSheet</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"QDialog\"</span> + CRLF + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #ff0000;\">\"{\"</span> + CRLF + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #ff0000;\">\" &nbsp; background-color: #882244;\"</span> + CRLF + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #ff0000;\">\"}\"</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style=\"color: #0000ff;\">ACTIVATE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDlg&nbsp;<br />&nbsp; &nbsp;<br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">nil</span></div>[/code:3sv83gjq]", "time": "14:39", "topic": "Changing the background color", "username": "Antonio Linares" } ]
Changing the background color
[ { "date": "2008-03-09", "forum": "FiveLinux / FiveDroid (Android)", "text": "Hi Antonio\n\nI can't see how to do it. Is it currently possible? If not could it be added? It would really help in my application. (I want to change the background color when a button is clicked and change it back again when another one is clicked).\n\nThanks\nDoug\n(xProgrammer)", "time": "22:22", "topic": "Changing the background color of a BUTTON", "username": "xProgrammer" } ]
Changing the background color of a BUTTON
[ { "date": "2008-03-13", "forum": "FiveLinux / FiveDroid (Android)", "text": "Antonio\n\nI have done a little research and in GTK+2.0 it sounds like it isn't too difficult, you need something like this:\n\n[code:n43dsnm5] GdkColor color;\n\n gdk_color_parse &#40;\"red\", &color&#41;;\n\n gtk_widget_modify_fg &#40;widget, GTK_STATE_NORMAL, &color&#41;;\n[/code:n43dsnm5]\n\nThe code required in earlier versions is greater. Do you use GTK+2.0?", "time": "21:00", "topic": "Changing the background color of a BUTTON", "username": "xProgrammer" } ]
Changing the background color of a BUTTON
[ { "date": "2008-03-13", "forum": "FiveLinux / FiveDroid (Android)", "text": "Doug,\n\nAfaik we are using GTK+ 2.0. Please try this code in Class TWindow:\n[code:225d38ch]\nMETHOD SetColor&#40; cColor &#41; INLINE GtkSetColor&#40; &#58;&#58;hWnd, cColor &#41;\n\n#pragma BEGINDUMP\n\n#include <hbapi&#46;h>\n#include <gtk/gtk&#46;h>\n\nHB_FUNC&#40; GTKSETCOLOR &#41;\n&#123;\n GdkColor color; \n\n gdk_color_parse&#40; hb_parc&#40; 1 &#41;, &color &#41;; \n gtk_widget_modify_fg&#40; &#40; GtkWidget * &#41; hb_parnl&#40; 1 &#41;, GTK_STATE_NORMAL, &color &#41;;\n&#125;\n\n#pragma ENDDUMP\n[/code:225d38ch]", "time": "22:31", "topic": "Changing the background color of a BUTTON", "username": "Antonio Linares" } ]
Changing the background color of a BUTTON
[ { "date": "2008-03-14", "forum": "FiveLinux / FiveDroid (Android)", "text": "Hi Antonio\n\nThanks. I will try that. I take it that I will have to compile the code in the modified window.prg and what else? Am I producing a new library? or object code to be linked? or what?\n\nSorry for the (probably) naive questions but I haven't had to do that sort of thing before.\n\nThanks\n\nDoug", "time": "03:38", "topic": "Changing the background color of a BUTTON", "username": "xProgrammer" } ]
Changing the background color of a BUTTON
[ { "date": "2008-03-14", "forum": "FiveLinux / FiveDroid (Android)", "text": "Doug,\n\nYou have to modify window.prg and then compile it and link it as another PRG of your application", "time": "09:15", "topic": "Changing the background color of a BUTTON", "username": "Antonio Linares" } ]
Changing the background color of a BUTTON
[ { "date": "2008-03-15", "forum": "FiveLinux / FiveDroid (Android)", "text": "Hi Antonio\n\nI did that and got the following error in the terminal window from whioch I launched my application:\n\n(<unknown>:30895) Pango-CRITICAL **: pango-color-parse: assertion 'spec != NULL' failed\n\nSeems like a parameter passing problem?\n\nThe call in my code was: \n\n[code:35c8n9kd] btnSelect&#58;SetColor&#40;\"red\"&#41;[/code:35c8n9kd])\n\nBut we must be close since we are getting a message from pango_color_parse.\n\nI just found out more - I changed METHOD SetColor in two ways.\n\nFirstly I hard coded red - which stopped the error message (bur unfortunately didn't give me a red button) and I included a MsgInfo (just to check that the code was being traversed. \n\n[code:35c8n9kd]METHOD SetColor&#40; cColor &#41; INLINE MsgInfo&#40; \"red\"&#41;, GtkSetColor&#40; &#58;&#58;hWnd, cColor &#41;\n\n#pragma BEGINDUMP\n\n#include <hbapi&#46;h>\n#include <gtk/gtk&#46;h>\n\nHB_FUNC&#40; GTKSETCOLOR &#41;\n&#123;\n GdkColor color;\n\n gdk_color_parse&#40; \"red\", &color &#41;;\n gtk_widget_modify_fg&#40; &#40; GtkWidget * &#41; hb_parnl&#40; 1 &#41;, GTK_STATE_NORMAL, &color &#41;;\n&#125;\n\n#pragma ENDDUMP [/code:35c8n9kd]\n\nI just tried setting the color of oWnd to red - again no error but also no red.\n\nI will do some more research, but if you have any ideas please let me know.\n\nThanks\n\nDoug\n(xProgrammer)", "time": "04:54", "topic": "Changing the background color of a BUTTON", "username": "xProgrammer" } ]
Changing the background color of a BUTTON
[ { "date": "2008-03-15", "forum": "FiveLinux / FiveDroid (Android)", "text": "Hi Antonio\n\nProgress!\n\nI changed \n\n[code:32febzkz]gtk_widget_modify_fg\n[/code:32febzkz]\n\nto\n\n[code:32febzkz]gtk_widget_modify_bg[/code:32febzkz]\n\nAnd we have a red button (background) in the normal state.\n\nSo we are very close. Now we have to work out:\n\nWhy hb_parc(1) doesn't seem to be getting the value \"red\".\n\nList of states to which colors can be applied (That should be easy enough for me to find))\n\nThe function that sets a color for the text. (Actually I am happy just controlling the background color, but others may want to change the text color)\n\nThanks and regards\nDoug\n(xProgrammer)", "time": "06:59", "topic": "Changing the background color of a BUTTON", "username": "xProgrammer" } ]
Changing the background color of a BUTTON
[ { "date": "2008-03-15", "forum": "FiveLinux / FiveDroid (Android)", "text": "States are as follows: \n\n enum GtkStateType\n\n[code:1pldv652]typedef enum\n&#123;\n GTK_STATE_NORMAL,\n GTK_STATE_ACTIVE,\n GTK_STATE_PRELIGHT,\n GTK_STATE_SELECTED,\n GTK_STATE_INSENSITIVE\n&#125; GtkStateType;[/code:1pldv652]\n\nThis type indicates the current state of a widget; the state determines how the widget is drawn. The GtkStateType enumeration is also used to identify different colors in a GtkStyle for drawing, so states can be used for subparts of a widget as well as entire widgets.\n\n[color=red:1pldv652]GTK_STATE_NORMAL[/color:1pldv652]\n\tState during normal operation.\n\n[color=red:1pldv652]GTK_STATE_ACTIVE[/color:1pldv652]\n\tState of a currently active widget, such as a depressed button.\n\n[color=red:1pldv652]GTK_STATE_PRELIGHT[/color:1pldv652]\n\tState indicating that the mouse pointer is over the widget and the widget will respond to mouse clicks.\n\n[color=red:1pldv652]GTK_STATE_SELECTED[/color:1pldv652]\n\tState of a selected item, such the selected row in a list.\n\n[color=red:1pldv652]GTK_STATE_INSENSITIVE[/color:1pldv652]\n\tState indicating that the widget is unresponsive to user actions. \n\nAnd the color changing methods are:\n\n[code:1pldv652]gtk_widget_modify_fg &#40;&#41;\n\nvoid gtk_widget_modify_fg &#40;GtkWidget *widget,\n GtkStateType state,\n const GdkColor *color&#41;;[/code:1pldv652]\n\nSets the foreground color for a widget in a particular state. All other style values are left untouched. See also gtk_widget_modify_style().\n\nwidget :\n\ta GtkWidget\n\nstate :\n\tthe state for which to set the foreground color\n\ncolor :\n\tthe color to assign (does not need to be allocated), or NULL to undo the effect of previous calls to of gtk_widget_modify_fg().\n\n[code:1pldv652]gtk_widget_modify_bg &#40;&#41;\n\nvoid gtk_widget_modify_bg &#40;GtkWidget *widget,\n GtkStateType state,\n const GdkColor *color&#41;;\n[/code:1pldv652]\nSets the background color for a widget in a particular state. All other style values are left untouched. See also gtk_widget_modify_style().\n\nNote that \"no window\" widgets (which have the GTK_NO_WINDOW flag set) draw on their parent container's window and thus may not draw any background themselves. This is the case for e.g. GtkLabel. To modify the background of such widgets, you have to set the background color on their parent; if you want to set the background of a rectangular area around a label, try placing the label in a GtkEventBox widget and setting the background color on that.\n\nwidget :\n\ta GtkWidget\n\nstate :\n\tthe state for which to set the background color\n\ncolor :\n\tthe color to assign (does not need to be allocated), or NULL to undo the effect of previous calls to of gtk_widget_modify_bg().\n\n[code:1pldv652]gtk_widget_modify_text &#40;&#41;\n\nvoid gtk_widget_modify_text &#40;GtkWidget *widget,\n GtkStateType state,\n const GdkColor *color&#41;;[/code:1pldv652]\n\nSets the text color for a widget in a particular state. All other style values are left untouched. The text color is the foreground color used along with the base color (see gtk_widget_modify_base()) for widgets such as GtkEntry and GtkTextView. See also gtk_widget_modify_style().\n\nwidget :\n\ta GtkWidget\n\nstate :\n\tthe state for which to set the text color\n\ncolor :\n\tthe color to assign (does not need to be allocated), or NULL to undo the effect of previous calls to of gtk_widget_modify_text().\n\n[code:1pldv652]gtk_widget_modify_base &#40;&#41;\n\nvoid gtk_widget_modify_base &#40;GtkWidget *widget,\n GtkStateType state,\n const GdkColor *color&#41;;\n[/code:1pldv652]\nSets the base color for a widget in a particular state. All other style values are left untouched. The base color is the background color used along with the text color (see gtk_widget_modify_text()) for widgets such as GtkEntry and GtkTextView. See also gtk_widget_modify_style().\n\nNote that \"no window\" widgets (which have the GTK_NO_WINDOW flag set) draw on their parent container's window and thus may not draw any background themselves. This is the case for e.g. GtkLabel. To modify the background of such widgets, you have to set the base color on their parent; if you want to set the background of a rectangular area around a label, try placing the label in a GtkEventBox widget and setting the base color on that.\n\nwidget :\n\ta GtkWidget\n\nstate :\n\tthe state for which to set the base color\n\ncolor :\n\tthe color to assign (does not need to be allocated), or NULL to undo the effect of previous calls to of gtk_widget_modify_base(). \n\nHowever I tried modify_text for my button and it didn't work. I tried setting background colors for different states and got that working fine with this code:\n\n[code:1pldv652]METHOD SetColor&#40; cColor &#41; INLINE MsgInfo&#40; \"red\"&#41;, GtkSetColor&#40; &#58;&#58;hWnd, cColor &#41;\n\n#pragma BEGINDUMP\n\n#include <hbapi&#46;h>\n#include <gtk/gtk&#46;h>\n\nHB_FUNC&#40; GTKSETCOLOR &#41;\n&#123;\n GdkColor color;\n GdkColor acolor;\n\n gdk_color_parse&#40; \"red\", &color &#41;;\n gdk_color_parse&#40; \"yellow\", &acolor &#41;;\n gtk_widget_modify_bg&#40; &#40; GtkWidget * &#41; hb_parnl&#40; 1 &#41;, GTK_STATE_NORMAL, &color &#41;;\n gtk_widget_modify_bg&#40; &#40; GtkWidget * &#41; hb_parnl&#40; 1 &#41;, GTK_STATE_PRELIGHT, &acolor &#41;;\n&#125;\n\n#pragma ENDDUMP [/code:1pldv652]\n\nSo a generic SetColor might take color names for the various states.\n\nCould you tell me the best way to debug why I don't seem to be getting the string valuse passed in to the C code.\n\nThanks\n\nDoug", "time": "07:41", "topic": "Changing the background color of a BUTTON", "username": "xProgrammer" } ]
Changing the background color of a BUTTON
[ { "date": "2008-03-15", "forum": "FiveLinux / FiveDroid (Android)", "text": "Hi Antonio\n\nI should have worked it out before - the problem with your original code is that where you have hb_parc( 1 ) it should in fact he hb_parc( 2). Now parameter passing appears fine.\n\nNow the function needs to be made more utilitarian - ie change any of the colors (bg, fg, text, base) for any state. State can be passed as a parameter.\n\nRegards\nDoug", "time": "10:33", "topic": "Changing the background color of a BUTTON", "username": "xProgrammer" } ]
Changing the background color of a BUTTON
[ { "date": "2008-03-15", "forum": "FiveLinux / FiveDroid (Android)", "text": "Doug,\n\nThere was a bug in my code. This is the right one:\n[code:3s6zpmnq]\nMETHOD SetColor&#40; cColor &#41; INLINE GtkSetColor&#40; &#58;&#58;hWnd, cColor &#41; \n\n#pragma BEGINDUMP \n\n#include <hbapi&#46;h> \n#include <gtk/gtk&#46;h> \n\nHB_FUNC&#40; GTKSETCOLOR &#41; \n&#123; \n GdkColor color; \n\n gdk_color_parse&#40; hb_parc&#40; 2 &#41;, &color &#41;; \n gtk_widget_modify_fg&#40; &#40; GtkWidget * &#41; hb_parnl&#40; 1 &#41;, GTK_STATE_NORMAL, &color &#41;; \n&#125; \n\n#pragma ENDDUMP \n[/code:3s6zpmnq]", "time": "11:14", "topic": "Changing the background color of a BUTTON", "username": "Antonio Linares" } ]
Changing the background color of a BUTTON
[ { "date": "2008-03-15", "forum": "FiveLinux / FiveDroid (Android)", "text": "Hi Antonio\n\nThis version allows you to pass in the state to apply the color to as a second parameter:\n\n[code:1o5s0962]METHOD SetColor&#40; cColor, iState &#41; INLINE GtkSetColor&#40; &#58;&#58;hWnd, cColor, iState &#41;\n\n#pragma BEGINDUMP\n\n#include <hbapi&#46;h>\n#include <gtk/gtk&#46;h>\n\nHB_FUNC&#40; GTKSETCOLOR &#41;\n&#123;\n GdkColor color;\n\n gdk_color_parse&#40; hb_parc&#40; 2 &#41;, &color &#41;;\n gtk_widget_modify_bg&#40; &#40; GtkWidget * &#41; hb_parnl&#40; 1 &#41;, hb_parni&#40; 3 &#41;, &color &#41;;\n&#125;[/code:1o5s0962]\n\nThe state parameter can then be:\n\n[code:1o5s0962]#define GTK_NORMAL 1\n#define GTK_ACTIVE 2\n#define GTK_PRELIGHT 3\n#define GTK_SELECTED 4\n#define GTK_INSENSITIVE 5[/code:1o5s0962]\n\nNext step is to either have multiple methods (SetBGColor, SetFGColor, SetTextColor and SetBaseColor, or pass in an additional parameter (switch).\n\nRegards\nDoug", "time": "12:31", "topic": "Changing the background color of a BUTTON", "username": "xProgrammer" } ]
Changing the background color of a BUTTON
[ { "date": "2008-03-15", "forum": "FiveLinux / FiveDroid (Android)", "text": "Correction to above - defines should be:\n\n[code:yrpen0z5]#define GTK_NORMAL 0\n#define GTK_ACTIVE 1\n#define GTK_PRELIGHT 2\n#define GTK_SELECTED 3\n#define GTK_INSENSITIVE 4[/code:yrpen0z5]", "time": "19:45", "topic": "Changing the background color of a BUTTON", "username": "xProgrammer" } ]
Changing the background color of a BUTTON
[ { "date": "2008-03-15", "forum": "FiveLinux / FiveDroid (Android)", "text": "Doug,\n\nI think we should implement it this way:\n\nMETHOD SetColor( cForeColor, cBackColor [, nState] )", "time": "20:35", "topic": "Changing the background color of a BUTTON", "username": "Antonio Linares" } ]
Changing the background color of a BUTTON
[ { "date": "2008-03-16", "forum": "FiveLinux / FiveDroid (Android)", "text": "Hi Antonio\n\nI certainly want to manipulate text-color as well (So that if a GET is set to WHEN .F. it isn't in that dull gray which some users find hard to read).\n\nThat would only leave base-color which means perhaps we should consider doing all four.\n\nMaybe we could have:\n[code:pdvyejvk]\nMETHOD SetColor&#40; cForeColor&#91;, cBackColor&#91;, cTextColor&#91;, cBaseColor &#91;, nState&#93;&#93;&#93;&#93; &#41;[/code:pdvyejvk]\n\nsuch that passing a NULL for any color just means that the corresponding gtk_widget-modify method is not invoked and the present setting is left unaltered.\n\nPerhaps even better would be the following:\n\nMETHOD SetColor( aColors[, nState]) \n\nwhere aColors is an array of the four possible color settings\n\n[code:pdvyejvk]#define GTK_FOREGROUND 1\n#define GTK_BACKGROUND 2\n#define GTK_TEXT 3\n#define GTK_BASE 4[/code:pdvyejvk]\n\nso in usage we would have something like:\n\n[code:pdvyejvk]aGTK_Colors &#58;= ARRAY&#40; 4 &#41;\naGTK_Colors&#91;GTK_BACKGROUND&#93; &#58;= \"red\"\naGTK_Colors&#91;GTK_TEXT&#93; &#58;= \"black\"\nbtnEXAMPLE&#58;SetColors&#40; aGTK_Colors, GTK_PRELIGHT &#41;[/code:pdvyejvk]\n\nThe SetColor Method would presumably contain code like:\n\n[code:pdvyejvk]LOCAL iLen\niLen &#58;= LEN&#40; aColors &#41;\nIF iLen < 0\n RETURN\nENDIF\nIF !Empty&#40; a Colors&#91;1&#93; &#41;\n GtkSetFGColor&#40; &#58;&#58;hWnd, aColors&#91;1&#93;, iState &#41;\nENDIF\nIF iLen < 2\n RETURN\nENDIF\nIF !EMPTY&#40; aColors&#91;2&#93; &#41;\n GtkSetBGColor&#40; &#58;&#58;hWnd, aColors&#91;2&#93;, iState &#41;\nENDIF[/code:pdvyejvk]\n\netc\n\nJust my suggestion.\n\nThanks for your help\nRegards\nDoug\n(xProgrammer)", "time": "03:00", "topic": "Changing the background color of a BUTTON", "username": "xProgrammer" } ]
Changing the background color of a BUTTON
[ { "date": "2008-03-16", "forum": "FiveLinux / FiveDroid (Android)", "text": "For anyone following this who wants to know what colors can be created this way the list is available in text form at\n\n<!-- m --><a class=\"postlink\" href=\"http://www-swiss.ai.mit.edu/~jaffer/Color/rgb.txt\">http://www-swiss.ai.mit.edu/~jaffer/Color/rgb.txt</a><!-- m -->\n\nor to see the colors go to\n\n<!-- m --><a class=\"postlink\" href=\"http://sedition.com/perl/rgb.html\">http://sedition.com/perl/rgb.html</a><!-- m -->\n\nalternatively search for rgb.txt\n\nRegards\nDoug\n(xProgrammer)", "time": "21:19", "topic": "Changing the background color of a BUTTON", "username": "xProgrammer" } ]
Changing the background color of a BUTTON
[ { "date": "2023-01-29", "forum": "FiveWin for Harbour/xHarbour", "text": "Hi,\nIn the TFolderEx bookmarks, I need, depending on the situation, to change the bitmap (from the resource) . How can this be done ?", "time": "09:46", "topic": "Changing the bitmap in the bookmark", "username": "Natter" } ]
Changing the bitmap in the bookmark
[ { "date": "2023-01-29", "forum": "FiveWin for Harbour/xHarbour", "text": "Maybe,\n\n[code=fw:1y4bxsah]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br />&nbsp; &nbsp;<span style=\"color: #0000ff;\">BITMAPS</span> IIF<span style=\"color: #000000;\">&#40;</span> lCondition, <span style=\"color: #ff0000;\">\"Bitmap01\"</span>, <span style=\"color: #ff0000;\">\"BitMap02\"</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp;</div>[/code:1y4bxsah]\n\nRegards, saludos.", "time": "20:01", "topic": "Changing the bitmap in the bookmark", "username": "karinha" } ]
Changing the bitmap in the bookmark
[ { "date": "2023-01-30", "forum": "FiveWin for Harbour/xHarbour", "text": "Not suitable. I need to interactively change pictures in bookmarks. I tried the methods SetBitmap and SetBrightBMP, but it didn't work out <!-- s:( --><img src=\"{SMILIES_PATH}/icon_sad.gif\" alt=\":(\" title=\"Sad\" /><!-- s:( -->", "time": "07:36", "topic": "Changing the bitmap in the bookmark", "username": "Natter" } ]
Changing the bitmap in the bookmark
[ { "date": "2023-01-30", "forum": "FiveWin for Harbour/xHarbour", "text": "[quote=\"Natter\":1x8vxryh]Not suitable. I need to interactively change pictures in bookmarks. I tried the methods SetBitmap and SetBrightBMP, but it didn't work out <!-- s:( --><img src=\"{SMILIES_PATH}/icon_sad.gif\" alt=\":(\" title=\"Sad\" /><!-- s:( -->[/quote:1x8vxryh]\nSorry, this not run ok ?\n[code=fw:1x8vxryh]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br />oFld:<span style=\"color: #000000;\">SetBitMap</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"modif\"</span>, oFld:<span style=\"color: #000000;\">nOption</span> <span style=\"color: #000000;\">&#41;</span> &nbsp; <span style=\"color: #B900B9;\">// \"modif\" -> resource of bitmap</span><br />&nbsp;</div>[/code:1x8vxryh]", "time": "14:09", "topic": "Changing the bitmap in the bookmark", "username": "cnavarro" } ]
Changing the bitmap in the bookmark
[ { "date": "2023-01-30", "forum": "FiveWin for Harbour/xHarbour", "text": "If I run the method: SetBitmap (\"modif\", oFld:nOption), then the bookmark simply becomes empty", "time": "14:15", "topic": "Changing the bitmap in the bookmark", "username": "Natter" } ]
Changing the bitmap in the bookmark
[ { "date": "2023-01-30", "forum": "FiveWin for Harbour/xHarbour", "text": "[quote=\"Natter\":3v87mpgk]If I run the method: SetBitmap (\"modif\", oFld:nOption), then the bookmark simply becomes empty[/quote:3v87mpgk]\nResource \"modif\" exist in your file .RC or .RES ?", "time": "14:43", "topic": "Changing the bitmap in the bookmark", "username": "cnavarro" } ]
Changing the bitmap in the bookmark
[ { "date": "2023-01-30", "forum": "FiveWin for Harbour/xHarbour", "text": "I didn't understand the question. First, the resources are registered in .RC, after compilation we get .RES\nWhen installing TFolderEx, everything is fine - bookmarks with text and pictures.", "time": "15:25", "topic": "Changing the bitmap in the bookmark", "username": "Natter" } ]
Changing the bitmap in the bookmark
[ { "date": "2023-01-30", "forum": "FiveWin for Harbour/xHarbour", "text": "Look at this, see if it helps:\n\n[url:3uxou6ov]https&#58;//fivetechsupport&#46;com/forums/viewtopic&#46;php?f=3&t=32718&start=0[/url:3uxou6ov]\n\n[url:3uxou6ov]http&#58;//fivewin&#46;com&#46;br/index&#46;php?/topic/27181-gradient-nos-bot%C3%B5es-e-na-buttonbar/[/url:3uxou6ov]\n\n[url:3uxou6ov]https&#58;//forums&#46;fivetechsupport&#46;com/viewtopic&#46;php?f=6&t=20005&p=177363&hilit=imagen+en+recurso#p177363[/url:3uxou6ov]\n\nRegards, saludos.", "time": "16:44", "topic": "Changing the bitmap in the bookmark", "username": "karinha" } ]
Changing the bitmap in the bookmark
[ { "date": "2020-11-09", "forum": "FiveWin para Harbour/xHarbour", "text": "Hello,\n\nI have a special question about my images- and download-links inside the forum.\nEverything belongs to my website < PFLEGEPLUS.COM > I created 20 years ago.\nNow a company asked me if I would like to sell this name \nbecause < PFLEGE > is a area of business and < PLUS > means < + >\nIs it possiblel to make a global change inside the forum with a new name \nto keep everything activated.\n\nbest regards\nUwe <!-- s:?: --><img src=\"{SMILIES_PATH}/icon_question.gif\" alt=\":?:\" title=\"Question\" /><!-- s:?: -->", "time": "19:37", "topic": "Changing the domain of images- and download-links", "username": "ukoenig" } ]
Changing the domain of images- and download-links
[ { "date": "2020-11-09", "forum": "FiveWin para Harbour/xHarbour", "text": "Dear Uwe,\n\nYes, whats the new name that you want to use ?", "time": "19:43", "topic": "Changing the domain of images- and download-links", "username": "Antonio Linares" } ]
Changing the domain of images- and download-links
[ { "date": "2009-05-07", "forum": "FiveWin for Harbour/xHarbour", "text": "Hi all,\nanother xbrowse issue.\n\nI have an array with the second element (aarray[x,2]) numeric editable.\nI would like to use the picture \"99.9\" for the value on the first row and \"99.99\" for the value on the second row.\n\nAny suggest how can I make this ?\n\nThanks in adance\n\nThis self-contained sample show my problem.\n\nfunction Main()\n\n local oDlg, oBrw, aArray\n\n set epoch to 1920\n\n aArray:={}\n aadd(aArray,{\"Marc\",10.2}) && I have a one digit value\n aadd(aArray,{\"Luca\",6.55}) && I have a two digit value\n\n DEFINE DIALOG oDlg SIZE 300, 200\n\n @0,0 XBROWSE oBrw OF oDlg ARRAY aArray AUTOCOLS\n\n oBrw:aCols[2]:cEditPicture := \"@E 999.99\" && <-------- ? ? \n oBrw:aCols[2]:nEditType := 1\n oBrw:aCols[2]:bOnPostEdit := {|o,x| nLastCell:=oBrw:nArrayAt,aArray[oBrw:nArrayAt,2]:=x}\n oBrw:lFastEdit:=.t.\n oBrw:CreateFromCode()\n \n ACTIVATE DIALOG oDlg CENTER\n\nreturn nil", "time": "14:49", "topic": "Changing the edit picture on the same col (xbrowse)", "username": "Marco Turco" } ]
Changing the edit picture on the same col (xbrowse)
[ { "date": "2009-05-08", "forum": "FiveWin for Harbour/xHarbour", "text": "Please try this revised sample\n[code=fw:1s3fosz9]<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;\">\"xbrowse.ch\"</span><br /><br /><span style=\"color: #00C800;\">function</span> Main<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #00C800;\">local</span> oDlg, oBrw, aArray<br /><span style=\"color: #00C800;\">local</span> nLastCell<br /><br />* set century off<br />set epoch <span style=\"color: #0000ff;\">to</span> <span style=\"color: #000000;\">1920</span><br /><br />aArray:=<span style=\"color: #000000;\">&#123;</span><span style=\"color: #000000;\">&#125;</span><br />aadd<span style=\"color: #000000;\">&#40;</span>aArray,<span style=\"color: #000000;\">&#123;</span><span style=\"color: #ff0000;\">\"Marc\"</span>,<span style=\"color: #000000;\">1.2</span><span style=\"color: #000000;\">&#125;</span><span style=\"color: #000000;\">&#41;</span><br />aadd<span style=\"color: #000000;\">&#40;</span>aArray,<span style=\"color: #000000;\">&#123;</span><span style=\"color: #ff0000;\">\"Luca\"</span>,<span style=\"color: #000000;\">6.5</span><span style=\"color: #000000;\">&#125;</span><span style=\"color: #000000;\">&#41;</span><br />aadd<span style=\"color: #000000;\">&#40;</span>aArray,<span style=\"color: #000000;\">&#123;</span><span style=\"color: #ff0000;\">\"James\"</span>,<span style=\"color: #000000;\">11.3</span><span style=\"color: #000000;\">&#125;</span><span style=\"color: #000000;\">&#41;</span><br />aadd<span style=\"color: #000000;\">&#40;</span>aArray,<span style=\"color: #000000;\">&#123;</span><span style=\"color: #ff0000;\">\"Christine\"</span>,<span style=\"color: #000000;\">1.3</span><span style=\"color: #000000;\">&#125;</span><span style=\"color: #000000;\">&#41;</span><br />aadd<span style=\"color: #000000;\">&#40;</span>aArray,<span style=\"color: #000000;\">&#123;</span><span style=\"color: #ff0000;\">\"Melanie\"</span>,<span style=\"color: #000000;\">15.3</span><span style=\"color: #000000;\">&#125;</span><span style=\"color: #000000;\">&#41;</span><br />aadd<span style=\"color: #000000;\">&#40;</span>aArray,<span style=\"color: #000000;\">&#123;</span><span style=\"color: #ff0000;\">\"Robert\"</span>,<span style=\"color: #000000;\">14.3</span><span style=\"color: #000000;\">&#125;</span><span style=\"color: #000000;\">&#41;</span><br />aadd<span style=\"color: #000000;\">&#40;</span>aArray,<span style=\"color: #000000;\">&#123;</span><span style=\"color: #ff0000;\">\"Jimmy\"</span>,<span style=\"color: #000000;\">13.3</span><span style=\"color: #000000;\">&#125;</span><span style=\"color: #000000;\">&#41;</span><br />aadd<span style=\"color: #000000;\">&#40;</span>aArray,<span style=\"color: #000000;\">&#123;</span><span style=\"color: #ff0000;\">\"Enrico\"</span>,<span style=\"color: #000000;\">10.3</span><span style=\"color: #000000;\">&#125;</span><span style=\"color: #000000;\">&#41;</span><br />aadd<span style=\"color: #000000;\">&#40;</span>aArray,<span style=\"color: #000000;\">&#123;</span><span style=\"color: #ff0000;\">\"Mario\"</span>,<span style=\"color: #000000;\">12.3</span><span style=\"color: #000000;\">&#125;</span><span style=\"color: #000000;\">&#41;</span><br />aadd<span style=\"color: #000000;\">&#40;</span>aArray,<span style=\"color: #000000;\">&#123;</span><span style=\"color: #ff0000;\">\"Pinco\"</span>,<span style=\"color: #000000;\">13.3</span><span style=\"color: #000000;\">&#125;</span><span style=\"color: #000000;\">&#41;</span><br />aadd<span style=\"color: #000000;\">&#40;</span>aArray,<span style=\"color: #000000;\">&#123;</span><span style=\"color: #ff0000;\">\"Eric\"</span>,<span style=\"color: #000000;\">14.3</span><span style=\"color: #000000;\">&#125;</span><span style=\"color: #000000;\">&#41;</span><br /><br /><br />XbrNumFormat<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">'E'</span>, .t. <span style=\"color: #000000;\">&#41;</span>   <span style=\"color: #B900B9;\">// Set numbers to European format</span><br /><br /><span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDlg <span style=\"color: #0000ff;\">SIZE</span> <span style=\"color: #000000;\">300</span>, <span style=\"color: #000000;\">200</span><br /><br />@<span style=\"color: #000000;\">0</span>,<span style=\"color: #000000;\">0</span> <span style=\"color: #0000ff;\">XBROWSE</span> oBrw <span style=\"color: #0000ff;\">OF</span> oDlg ARRAY aArray <span style=\"color: #0000ff;\">AUTOCOLS</span> ;<br /><br /><br />oBrw:<span style=\"color: #000000;\">aCols</span><span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">2</span><span style=\"color: #000000;\">&#93;</span>:<span style=\"color: #000000;\">cEditPicture</span> := <span style=\"color: #ff0000;\">\"999.9\"</span><br />oBrw:<span style=\"color: #000000;\">aCols</span><span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">2</span><span style=\"color: #000000;\">&#93;</span>:<span style=\"color: #000000;\">nEditType</span> := <span style=\"color: #000000;\">1</span><br />oBrw:<span style=\"color: #000000;\">aCols</span><span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">2</span><span style=\"color: #000000;\">&#93;</span>:<span style=\"color: #000000;\">bOnPostEdit</span> := <span style=\"color: #000000;\">&#123;</span>|o,x| nLastCell:=oBrw:<span style=\"color: #000000;\">nArrayAt</span>,aArray<span style=\"color: #000000;\">&#91;</span>oBrw:<span style=\"color: #000000;\">nArrayAt</span>,<span style=\"color: #000000;\">2</span><span style=\"color: #000000;\">&#93;</span>:=x<span style=\"color: #000000;\">&#125;</span><br /><br />oBrw:<span style=\"color: #000000;\">aCols</span><span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">2</span><span style=\"color: #000000;\">&#93;</span>:<span style=\"color: #000000;\">bEditValue</span> := <span style=\"color: #000000;\">&#123;</span> || oBrw:<span style=\"color: #000000;\">aRow</span><span style=\"color: #000000;\">&#91;</span> <span style=\"color: #000000;\">2</span><span style=\"color: #000000;\">&#93;</span> <span style=\"color: #000000;\">&#125;</span><br />oBrw:<span style=\"color: #000000;\">aCols</span><span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">2</span><span style=\"color: #000000;\">&#93;</span>:<span style=\"color: #000000;\">bStrData</span> := ;<br />   <span style=\"color: #000000;\">&#123;</span> || cValToStr<span style=\"color: #000000;\">&#40;</span> oBrw:<span style=\"color: #000000;\">aRow</span><span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">2</span><span style=\"color: #000000;\">&#93;</span>, <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> oBrw:<span style=\"color: #000000;\">nArrayAt</span> == <span style=\"color: #000000;\">1</span>, ;<br />        <span style=\"color: #ff0000;\">'999.9'</span>, <span style=\"color: #ff0000;\">'999.99'</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span><br /><br /><br />oBrw:<span style=\"color: #000000;\">lFastEdit</span>:=.t.<br />oBrw:<span style=\"color: #000000;\">bPastEof</span>  := <span style=\"color: #000000;\">&#123;</span> || <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> ATail<span style=\"color: #000000;\">&#40;</span> aArray <span style=\"color: #000000;\">&#41;</span><span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">2</span><span style=\"color: #000000;\">&#93;</span> != <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">&#40;</span>AAdd<span style=\"color: #000000;\">&#40;</span> aArray, <span style=\"color: #000000;\">&#123;</span> <span style=\"color: #ff0000;\">'New'</span>, <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">&#125;</span> <span style=\"color: #000000;\">&#41;</span>, oBrw:<span style=\"color: #0000ff;\">Refresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span><br />oBrw:<span style=\"color: #000000;\">CreateFromCode</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />oBrw:<span style=\"color: #000000;\">bChange</span> := <span style=\"color: #000000;\">&#123;</span> | oBrw | oBrw:<span style=\"color: #000000;\">aCols</span><span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">2</span><span style=\"color: #000000;\">&#93;</span>:<span style=\"color: #000000;\">cEditPicture</span> := <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> oBrw:<span style=\"color: #000000;\">nArrayAt</span> == <span style=\"color: #000000;\">1</span>, ;<br />                           <span style=\"color: #ff0000;\">'999.9'</span>, <span style=\"color: #ff0000;\">'999.99'</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span><br /><br /><span style=\"color: #0000ff;\">ACTIVATE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDlg <span style=\"color: #0000ff;\">CENTER</span><br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">nil</span><br /> </div>[/code:1s3fosz9]", "time": "00:01", "topic": "Changing the edit picture on the same col (xbrowse)", "username": "nageswaragunupudi" } ]
Changing the edit picture on the same col (xbrowse)
[ { "date": "2009-05-08", "forum": "FiveWin for Harbour/xHarbour", "text": "Hi,\nthe numeric cells are diplayed well\nbut I need to make the same with the edit picture also.\n\nSomething like this:\noBrw:aCols[2]:bEditPicture := ;\n { || cValToStr( oBrw:aRow[2], If( oBrw:nArrayAt == 1, ;\n '999.9', '999.99' ) ) }\n\nBut the bEditPicture doesn't exist.\nIs there a codeblock that can we use to make this ?\n\nThanks in advance.", "time": "07:59", "topic": "Changing the edit picture on the same col (xbrowse)", "username": "Marco Turco" } ]
Changing the edit picture on the same col (xbrowse)
[ { "date": "2009-05-08", "forum": "FiveWin for Harbour/xHarbour", "text": "I am sorry. I made a mistake in copying the code. I now edited it.\nWe can change the edit picture through bChange\nhere is the right code\n[code=fw:1f9ulxew]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\">oBrw:<span style=\"color: #000000;\">bChange</span> := <span style=\"color: #000000;\">&#123;</span> | oBrw | oBrw:<span style=\"color: #000000;\">aCols</span><span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">2</span><span style=\"color: #000000;\">&#93;</span>:<span style=\"color: #000000;\">cEditPicture</span> := <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> oBrw:<span style=\"color: #000000;\">nArrayAt</span> == <span style=\"color: #000000;\">1</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #ff0000;\">'999.9'</span>, <span style=\"color: #ff0000;\">'999.99'</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span><br />&nbsp;</div>[/code:1f9ulxew]\nPlease compile the ( now edited ) source in my previous post and see both display and edit picture are working properly.\nAt of now XBrowse does not support code block for edit picture, but we can achieve what you want as in the example above.", "time": "12:20", "topic": "Changing the edit picture on the same col (xbrowse)", "username": "nageswaragunupudi" } ]
Changing the edit picture on the same col (xbrowse)
[ { "date": "2009-05-08", "forum": "FiveWin for Harbour/xHarbour", "text": "It runs fine. Thank you very much for your support.", "time": "18:18", "topic": "Changing the edit picture on the same col (xbrowse)", "username": "Marco Turco" } ]
Changing the edit picture on the same col (xbrowse)
[ { "date": "2018-07-30", "forum": "FiveWin for Harbour/xHarbour", "text": "I am usings execute command to run the scripts as below.\nWhen I run my program a file named comp.log is created in the current directory.\nIs it possible to change it. I want it to be created in another directory (for example in my documents folder)\nThanks in advance.\n\n[code=fw:1ojgyvzo]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"FiveWin.ch\"</span><br /><br /><span style=\"color: #00C800;\">function</span> Main<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><span style=\"color: #00C800;\">local</span> cPrg, cError, cResult<br /><br />   cPrg := <span style=\"color: #ff0000;\">'function Test(x,y) '</span> + CHR<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">13</span><span style=\"color: #000000;\">&#41;</span>+CHR<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">10</span><span style=\"color: #000000;\">&#41;</span><br />   cPrg += <span style=\"color: #ff0000;\">'local z '</span>            + CHR<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">13</span><span style=\"color: #000000;\">&#41;</span>+CHR<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">10</span><span style=\"color: #000000;\">&#41;</span><br />   cPrg += <span style=\"color: #ff0000;\">'   z := x * y - 2 '</span>  + CHR<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">13</span><span style=\"color: #000000;\">&#41;</span>+CHR<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">10</span><span style=\"color: #000000;\">&#41;</span><br />   cPrg += <span style=\"color: #ff0000;\">'return z '</span>           + CHR<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">13</span><span style=\"color: #000000;\">&#41;</span>+CHR<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">10</span><span style=\"color: #000000;\">&#41;</span><br /><br />   cResult := Execute<span style=\"color: #000000;\">&#40;</span>cPrg, <span style=\"color: #000000;\">10</span>, <span style=\"color: #000000;\">5</span><span style=\"color: #000000;\">&#41;</span><br />   cError  := MemoRead<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"comp.log\"</span> <span style=\"color: #000000;\">&#41;</span><br />   <br />   <span style=\"color: #00C800;\">If</span> Empty<span style=\"color: #000000;\">&#40;</span>cError<span style=\"color: #000000;\">&#41;</span><br />      <span style=\"color: #0000ff;\">MsgInfo</span><span style=\"color: #000000;\">&#40;</span> cResult <span style=\"color: #000000;\">&#41;</span><br />   <span style=\"color: #00C800;\">else</span><br />      <span style=\"color: #0000ff;\">MsgInfo</span><span style=\"color: #000000;\">&#40;</span> cError <span style=\"color: #000000;\">&#41;</span><br />   <span style=\"color: #00C800;\">endif</span><br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">nil</span></div>[/code:1ojgyvzo]", "time": "14:37", "topic": "Changing the place of \"comp.log\" file in scripts.", "username": "betoncu" } ]
Changing the place of "comp.log" file in scripts.
[ { "date": "2018-07-31", "forum": "FiveWin for Harbour/xHarbour", "text": "Birol,\n\nIn FWH\\source\\function\\harbour.prg in function Execute() please comment out this line:\n\n// FReOpen_Stderr ( \"comp.log\", \"w\" )\n\nand modify this one:\n\noHrb = HB_CompileFromBuf( cCode, [b:1gojh2gf].T.[/b:1gojh2gf], \"-n\", \"-I\" + cFWheaders, \"-I\" + cHBheaders )\n\nthese fixes will be included in the next FWH version", "time": "17:19", "topic": "Changing the place of \"comp.log\" file in scripts.", "username": "Antonio Linares" } ]
Changing the place of "comp.log" file in scripts.
[ { "date": "2018-08-04", "forum": "FiveWin for Harbour/xHarbour", "text": "Thanks master. It has gone. Not created in the current directory.\nBut where is it now? It will not be created? Or it has gone to somewhere else?", "time": "14:42", "topic": "Changing the place of \"comp.log\" file in scripts.", "username": "betoncu" } ]
Changing the place of "comp.log" file in scripts.
[ { "date": "2018-08-06", "forum": "FiveWin for Harbour/xHarbour", "text": "It will not be created\n\nIn case that there is an error, a runtime error will be generated", "time": "17:47", "topic": "Changing the place of \"comp.log\" file in scripts.", "username": "Antonio Linares" } ]
Changing the place of "comp.log" file in scripts.
[ { "date": "2011-05-07", "forum": "FiveWin for Harbour/xHarbour", "text": "Any ideas ?\nI tried with oTitle:SetText(\"New text\") without success.\n\nThanks in advance.", "time": "13:48", "topic": "Changing the tTitle text at runtime", "username": "Marco Turco" } ]
Changing the tTitle text at runtime
[ { "date": "2011-05-07", "forum": "FiveWin for Harbour/xHarbour", "text": "Hi Marco,\n\nCan you try it oTitle:aText[3] := \"New Text\"", "time": "14:02", "topic": "Changing the tTitle text at runtime", "username": "Horizon" } ]
Changing the tTitle text at runtime
[ { "date": "2011-05-07", "forum": "FiveWin for Harbour/xHarbour", "text": "Marco,\n\nin File : \\samples\\testtitl.prg change / add these lines for a Test :\n\n[color=#FF0000:3rnzb241]Local oText1[/color:3rnzb241]\n...\n...\n// Title 1 Horizontal ( top )\n@ 015,150 TITLE oTitle1 size 460, 60 of oWnd SHADOW TOPRIGHT \noTitle1:aGrdBack = { { 1, nRGB( 129, 130, 138 ), nRGB( 59, 60, 62 ) } }\noTitle1:nShadowIntensity = 70\n@ 10, 10 TITLETEXT [color=#FF0000:3rnzb241]oText1[/color:3rnzb241] OF oTitle1 TEXT [color=#0000FF:3rnzb241]\"FIVEWIN 9.07\"[/color:3rnzb241] FONT oFont1 BRUSH oBrush1\n...\n...\n//Title 5 Horizontal( Down )\n@ 480, 150 TITLE oTitle5 size 460, 60 of oWnd SHADOW BOTTOMLEFT SHADOWSIZE 2\n@ 5, 10 TITLEIMG OF oTitle5 BITMAP \"../bitmaps\\32X32\\keys.bmp\" SIZE 30, 30 REFLEX TRANSPARENT ANIMA\n@ 20, 60 TITLETEXT OF oTitle5 TEXT \"<== Move over me\" COLOR CLR_BLACK \n@ 14, 220 TITLETEXT OF oTitle5 TEXT \"FIVEWIN 9.07\" COLOR CLR_BLACK FONT oFont2 3d\n@ 5, 400 TITLEIMG OF oTitle5 BITMAP \"../bitmaps\\fivetech.bmp\" SIZE 30, 30 REFLEX ;\nACTION [color=#FF0000:3rnzb241]oText1:SetText[/color:3rnzb241]( [color=#0000FF:3rnzb241]\"New text\"[/color:3rnzb241] )\n\nBest Regards\nUwe <!-- s:lol: --><img src=\"{SMILIES_PATH}/icon_lol.gif\" alt=\":lol:\" title=\"Laughing\" /><!-- s:lol: -->", "time": "14:33", "topic": "Changing the tTitle text at runtime", "username": "ukoenig" } ]
Changing the tTitle text at runtime
[ { "date": "2011-05-07", "forum": "FiveWin for Harbour/xHarbour", "text": "Hi Uwe,\nyour last sample runs well but is there a solution to change the text directly from oTitle1 ?", "time": "15:56", "topic": "Changing the tTitle text at runtime", "username": "Marco Turco" } ]
Changing the tTitle text at runtime
[ { "date": "2011-05-07", "forum": "FiveWin for Harbour/xHarbour", "text": "Marco,\n\nit works the same, also from inside the same Title\n\nLOCAL oText1, [color=#FF0000:3pnoi593]oText2[/color:3pnoi593]\n\n//Title 5 Horizontal( Down )\n@ 480, 150 TITLE oTitle5 size 460, 60 of oWnd SHADOW BOTTOMLEFT SHADOWSIZE 2\n\n@ 5, 10 TITLEIMG OF oTitle5 BITMAP \"../bitmaps\\32X32\\keys.bmp\" SIZE 30, 30 REFLEX TRANSPARENT ANIMA ;\nACTION [color=#FF0000:3pnoi593]oText2[/color:3pnoi593]:SetText([color=#0000FF:3pnoi593] \"<== Text changed\"[/color:3pnoi593] )\n\n@ 20, 60 TITLETEXT [color=#FF0000:3pnoi593]oText2[/color:3pnoi593] OF oTitle5 TEXT [color=#0000FF:3pnoi593]\"<== Move over me\"[/color:3pnoi593] COLOR CLR_BLACK \n@ 14, 220 TITLETEXT OF oTitle5 TEXT \"FIVEWIN 9.07\" COLOR CLR_BLACK FONT oFont2 3d\n@ 5, 400 TITLEIMG OF oTitle5 BITMAP \"../bitmaps\\fivetech.bmp\" SIZE 30, 30 REFLEX ;\nACTION oText1:SetText(\"New text\")\n\nBest Regards\nUwe <!-- s:lol: --><img src=\"{SMILIES_PATH}/icon_lol.gif\" alt=\":lol:\" title=\"Laughing\" /><!-- s:lol: -->", "time": "16:18", "topic": "Changing the tTitle text at runtime", "username": "ukoenig" } ]
Changing the tTitle text at runtime
[ { "date": "2011-05-07", "forum": "FiveWin for Harbour/xHarbour", "text": "I mean something like oTitle1:xcontrol:settext(\"new text\").", "time": "16:21", "topic": "Changing the tTitle text at runtime", "username": "Marco Turco" } ]
Changing the tTitle text at runtime
[ { "date": "2011-05-07", "forum": "FiveWin for Harbour/xHarbour", "text": "Hello Marco,\n\nYou don't need to define the Title, only the Textobject.\nThis button ( on Mainwindow ) changes the Text defined in Title 1.\n\n// Style 2007\n// -------------\n@ 580, 300 BTNBMP oBtn1 OF oWnd ;\nSIZE 200, 80 ;\nPROMPT \"&Change Text\" 2007 ; \nFONT oFont2 CENTER ;\nACTION oText1:SetText(\"FIVEWIN 9.10\")\n\nThere could be another Combination :\nA window with Titles, a Dialog and from inside the Dialog changing a Title-text of a Window-title.\n\n...\n...\nACTIVATE WINDOW OWND MAXIMIZED ;\nON INIT TEST_DLG( oWnd, [color=#FF0000:il99shk4]oText1[/color:il99shk4] )\n...\n...\nFUNCTION TEST_DLG( oWnd, [color=#FF0000:il99shk4]oText1[/color:il99shk4] )\nLOCAL oDlg\nDEFINE DIALOG oDlg FROM 10, 10 TO 20, 45 OF oWnd ;\nTITLE \"Change Title-text\" STYLE nOr( WS_VISIBLE, WS_OVERLAPPEDWINDOW )\n@ 2, 2 BUTTON \"&Change Title-text\" ACTION [color=#FF0000:il99shk4]oText1[/color:il99shk4]:SetText( [color=#0000FF:il99shk4]\"FIVEWIN 9.10\"[/color:il99shk4] )\nACTIVATE DIALOG oDlg CENTERED\nRETURN( NIL )\n\nBest Regards\nUwe <!-- s:lol: --><img src=\"{SMILIES_PATH}/icon_lol.gif\" alt=\":lol:\" title=\"Laughing\" /><!-- s:lol: -->", "time": "17:13", "topic": "Changing the tTitle text at runtime", "username": "ukoenig" } ]
Changing the tTitle text at runtime
[ { "date": "2011-05-07", "forum": "FiveWin for Harbour/xHarbour", "text": "I know. The problem is that I manage all my app windows thorough a routine that return me only the object related to the tTitle object, not the tTitleText of tTitle object. It is for this reason that I can't use directly the tTitletext object and I need to find a solution through the tTitle object.", "time": "17:43", "topic": "Changing the tTitle text at runtime", "username": "Marco Turco" } ]
Changing the tTitle text at runtime
[ { "date": "2017-06-15", "forum": "FiveWin for Harbour/xHarbour", "text": "Hello,\n\nI wanted to change the textcolor of RADIOS and CHECKBOXES at runtime.\nIt only works on SAY\n\n[color=#0000FF:lowxjvo8]FUNCTION OBJ_UPDATE( oFld2, nTextColor, nBackColor )\n\n// FOLDER\n\nAEval( oFld2:aDialogs[ 2 ]:aControls, { |o| IF( o:ClassName == \"TSAY\", o:SetColor( nTextColor, nBackColor ), NIL ), ; // works !!!\n IF( o:ClassName == \"TRADIO\", o:nClrText := nTextColor, NIL ), ;\n IF( o:ClassName == \"TCHECKBOX\", o:SetColor( nTextColor, nBackColor ), NIL ), ;\n\t\t\t\t\t\t o:Refresh() } )\n\n// DIALOG\n\nAEval( oDlgMain:aControls, { |o| IF( o:ClassName == \"TSAY\", o:SetColor( nTextColor, nBackColor ), NIL ), ; // works !!!\n IF( o:ClassName == \"TRADIO\", o:nClrText := nTextColor, NIL ), ;\n IF( o:ClassName == \"TCHECKBOX\", o:SetColor( nTextColor, nBackColor ), NIL ), ;\n\t\t\t\t\t\to:Refresh() } )\n\nRETURN( NIL )[/color:lowxjvo8]\n\n[b:lowxjvo8]Test on DIALOG and FOLDER[/b:lowxjvo8]\n\n[img:lowxjvo8]http&#58;//www&#46;pflegeplus&#46;com/IMAGES/Samples20&#46;jpg[/img:lowxjvo8]\n\n[b:lowxjvo8]is it possible ( colorchange on button-action ) ?[/b:lowxjvo8]\n\n[b:lowxjvo8]The complete test[/b:lowxjvo8]\nIf You want to include it in the sample-collector\nplease delete this line in < SAMPLES.prg > function\n \n// -------- FOLDER - Backgrounds ---------------\nFUNCTION F_BACKGRD( oFld, lTransp ) \n...\n...\n// there is a fixed textcolor defined\n[b:lowxjvo8]AEval( oDlg:aControls, { |o| IF( o:ClassName == \"TSAY\", ( o:SetColor( 0, 13885951 ), o:Refresh() ), NIL ) } )[/b:lowxjvo8]\n\n[b:lowxjvo8]add to < CODE_2.prg > function < GRPC2_SEC2( oFld2, nSavePage ) >\ndelete the < NO SAMPLE > message[/b:lowxjvo8]\n\n[code=fw:lowxjvo8]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #B900B9;\">// ----------------------- GROUP 2 Page 2 -------------------------------------</span><br /><br /><span style=\"color: #00C800;\">FUNCTION</span> GRPC2_SEC2<span style=\"color: #000000;\">&#40;</span> oFld2, nSavePage <span style=\"color: #000000;\">&#41;</span><br /><span style=\"color: #00C800;\">LOCAL</span> oSay<span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">4</span><span style=\"color: #000000;\">&#93;</span>, nTextColor := <span style=\"color: #000000;\">255</span>, nBackColor := <span style=\"color: #000000;\">3926784</span>, oBtn1, oBtn2<br /><span style=\"color: #00C800;\">LOCAL</span> oRadio1, oRadio2, nRadio := <span style=\"color: #000000;\">1</span>, oCheck1, oCheck2, lCheck := .F.<br /><br /><span style=\"color: #B900B9;\">//MsgAlert( \"Folder-page 2 with GRADIENT\", \"Attention\" )</span><br /><br />@ <span style=\"color: #000000;\">15</span>, <span style=\"color: #000000;\">30</span> <span style=\"color: #0000ff;\">SAY</span> oSay<span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">1</span><span style=\"color: #000000;\">&#93;</span> <span style=\"color: #0000ff;\">PROMPT</span> <span style=\"color: #ff0000;\">\" SAY - colortest \"</span> <span style=\"color: #0000ff;\">SIZE</span> <span style=\"color: #000000;\">240</span>, <span style=\"color: #000000;\">30</span> <span style=\"color: #0000ff;\">FONT</span> oLarge <span style=\"color: #0000ff;\">OF</span> oFld2:<span style=\"color: #000000;\">aDialogs</span><span style=\"color: #000000;\">&#91;</span> <span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">&#93;</span> <span style=\"color: #0000ff;\">PIXEL</span>  <br />oSay<span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">1</span><span style=\"color: #000000;\">&#93;</span>:<span style=\"color: #000000;\">SetColor</span><span style=\"color: #000000;\">&#40;</span> nTextColor, nBackColor <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #B900B9;\">// Red text on Green</span><br /><br />@ <span style=\"color: #000000;\">55</span>, <span style=\"color: #000000;\">30</span> <span style=\"color: #0000ff;\">SAY</span> oSay<span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">2</span><span style=\"color: #000000;\">&#93;</span> <span style=\"color: #0000ff;\">PROMPT</span> <span style=\"color: #ff0000;\">\" SAY - transp.test \"</span> <span style=\"color: #0000ff;\">SIZE</span> <span style=\"color: #000000;\">250</span>, <span style=\"color: #000000;\">30</span> <span style=\"color: #0000ff;\">FONT</span> oLarge <span style=\"color: #0000ff;\">OF</span> oFld2:<span style=\"color: #000000;\">aDialogs</span><span style=\"color: #000000;\">&#91;</span> <span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">&#93;</span> ;<br /><span style=\"color: #0000ff;\">PIXEL</span> TRANSPARENT  <br />oSay<span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">2</span><span style=\"color: #000000;\">&#93;</span>:<span style=\"color: #000000;\">SetColor</span><span style=\"color: #000000;\">&#40;</span> nTextColor, <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #B900B9;\">// Red text</span><br /><br />@ <span style=\"color: #000000;\">100</span>, <span style=\"color: #000000;\">30</span>  <span style=\"color: #0000ff;\">RADIO</span> oRadio1 <span style=\"color: #0000ff;\">VAR</span> nRadio <span style=\"color: #0000ff;\">ITEMS</span> <span style=\"color: #ff0000;\">\"&One\"</span>, <span style=\"color: #ff0000;\">\"&Two\"</span>, <span style=\"color: #ff0000;\">\"T&hree\"</span> _3D <span style=\"color: #0000ff;\">SIZE</span> <span style=\"color: #000000;\">50</span>, <span style=\"color: #000000;\">12</span> ;<br />HELPID <span style=\"color: #000000;\">100</span>, <span style=\"color: #000000;\">101</span>, <span style=\"color: #000000;\">102</span> <span style=\"color: #0000ff;\">OF</span> oFld2:<span style=\"color: #000000;\">aDialogs</span><span style=\"color: #000000;\">&#91;</span> <span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">&#93;</span> <span style=\"color: #0000ff;\">PIXEL</span> <span style=\"color: #0000ff;\">UPDATE</span>    <br />AEval<span style=\"color: #000000;\">&#40;</span> oRadio1:<span style=\"color: #000000;\">aItems</span>, <span style=\"color: #000000;\">&#123;</span> | oRad | oRad:<span style=\"color: #000000;\">lTransparent</span> := .T., ;<br />                              oRad:<span style=\"color: #000000;\">SetFont</span> <span style=\"color: #000000;\">&#40;</span> oMedium <span style=\"color: #000000;\">&#41;</span>, ;<br />                          oRad:<span style=\"color: #000000;\">nClrText</span> := nTextColor <span style=\"color: #000000;\">&#125;</span> <span style=\"color: #000000;\">&#41;</span><br /><br />@ <span style=\"color: #000000;\">100</span>, <span style=\"color: #000000;\">100</span> <span style=\"color: #0000ff;\">CHECKBOX</span> oCheck1 <span style=\"color: #0000ff;\">VAR</span> lCheck <span style=\"color: #0000ff;\">PROMPT</span> <span style=\"color: #ff0000;\">\" Checkbox\"</span> <span style=\"color: #0000ff;\">SIZE</span> <span style=\"color: #000000;\">70</span>, <span style=\"color: #000000;\">9</span> <span style=\"color: #0000ff;\">OF</span> oFld2:<span style=\"color: #000000;\">aDialogs</span><span style=\"color: #000000;\">&#91;</span> <span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">&#93;</span> <span style=\"color: #0000ff;\">FONT</span> oMedium <span style=\"color: #0000ff;\">PIXEL</span>  <br />oCheck1:<span style=\"color: #000000;\">SetColor</span><span style=\"color: #000000;\">&#40;</span> nTextColor, <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #B900B9;\">// Red text</span><br />oCheck1:<span style=\"color: #000000;\">lTransparent</span> := .T.<br /><br /><span style=\"color: #B900B9;\">// ------------- The DIALOG-area -------------</span><br /><br />@ <span style=\"color: #000000;\">440</span>, <span style=\"color: #000000;\">80</span> <span style=\"color: #0000ff;\">SAY</span> oSay<span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">3</span><span style=\"color: #000000;\">&#93;</span> <span style=\"color: #0000ff;\">PROMPT</span> <span style=\"color: #ff0000;\">\" SAY - colortest \"</span> <span style=\"color: #0000ff;\">SIZE</span> <span style=\"color: #000000;\">470</span>, <span style=\"color: #000000;\">60</span> <span style=\"color: #0000ff;\">FONT</span> oLarge <span style=\"color: #0000ff;\">OF</span> oDlgMain <span style=\"color: #0000ff;\">PIXEL</span>  <br />oSay<span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">3</span><span style=\"color: #000000;\">&#93;</span>:<span style=\"color: #000000;\">SetColor</span><span style=\"color: #000000;\">&#40;</span> nTextColor, nBackColor <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #B900B9;\">// Red text on Green</span><br /><br />@ <span style=\"color: #000000;\">520</span>, <span style=\"color: #000000;\">80</span> <span style=\"color: #0000ff;\">SAY</span> oSay<span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">4</span><span style=\"color: #000000;\">&#93;</span> <span style=\"color: #0000ff;\">PROMPT</span> <span style=\"color: #ff0000;\">\" SAY - transp.test \"</span> <span style=\"color: #0000ff;\">SIZE</span> <span style=\"color: #000000;\">480</span>, <span style=\"color: #000000;\">60</span> <span style=\"color: #0000ff;\">FONT</span> oLarge <span style=\"color: #0000ff;\">OF</span> oDlgMain ;<br /><span style=\"color: #0000ff;\">PIXEL</span> TRANSPARENT  <br />oSay<span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">4</span><span style=\"color: #000000;\">&#93;</span>:<span style=\"color: #000000;\">SetColor</span><span style=\"color: #000000;\">&#40;</span> nTextColor, <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #B900B9;\">// Red text</span><br /><br />@ <span style=\"color: #000000;\">590</span>, <span style=\"color: #000000;\">80</span>  <span style=\"color: #0000ff;\">RADIO</span> oRadio2 <span style=\"color: #0000ff;\">VAR</span> nRadio <span style=\"color: #0000ff;\">ITEMS</span> <span style=\"color: #ff0000;\">\"&One\"</span>, <span style=\"color: #ff0000;\">\"&Two\"</span>, <span style=\"color: #ff0000;\">\"T&hree\"</span> _3D <span style=\"color: #0000ff;\">SIZE</span> <span style=\"color: #000000;\">70</span>, <span style=\"color: #000000;\">25</span> ;<br />HELPID <span style=\"color: #000000;\">100</span>, <span style=\"color: #000000;\">101</span>, <span style=\"color: #000000;\">102</span> <span style=\"color: #0000ff;\">OF</span> oDlgMain <span style=\"color: #0000ff;\">PIXEL</span> <span style=\"color: #0000ff;\">UPDATE</span>    <br />AEval<span style=\"color: #000000;\">&#40;</span> oRadio2:<span style=\"color: #000000;\">aItems</span>, <span style=\"color: #000000;\">&#123;</span> | oRad | oRad:<span style=\"color: #000000;\">lTransparent</span> := .T., ;<br />                              oRad:<span style=\"color: #000000;\">SetFont</span> <span style=\"color: #000000;\">&#40;</span> oMedium <span style=\"color: #000000;\">&#41;</span>, ;<br />                          oRad:<span style=\"color: #000000;\">nClrText</span> := nTextColor <span style=\"color: #000000;\">&#125;</span> <span style=\"color: #000000;\">&#41;</span><br /><br />@ <span style=\"color: #000000;\">595</span>, <span style=\"color: #000000;\">210</span> <span style=\"color: #0000ff;\">CHECKBOX</span> oCheck2 <span style=\"color: #0000ff;\">VAR</span> lCheck <span style=\"color: #0000ff;\">PROMPT</span> <span style=\"color: #ff0000;\">\" Checkbox\"</span> <span style=\"color: #0000ff;\">SIZE</span> <span style=\"color: #000000;\">120</span>, <span style=\"color: #000000;\">12</span> <span style=\"color: #0000ff;\">OF</span> oDlgMain <span style=\"color: #0000ff;\">FONT</span> oMedium <span style=\"color: #0000ff;\">PIXEL</span>  <br />oCheck2:<span style=\"color: #000000;\">SetColor</span><span style=\"color: #000000;\">&#40;</span> nTextColor, <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #B900B9;\">// Red text</span><br />oCheck2:<span style=\"color: #000000;\">lTransparent</span> := .T.<br /><br /><span style=\"color: #B900B9;\">// -------------</span><br /><br />@ <span style=\"color: #000000;\">450</span>, <span style=\"color: #000000;\">670</span> <span style=\"color: #0000ff;\">BTNBMP</span> oBtn1 <span style=\"color: #0000ff;\">OF</span> oDlgMain ;<br /><span style=\"color: #0000ff;\">SIZE</span> <span style=\"color: #000000;\">120</span>, <span style=\"color: #000000;\">40</span> <span style=\"color: #0000ff;\">PIXEL</span> <span style=\"color: #000000;\">2007</span> ; <br />NOBORDER ;<br /><span style=\"color: #0000ff;\">PROMPT</span> <span style=\"color: #ff0000;\">\" &Text \"</span> ;<br />FILENAME c_Path1 + <span style=\"color: #ff0000;\">\"PAINT.bmp\"</span> ;<br /><span style=\"color: #0000ff;\">ACTION</span> <span style=\"color: #000000;\">&#40;</span> nTextColor := ChooseColor<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, ;<br />                OBJ_UPDATE<span style=\"color: #000000;\">&#40;</span> oFld2, nTextColor, nBackColor <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span> ;<br /><span style=\"color: #0000ff;\">FONT</span> oSFont  ;<br /><span style=\"color: #0000ff;\">LEFT</span><br /><br />@ <span style=\"color: #000000;\">520</span>, <span style=\"color: #000000;\">670</span> <span style=\"color: #0000ff;\">BTNBMP</span> oBtn2 <span style=\"color: #0000ff;\">OF</span> oDlgMain ;<br /><span style=\"color: #0000ff;\">SIZE</span> <span style=\"color: #000000;\">120</span>, <span style=\"color: #000000;\">40</span> <span style=\"color: #0000ff;\">PIXEL</span> <span style=\"color: #000000;\">2007</span> ; <br />NOBORDER ;<br /><span style=\"color: #0000ff;\">PROMPT</span> <span style=\"color: #ff0000;\">\" &Backgrd. \"</span> ;<br />FILENAME c_Path1 + <span style=\"color: #ff0000;\">\"PAINT.bmp\"</span> ;<br /><span style=\"color: #0000ff;\">ACTION</span> <span style=\"color: #000000;\">&#40;</span> nBackColor := ChooseColor<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, ;<br />               OBJ_UPDATE<span style=\"color: #000000;\">&#40;</span> oFld2, nTextColor, nBackColor <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span> ;<br /><span style=\"color: #0000ff;\">FONT</span> oSFont  ;<br /><span style=\"color: #0000ff;\">LEFT</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> OBJ_UPDATE<span style=\"color: #000000;\">&#40;</span> oFld2, nTextColor, nBackColor <span style=\"color: #000000;\">&#41;</span><br /><br />AEval<span style=\"color: #000000;\">&#40;</span> oFld2:<span style=\"color: #000000;\">aDialogs</span><span style=\"color: #000000;\">&#91;</span> <span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">&#93;</span>:<span style=\"color: #000000;\">aControls</span>, <span style=\"color: #000000;\">&#123;</span> |o| <span style=\"color: #00C800;\">IF</span><span style=\"color: #000000;\">&#40;</span> o:<span style=\"color: #000000;\">ClassName</span> == <span style=\"color: #ff0000;\">\"TSAY\"</span>, o:<span style=\"color: #000000;\">SetColor</span><span style=\"color: #000000;\">&#40;</span> nTextColor, nBackColor <span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #00C800;\">NIL</span> <span style=\"color: #000000;\">&#41;</span>, ;<br />                                                              <span style=\"color: #00C800;\">IF</span><span style=\"color: #000000;\">&#40;</span> o:<span style=\"color: #000000;\">ClassName</span> == <span style=\"color: #ff0000;\">\"TRADIO\"</span>, o:<span style=\"color: #000000;\">nClrText</span> := nTextColor, <span style=\"color: #00C800;\">NIL</span> <span style=\"color: #000000;\">&#41;</span>, ;<br />                                                              <span style=\"color: #00C800;\">IF</span><span style=\"color: #000000;\">&#40;</span> o:<span style=\"color: #000000;\">ClassName</span> == <span style=\"color: #ff0000;\">\"TCHECKBOX\"</span>, o:<span style=\"color: #000000;\">SetColor</span><span style=\"color: #000000;\">&#40;</span> nTextColor, nBackColor <span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #00C800;\">NIL</span> <span style=\"color: #000000;\">&#41;</span>, ;<br />                                      o:<span style=\"color: #0000ff;\">Refresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span> <span style=\"color: #000000;\">&#41;</span><br /><br />AEval<span style=\"color: #000000;\">&#40;</span> oDlgMain:<span style=\"color: #000000;\">aControls</span>, <span style=\"color: #000000;\">&#123;</span> |o| <span style=\"color: #00C800;\">IF</span><span style=\"color: #000000;\">&#40;</span> o:<span style=\"color: #000000;\">ClassName</span> == <span style=\"color: #ff0000;\">\"TSAY\"</span>, o:<span style=\"color: #000000;\">SetColor</span><span style=\"color: #000000;\">&#40;</span> nTextColor, nBackColor <span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #00C800;\">NIL</span> <span style=\"color: #000000;\">&#41;</span>, ;<br />                                                <span style=\"color: #00C800;\">IF</span><span style=\"color: #000000;\">&#40;</span> o:<span style=\"color: #000000;\">ClassName</span> == <span style=\"color: #ff0000;\">\"TRADIO\"</span>, o:<span style=\"color: #000000;\">nClrText</span> := nTextColor, <span style=\"color: #00C800;\">NIL</span> <span style=\"color: #000000;\">&#41;</span>, ;<br />                                                <span style=\"color: #00C800;\">IF</span><span style=\"color: #000000;\">&#40;</span> o:<span style=\"color: #000000;\">ClassName</span> == <span style=\"color: #ff0000;\">\"TCHECKBOX\"</span>, o:<span style=\"color: #000000;\">SetColor</span><span style=\"color: #000000;\">&#40;</span> nTextColor, nBackColor <span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #00C800;\">NIL</span> <span style=\"color: #000000;\">&#41;</span>, ;<br />                        o:<span style=\"color: #0000ff;\">Refresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span> <span style=\"color: #000000;\">&#41;</span><br />SYSREFRESH<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #00C800;\">RETURN</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #00C800;\">NIL</span> <span style=\"color: #000000;\">&#41;</span><br /> </div>[/code:lowxjvo8]\n\nregards\nUwe <!-- s:?: --><img src=\"{SMILIES_PATH}/icon_question.gif\" alt=\":?:\" title=\"Question\" /><!-- s:?: -->", "time": "17:17", "topic": "Changing the textcolor of RADIOS and CHECKB. at runtime ?", "username": "ukoenig" } ]
Changing the textcolor of RADIOS and CHECKB. at runtime ?
[ { "date": "2017-06-15", "forum": "FiveWin for Harbour/xHarbour", "text": "Uwe\n\nI use a separate field for check boxes and radio buttons .. just shorten the text to show control and create a text box to go along side .. that way ON CHANGE I can modify the text.\n\nMay not be very elegant, but it works.\n\nRick Lipkin", "time": "19:57", "topic": "Changing the textcolor of RADIOS and CHECKB. at runtime ?", "username": "Rick Lipkin" } ]
Changing the textcolor of RADIOS and CHECKB. at runtime ?
[ { "date": "2017-06-16", "forum": "FiveWin for Harbour/xHarbour", "text": "Rick,\n\nI got it working changing the colors of [color=#0000FF:1y84wvgm]RADIOS and CHECKBOXES [/color:1y84wvgm]as well with these changes :\n\n// ---------------\n\nFUNCTION OBJ_UPDATE( oFld2, nTextColor, nBackColor )\n\n// ---FOLDER ---\n\nAEval( oFld2:aDialogs[ 2 ]:aControls, { |o| IF( o:ClassName == \"TSAY\", ( o:SetColor( nTextColor, nBackColor ), o:Refresh() ), NIL ), ;\n IF( o:ClassName == \"TRADIO\", ( o:nClrText := nTextColor, o:Refresh() ), NIL ), ;\n IF( o:ClassName == \"TCHECKBOX\", ( o:SetColor( nTextColor, nBackColor ), o:Refresh() ), NIL ) } ) \n\n// --- DIALOG ---\n\nAEval( oDlgMain:aControls, { |o| IF( o:ClassName == \"TSAY\", ( o:SetColor( nTextColor, nBackColor ), o:Refresh() ), NIL ), ;\n IF( o:ClassName == \"TRADIO\", ( o:nClrText := nTextColor, o:Refresh() ), NIL ), ;\n IF( o:ClassName == \"TCHECKBOX\", ( o:SetColor( nTextColor, nBackColor ), o:Refresh() ), NIL ) } ) \n\n[size=150:1y84wvgm]Why needed ??? there is already a < o:Refresh() > that works with SAY[/size:1y84wvgm]\n\n[color=#0000FF:1y84wvgm][b:1y84wvgm]oDlgMain:Refresh()\noFld2:aDialogs[ 2 ]:Refresh()[/b:1y84wvgm][/color:1y84wvgm]\n\nRETURN( NIL )\n\n// --------------\n\n[img:1y84wvgm]http&#58;//www&#46;pflegeplus&#46;com/IMAGES/Samples21&#46;jpg[/img:1y84wvgm]\n\nregards\nUwe <!-- s:?: --><img src=\"{SMILIES_PATH}/icon_question.gif\" alt=\":?:\" title=\"Question\" /><!-- s:?: -->", "time": "11:05", "topic": "Changing the textcolor of RADIOS and CHECKB. at runtime ?", "username": "ukoenig" } ]
Changing the textcolor of RADIOS and CHECKB. at runtime ?
[ { "date": "2011-06-04", "forum": "FiveWin for Harbour/xHarbour", "text": "Hi.\nI'm making some tests on the Acer Iconia tablet.\nIf I display a window and a dialog when the tablet if in landscape mode everything is perfect. \nBut when I rotate it I want to change the width and height according to the new size of the display area . \nIs it possible to make it ? I've tried on the PAINT event but is not working.\nThanks a lot.\nMassimo.", "time": "10:05", "topic": "Changing with and height of a window and a dialog", "username": "Massimo Linossi" } ]
Changing with and height of a window and a dialog
[ { "date": "2011-06-05", "forum": "FiveWin for Harbour/xHarbour", "text": "Massimo,\n\nYou can do:\n\noWnd:nWidth = ...\noWnd:nHeight = ...\n\nsame for oDlg or any oControl", "time": "04:51", "topic": "Changing with and height of a window and a dialog", "username": "Antonio Linares" } ]
Changing with and height of a window and a dialog
[ { "date": "2011-06-05", "forum": "FiveWin for Harbour/xHarbour", "text": "Hi Antonio.\nMy problem is to recognize the rotating of the device. The original window is 1280 X 800 and when you rotate\nthe Iconia the window will be 800 X 1200. Is it possible to know when the device is changing the orientation ?\nThanks a lot.\nMassimo.", "time": "04:59", "topic": "Changing with and height of a window and a dialog", "username": "Massimo Linossi" } ]
Changing with and height of a window and a dialog
[ { "date": "2011-06-05", "forum": "FiveWin for Harbour/xHarbour", "text": "Massimo.\n\nPlease run this test in your tablet and review events.log to find what msgs you get when you rotate the screen:\n[code=fw:1ei5quu5]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"FiveWin.ch\"</span><br /><br /><span style=\"color: #00C800;\">function</span> Main<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> oWnd := TMyWindow<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;oWnd:<span style=\"color: #0000ff;\">Activate</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">nil</span><br /><br /><span style=\"color: #00C800;\">CLASS</span> TMyWindow <span style=\"color: #0000ff;\">FROM</span> TWindow<br /><br />&nbsp; &nbsp;CLASSDATA lRegistered<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">METHOD</span> HandleEvent<span style=\"color: #000000;\">&#40;</span> nMsg, nWParam, nLParam <span style=\"color: #000000;\">&#41;</span> <br /><br /><span style=\"color: #00C800;\">ENDCLASS</span><br /><br /><span style=\"color: #00C800;\">METHOD</span> HandleEvent<span style=\"color: #000000;\">&#40;</span> nMsg, nWParam, nLParam <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #00C800;\">CLASS</span> TMyWindow<br /><br />&nbsp; &nbsp;LogFile<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"events.log\"</span>, <span style=\"color: #000000;\">&#123;</span> nMsg, nWParam, nLParam <span style=\"color: #000000;\">&#125;</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp;<br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">Super</span>:<span style=\"color: #000000;\">HandleEvent</span><span style=\"color: #000000;\">&#40;</span> nMsg, nWParam, nLParam <span style=\"color: #000000;\">&#41;</span><br />&nbsp;</div>[/code:1ei5quu5]", "time": "05:14", "topic": "Changing with and height of a window and a dialog", "username": "Antonio Linares" } ]
Changing with and height of a window and a dialog
[ { "date": "2011-06-05", "forum": "FiveWin for Harbour/xHarbour", "text": "Hi Antonio.\nThis is the events.log\n\n06/05/11 06:23:21: 49\t0\t0\t\n06/05/11 06:23:21: 24\t1\t0\t\n06/05/11 06:23:21: 70\t0\t1244328\t\n06/05/11 06:23:21: 70\t0\t1244328\t\n06/05/11 06:23:21: 28\t1\t5300\t\n06/05/11 06:23:21: 134\t1\t0\t\n06/05/11 06:23:21: 13\t520\t1240680\t\n06/05/11 06:23:21: 127\t2\t0\t\n06/05/11 06:23:21: 127\t0\t0\t\n06/05/11 06:23:21: 127\t1\t0\t\n06/05/11 06:23:21: 6\t1\t0\t\n06/05/11 06:23:21: 61\t-1\t-4\t\n06/05/11 06:23:21: 61\t0\t-12\t\n06/05/11 06:23:21: 7\t0\t0\t\n06/05/11 06:23:21: 133\t1\t0\t\n06/05/11 06:23:21: 13\t520\t1240684\t\n06/05/11 06:23:21: 20\t1778454738\t0\t\n06/05/11 06:23:21: 71\t0\t1244328\t\n06/05/11 06:23:21: 13\t520\t1241180\t\n06/05/11 06:23:21: 5\t0\t15598089\t\n06/05/11 06:23:21: 3\t0\t4653084\t\n06/05/11 06:23:21: 15\t0\t0\t\n06/05/11 06:23:21: 799\t1\t0\t\n06/05/11 06:23:21: 132\t0\t11993576\t\n06/05/11 06:23:21: 32\t394516\t33554433\t\n06/05/11 06:23:21: 512\t0\t7340492\t\n06/05/11 06:23:22: 127\t1\t0\t\n06/05/11 06:23:22: 127\t2\t0\t\n06/05/11 06:23:22: 127\t0\t0\t\n06/05/11 06:23:22: 49365\t0\t0\t\n06/05/11 06:23:22: 132\t0\t11993576\t\n06/05/11 06:23:22: 32\t394516\t33554433\t\n06/05/11 06:23:22: 512\t0\t7340492\t\n06/05/11 06:23:24: 49693\t16777216\t0\t\n06/05/11 06:23:24: 49467\t0\t0\t\n06/05/11 06:23:26: 49693\t16777216\t270\t\n06/05/11 06:23:26: 49467\t0\t0\t\n06/05/11 06:23:27: 70\t0\t1244204\t\n06/05/11 06:23:27: 36\t0\t1243288\t\n06/05/11 06:23:27: 71\t0\t1244204\t\n06/05/11 06:23:27: 3\t0\t5898263\t\n06/05/11 06:23:27: 13\t520\t1241056\t\n06/05/11 06:23:27: 136\t32\t0\t\n06/05/11 06:23:27: 133\t1\t0\t\n06/05/11 06:23:27: 13\t520\t1239680\t\n06/05/11 06:23:27: 20\t-2097081783\t0\t\n06/05/11 06:23:27: 256\t233\t1\t\n06/05/11 06:23:28: 15\t0\t0\t\n06/05/11 06:23:28: 126\t32\t83886880\t\n06/05/11 06:23:28: 15\t0\t0\t\n06/05/11 06:23:28: 133\t1\t0\t\n06/05/11 06:23:28: 13\t520\t1239268\t\n06/05/11 06:23:28: 20\t1778454738\t0\t\n06/05/11 06:23:28: 136\t4\t0\t\n06/05/11 06:23:29: 26\t24\t1244224\t\n06/05/11 06:23:31: 49693\t16777216\t0\t\n06/05/11 06:23:31: 134\t0\t0\t\n06/05/11 06:23:31: 13\t520\t1240556\t\n06/05/11 06:23:31: 6\t0\t0\t\n06/05/11 06:23:31: 28\t0\t3668\t\n06/05/11 06:23:31: 8\t0\t0\t\n06/05/11 06:23:31: 49467\t0\t0\t\n06/05/11 06:23:31: 70\t0\t1244204\t\n06/05/11 06:23:31: 71\t0\t1244204\t\n06/05/11 06:23:31: 13\t520\t1241056\t\n06/05/11 06:23:31: 28\t1\t3668\t\n06/05/11 06:23:33: 134\t1\t0\t\n06/05/11 06:23:33: 13\t520\t1240556\t\n06/05/11 06:23:33: 6\t1\t0\t\n06/05/11 06:23:33: 7\t0\t0\t\n06/05/11 06:23:33: 70\t0\t1244204\t\n06/05/11 06:23:33: 36\t0\t1243288\t\n06/05/11 06:23:33: 133\t1\t0\t\n06/05/11 06:23:33: 13\t520\t1240560\t\n06/05/11 06:23:33: 20\t-2097081783\t0\t\n06/05/11 06:23:33: 71\t0\t1244204\t\n06/05/11 06:23:33: 3\t0\t4718622\t\n06/05/11 06:23:33: 13\t520\t1241056\t\n06/05/11 06:23:33: 136\t32\t0\t\n06/05/11 06:23:33: 15\t0\t0\t\n06/05/11 06:23:33: 126\t32\t52430080\t\n06/05/11 06:23:34: 15\t0\t0\t\n06/05/11 06:23:34: 133\t1\t0\t\n06/05/11 06:23:34: 13\t520\t1239268\t\n06/05/11 06:23:34: 20\t1778454738\t0\t\n06/05/11 06:23:34: 134\t0\t0\t\n06/05/11 06:23:34: 13\t520\t1240556\t\n06/05/11 06:23:34: 6\t0\t0\t\n06/05/11 06:23:34: 28\t0\t3668\t\n06/05/11 06:23:34: 8\t0\t0\t\n06/05/11 06:23:34: 70\t0\t1244204\t\n06/05/11 06:23:34: 71\t0\t1244204\t\n06/05/11 06:23:34: 13\t520\t1241056\t\n06/05/11 06:23:34: 28\t1\t3668\t\n06/05/11 06:23:34: 134\t0\t0\t\n06/05/11 06:23:34: 13\t520\t1240556\t\n06/05/11 06:23:34: 6\t1\t0\t\n06/05/11 06:23:34: 7\t0\t0\t\n06/05/11 06:23:34: 134\t0\t0\t\n06/05/11 06:23:34: 13\t520\t1240556\t\n06/05/11 06:23:34: 6\t0\t0\t\n06/05/11 06:23:34: 28\t0\t3668\t\n06/05/11 06:23:34: 8\t0\t0\t\n06/05/11 06:23:34: 70\t0\t1244204\t\n06/05/11 06:23:34: 71\t0\t1244204\t\n06/05/11 06:23:34: 13\t520\t1241056\t\n06/05/11 06:23:34: 28\t1\t3668\t\n06/05/11 06:23:34: 134\t1\t0\t\n06/05/11 06:23:34: 13\t520\t1240556\t\n06/05/11 06:23:34: 6\t1\t0\t\n06/05/11 06:23:34: 7\t0\t0\t\n06/05/11 06:23:34: 26\t24\t1244224\t\n06/05/11 06:23:38: 716\t0\t2359809\t\n06/05/11 06:23:38: 132\t0\t2359809\t\n06/05/11 06:23:38: 283\t3\t8389797\t\n06/05/11 06:23:38: 282\t0\t1243308\t\n06/05/11 06:23:38: 32\t394516\t33554452\t\n06/05/11 06:23:38: 160\t20\t2294272\t\n06/05/11 06:23:38: 32\t394516\t33619988\t\n06/05/11 06:23:38: 161\t20\t2294272\t\n06/05/11 06:23:38: 533\t0\t0\t\n06/05/11 06:23:38: 274\t61536\t2294272\t\n06/05/11 06:23:38: 674\t0\t0\t\n06/05/11 06:23:38: 16\t0\t0\t\n06/05/11 06:23:38: 144\t0\t0\t\n06/05/11 06:23:38: 70\t0\t1243492\t\n06/05/11 06:23:38: 71\t0\t1243492\t\n06/05/11 06:23:38: 134\t0\t0\t\n06/05/11 06:23:38: 13\t520\t1239844\t\n06/05/11 06:23:38: 6\t0\t0\t\n06/05/11 06:23:38: 28\t0\t5300\t\n06/05/11 06:23:38: 8\t0\t0\t\n06/05/11 06:23:38: 2\t0\t0", "time": "05:27", "topic": "Changing with and height of a window and a dialog", "username": "Massimo Linossi" } ]
Changing with and height of a window and a dialog
[ { "date": "2011-06-05", "forum": "FiveWin for Harbour/xHarbour", "text": "Massimo,\n\nPlease rotate the tablet 10 times and then copy here the events.log again, thanks <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->", "time": "07:14", "topic": "Changing with and height of a window and a dialog", "username": "Antonio Linares" } ]
Changing with and height of a window and a dialog
[ { "date": "2011-06-05", "forum": "FiveWin for Harbour/xHarbour", "text": "Here it is.\nI have another question. When I display a dialog from a resource, is it possible to close this dialog and display another one\nwhen the tablet is rotated ? I want to try to make different dialogs according to the resized display area.\nThanks a lot.\nMassimo.\n\n06/05/11 08:21:16: 49\t0\t0\t\n06/05/11 08:21:16: 24\t1\t0\t\n06/05/11 08:21:16: 70\t0\t1244328\t\n06/05/11 08:21:16: 70\t0\t1244328\t\n06/05/11 08:21:16: 28\t1\t3488\t\n06/05/11 08:21:16: 134\t1\t0\t\n06/05/11 08:21:16: 13\t520\t1240680\t\n06/05/11 08:21:16: 127\t2\t0\t\n06/05/11 08:21:16: 127\t0\t0\t\n06/05/11 08:21:16: 127\t1\t0\t\n06/05/11 08:21:16: 6\t1\t0\t\n06/05/11 08:21:16: 61\t-1\t-4\t\n06/05/11 08:21:16: 61\t0\t-12\t\n06/05/11 08:21:16: 7\t0\t0\t\n06/05/11 08:21:16: 133\t1\t0\t\n06/05/11 08:21:16: 13\t520\t1240684\t\n06/05/11 08:21:16: 20\t16846678\t0\t\n06/05/11 08:21:16: 71\t0\t1244328\t\n06/05/11 08:21:16: 13\t520\t1241180\t\n06/05/11 08:21:16: 5\t0\t15598089\t\n06/05/11 08:21:16: 3\t0\t4653084\t\n06/05/11 08:21:16: 15\t0\t0\t\n06/05/11 08:21:16: 127\t1\t0\t\n06/05/11 08:21:16: 127\t2\t0\t\n06/05/11 08:21:16: 127\t0\t0\t\n06/05/11 08:21:16: 799\t1\t0\t\n06/05/11 08:21:16: 49365\t0\t0\t\n06/05/11 08:21:16: 132\t0\t12190151\t\n06/05/11 08:21:16: 32\t263340\t33554433\t\n06/05/11 08:21:16: 512\t0\t7537067\t\n06/05/11 08:21:16: 132\t0\t12190151\t\n06/05/11 08:21:16: 32\t263340\t33554433\t\n06/05/11 08:21:16: 512\t0\t7537067\t\n06/05/11 08:21:16: 132\t0\t12190151\t\n06/05/11 08:21:16: 32\t263340\t33554433\t\n06/05/11 08:21:16: 512\t0\t7537067\t\n06/05/11 08:21:21: 49713\t16777216\t270\t\n06/05/11 08:21:21: 49510\t0\t0\t\n06/05/11 08:21:22: 70\t0\t1244204\t\n06/05/11 08:21:22: 36\t0\t1243288\t\n06/05/11 08:21:22: 71\t0\t1244204\t\n06/05/11 08:21:22: 3\t0\t5898263\t\n06/05/11 08:21:22: 13\t520\t1241056\t\n06/05/11 08:21:22: 136\t32\t0\t\n06/05/11 08:21:22: 133\t1\t0\t\n06/05/11 08:21:22: 13\t520\t1239680\t\n06/05/11 08:21:22: 20\t33623066\t0\t\n06/05/11 08:21:22: 15\t0\t0\t\n06/05/11 08:21:22: 126\t32\t83886880\t\n06/05/11 08:21:23: 15\t0\t0\t\n06/05/11 08:21:23: 133\t1\t0\t\n06/05/11 08:21:23: 13\t520\t1239268\t\n06/05/11 08:21:23: 20\t16846678\t0\t\n06/05/11 08:21:23: 26\t24\t1244224\t\n06/05/11 08:21:25: 49713\t16777216\t0\t\n06/05/11 08:21:25: 49510\t0\t0\t\n06/05/11 08:21:25: 134\t0\t0\t\n06/05/11 08:21:25: 13\t520\t1240556\t\n06/05/11 08:21:25: 6\t0\t0\t\n06/05/11 08:21:25: 28\t0\t3744\t\n06/05/11 08:21:25: 8\t0\t0\t\n06/05/11 08:21:25: 70\t0\t1244204\t\n06/05/11 08:21:25: 71\t0\t1244204\t\n06/05/11 08:21:25: 13\t520\t1241056\t\n06/05/11 08:21:25: 28\t1\t3744\t\n06/05/11 08:21:25: 134\t1\t0\t\n06/05/11 08:21:25: 13\t520\t1240556\t\n06/05/11 08:21:25: 6\t1\t0\t\n06/05/11 08:21:25: 7\t0\t0\t\n06/05/11 08:21:26: 70\t0\t1244204\t\n06/05/11 08:21:26: 36\t0\t1243288\t\n06/05/11 08:21:26: 71\t0\t1244204\t\n06/05/11 08:21:26: 3\t0\t4718622\t\n06/05/11 08:21:26: 13\t520\t1241056\t\n06/05/11 08:21:26: 136\t32\t0\t\n06/05/11 08:21:26: 133\t1\t0\t\n06/05/11 08:21:26: 13\t520\t1239680\t\n06/05/11 08:21:26: 20\t33623066\t0\t\n06/05/11 08:21:26: 15\t0\t0\t\n06/05/11 08:21:27: 126\t32\t52430080\t\n06/05/11 08:21:27: 15\t0\t0\t\n06/05/11 08:21:27: 133\t1\t0\t\n06/05/11 08:21:27: 13\t520\t1239268\t\n06/05/11 08:21:27: 20\t33623066\t0\t\n06/05/11 08:21:27: 134\t0\t0\t\n06/05/11 08:21:27: 13\t520\t1240556\t\n06/05/11 08:21:27: 6\t0\t0\t\n06/05/11 08:21:27: 28\t0\t3744\t\n06/05/11 08:21:27: 8\t0\t0\t\n06/05/11 08:21:27: 70\t0\t1244204\t\n06/05/11 08:21:27: 71\t0\t1244204\t\n06/05/11 08:21:27: 13\t520\t1241056\t\n06/05/11 08:21:27: 28\t1\t3744\t\n06/05/11 08:21:27: 134\t1\t0\t\n06/05/11 08:21:27: 13\t520\t1240556\t\n06/05/11 08:21:27: 6\t1\t0\t\n06/05/11 08:21:27: 7\t0\t0\t\n06/05/11 08:21:27: 134\t0\t0\t\n06/05/11 08:21:27: 13\t520\t1240556\t\n06/05/11 08:21:27: 6\t0\t0\t\n06/05/11 08:21:27: 28\t0\t3744\t\n06/05/11 08:21:27: 8\t0\t0\t\n06/05/11 08:21:28: 26\t24\t1244224\t\n06/05/11 08:21:28: 70\t0\t1244204\t\n06/05/11 08:21:28: 71\t0\t1244204\t\n06/05/11 08:21:28: 13\t520\t1241056\t\n06/05/11 08:21:28: 28\t1\t3744\t\n06/05/11 08:21:28: 134\t1\t0\t\n06/05/11 08:21:28: 13\t520\t1240556\t\n06/05/11 08:21:28: 6\t1\t0\t\n06/05/11 08:21:28: 7\t0\t0\t\n06/05/11 08:21:30: 49713\t16777216\t270\t\n06/05/11 08:21:30: 49510\t0\t0\t\n06/05/11 08:21:31: 70\t0\t1244204\t\n06/05/11 08:21:31: 36\t0\t1243288\t\n06/05/11 08:21:31: 71\t0\t1244204\t\n06/05/11 08:21:31: 3\t0\t6029336\t\n06/05/11 08:21:31: 13\t520\t1241056\t\n06/05/11 08:21:31: 136\t32\t0\t\n06/05/11 08:21:31: 133\t1\t0\t\n06/05/11 08:21:31: 13\t520\t1239680\t\n06/05/11 08:21:31: 20\t33620049\t0\t\n06/05/11 08:21:31: 15\t0\t0\t\n06/05/11 08:21:32: 126\t32\t83886880\t\n06/05/11 08:21:32: 15\t0\t0\t\n06/05/11 08:21:32: 133\t1\t0\t\n06/05/11 08:21:32: 13\t520\t1239268\t\n06/05/11 08:21:32: 20\t33620047\t0\t\n06/05/11 08:21:32: 134\t0\t0\t\n06/05/11 08:21:32: 13\t520\t1240556\t\n06/05/11 08:21:32: 6\t0\t0\t\n06/05/11 08:21:32: 28\t0\t3744\t\n06/05/11 08:21:32: 8\t0\t0\t\n06/05/11 08:21:32: 70\t0\t1244204\t\n06/05/11 08:21:32: 71\t0\t1244204\t\n06/05/11 08:21:32: 13\t520\t1241056\t\n06/05/11 08:21:32: 28\t1\t3744\t\n06/05/11 08:21:32: 134\t0\t0\t\n06/05/11 08:21:32: 13\t520\t1240556\t\n06/05/11 08:21:32: 6\t1\t0\t\n06/05/11 08:21:32: 7\t0\t0\t\n06/05/11 08:21:32: 134\t0\t0\t\n06/05/11 08:21:32: 13\t520\t1240556\t\n06/05/11 08:21:32: 6\t0\t0\t\n06/05/11 08:21:32: 28\t0\t3744\t\n06/05/11 08:21:32: 8\t0\t0\t\n06/05/11 08:21:32: 26\t24\t1244224\t\n06/05/11 08:21:33: 70\t0\t1244204\t\n06/05/11 08:21:33: 71\t0\t1244204\t\n06/05/11 08:21:33: 13\t520\t1241056\t\n06/05/11 08:21:33: 28\t1\t3744\t\n06/05/11 08:21:33: 134\t1\t0\t\n06/05/11 08:21:33: 13\t520\t1240556\t\n06/05/11 08:21:33: 6\t1\t0\t\n06/05/11 08:21:33: 7\t0\t0\t\n06/05/11 08:21:34: 49713\t16777216\t0\t\n06/05/11 08:21:34: 49510\t0\t0\t\n06/05/11 08:21:36: 70\t0\t1244204\t\n06/05/11 08:21:36: 36\t0\t1243288\t\n06/05/11 08:21:36: 71\t0\t1244204\t\n06/05/11 08:21:36: 3\t0\t4784159\t\n06/05/11 08:21:36: 13\t520\t1241056\t\n06/05/11 08:21:36: 136\t32\t0\t\n06/05/11 08:21:36: 133\t1\t0\t\n06/05/11 08:21:36: 13\t520\t1239680\t\n06/05/11 08:21:36: 20\t318836835\t0\t\n06/05/11 08:21:36: 15\t0\t0\t\n06/05/11 08:21:36: 126\t32\t52430080\t\n06/05/11 08:21:36: 15\t0\t0\t\n06/05/11 08:21:36: 133\t1\t0\t\n06/05/11 08:21:36: 13\t520\t1239268\t\n06/05/11 08:21:36: 20\t33620047\t0\t\n06/05/11 08:21:37: 134\t0\t0\t\n06/05/11 08:21:37: 13\t520\t1240556\t\n06/05/11 08:21:37: 6\t0\t0\t\n06/05/11 08:21:37: 28\t0\t3744\t\n06/05/11 08:21:37: 8\t0\t0\t\n06/05/11 08:21:37: 70\t0\t1244204\t\n06/05/11 08:21:37: 71\t0\t1244204\t\n06/05/11 08:21:37: 13\t520\t1241056\t\n06/05/11 08:21:37: 28\t1\t3744\t\n06/05/11 08:21:37: 134\t0\t0\t\n06/05/11 08:21:37: 13\t520\t1240556\t\n06/05/11 08:21:37: 6\t1\t0\t\n06/05/11 08:21:37: 7\t0\t0\t\n06/05/11 08:21:37: 134\t0\t0\t\n06/05/11 08:21:37: 13\t520\t1240556\t\n06/05/11 08:21:37: 6\t0\t0\t\n06/05/11 08:21:37: 28\t0\t3744\t\n06/05/11 08:21:37: 8\t0\t0\t\n06/05/11 08:21:37: 70\t0\t1244204\t\n06/05/11 08:21:37: 71\t0\t1244204\t\n06/05/11 08:21:37: 13\t520\t1241056\t\n06/05/11 08:21:37: 28\t1\t3744\t\n06/05/11 08:21:37: 134\t1\t0\t\n06/05/11 08:21:37: 13\t520\t1240556\t\n06/05/11 08:21:37: 6\t1\t0\t\n06/05/11 08:21:37: 7\t0\t0\t\n06/05/11 08:21:37: 26\t24\t1244224\t\n06/05/11 08:21:38: 49713\t16777216\t270\t\n06/05/11 08:21:38: 49510\t0\t0\t\n06/05/11 08:21:40: 70\t0\t1244204\t\n06/05/11 08:21:40: 36\t0\t1243288\t\n06/05/11 08:21:40: 71\t0\t1244204\t\n06/05/11 08:21:40: 3\t0\t6094873\t\n06/05/11 08:21:40: 13\t520\t1241056\t\n06/05/11 08:21:40: 136\t32\t0\t\n06/05/11 08:21:40: 133\t1\t0\t\n06/05/11 08:21:40: 13\t520\t1239680\t\n06/05/11 08:21:40: 20\t33620030\t0\t\n06/05/11 08:21:40: 15\t0\t0\t\n06/05/11 08:21:40: 126\t32\t83886880\t\n06/05/11 08:21:40: 15\t0\t0\t\n06/05/11 08:21:40: 133\t1\t0\t\n06/05/11 08:21:40: 13\t520\t1239268\t\n06/05/11 08:21:40: 20\t33623066\t0\t\n06/05/11 08:21:41: 134\t0\t0\t\n06/05/11 08:21:41: 13\t520\t1240556\t\n06/05/11 08:21:41: 6\t0\t0\t\n06/05/11 08:21:41: 28\t0\t3744\t\n06/05/11 08:21:41: 8\t0\t0\t\n06/05/11 08:21:41: 70\t0\t1244204\t\n06/05/11 08:21:41: 71\t0\t1244204\t\n06/05/11 08:21:41: 13\t520\t1241056\t\n06/05/11 08:21:41: 28\t1\t3744\t\n06/05/11 08:21:41: 134\t0\t0\t\n06/05/11 08:21:41: 13\t520\t1240556\t\n06/05/11 08:21:41: 6\t1\t0\t\n06/05/11 08:21:41: 7\t0\t0\t\n06/05/11 08:21:41: 134\t0\t0\t\n06/05/11 08:21:41: 13\t520\t1240556\t\n06/05/11 08:21:41: 6\t0\t0\t\n06/05/11 08:21:41: 28\t0\t3744\t\n06/05/11 08:21:41: 8\t0\t0\t\n06/05/11 08:21:41: 70\t0\t1244204\t\n06/05/11 08:21:41: 71\t0\t1244204\t\n06/05/11 08:21:41: 13\t520\t1241056\t\n06/05/11 08:21:41: 28\t1\t3744\t\n06/05/11 08:21:41: 134\t1\t0\t\n06/05/11 08:21:41: 13\t520\t1240556\t\n06/05/11 08:21:41: 6\t1\t0\t\n06/05/11 08:21:41: 7\t0\t0\t\n06/05/11 08:21:41: 26\t24\t1244224\t\n06/05/11 08:21:43: 49713\t16777216\t0\t\n06/05/11 08:21:43: 49510\t0\t0\t\n06/05/11 08:21:45: 70\t0\t1244204\t\n06/05/11 08:21:45: 36\t0\t1243288\t\n06/05/11 08:21:45: 71\t0\t1244204\t\n06/05/11 08:21:45: 3\t0\t4849697\t\n06/05/11 08:21:45: 13\t520\t1241056\t\n06/05/11 08:21:45: 136\t32\t0\t\n06/05/11 08:21:45: 133\t1\t0\t\n06/05/11 08:21:45: 13\t520\t1239680\t\n06/05/11 08:21:45: 20\t33623066\t0\t\n06/05/11 08:21:45: 15\t0\t0\t\n06/05/11 08:21:45: 126\t32\t52430080\t\n06/05/11 08:21:45: 15\t0\t0\t\n06/05/11 08:21:45: 133\t1\t0\t\n06/05/11 08:21:45: 13\t520\t1239268\t\n06/05/11 08:21:45: 20\t33620032\t0\t\n06/05/11 08:21:45: 134\t0\t0\t\n06/05/11 08:21:45: 13\t520\t1240556\t\n06/05/11 08:21:45: 6\t0\t0\t\n06/05/11 08:21:45: 28\t0\t3744\t\n06/05/11 08:21:45: 8\t0\t0\t\n06/05/11 08:21:46: 70\t0\t1244204\t\n06/05/11 08:21:46: 71\t0\t1244204\t\n06/05/11 08:21:46: 13\t520\t1241056\t\n06/05/11 08:21:46: 28\t1\t3744\t\n06/05/11 08:21:46: 134\t0\t0\t\n06/05/11 08:21:46: 13\t520\t1240556\t\n06/05/11 08:21:46: 6\t1\t0\t\n06/05/11 08:21:46: 7\t0\t0\t\n06/05/11 08:21:46: 134\t0\t0\t\n06/05/11 08:21:46: 13\t520\t1240556\t\n06/05/11 08:21:46: 6\t0\t0\t\n06/05/11 08:21:46: 28\t0\t3744\t\n06/05/11 08:21:46: 8\t0\t0\t\n06/05/11 08:21:46: 26\t24\t1244224\t\n06/05/11 08:21:46: 70\t0\t1244204\t\n06/05/11 08:21:46: 71\t0\t1244204\t\n06/05/11 08:21:46: 13\t520\t1241056\t\n06/05/11 08:21:46: 28\t1\t3744\t\n06/05/11 08:21:46: 134\t1\t0\t\n06/05/11 08:21:46: 13\t520\t1240556\t\n06/05/11 08:21:46: 6\t1\t0\t\n06/05/11 08:21:46: 7\t0\t0\t\n06/05/11 08:21:48: 49713\t16777216\t270\t\n06/05/11 08:21:48: 49510\t0\t0\t\n06/05/11 08:21:49: 70\t0\t1244204\t\n06/05/11 08:21:49: 36\t0\t1243288\t\n06/05/11 08:21:49: 71\t0\t1244204\t\n06/05/11 08:21:49: 3\t0\t6225946\t\n06/05/11 08:21:49: 13\t520\t1241056\t\n06/05/11 08:21:49: 136\t32\t0\t\n06/05/11 08:21:49: 133\t1\t0\t\n06/05/11 08:21:49: 13\t520\t1239680\t\n06/05/11 08:21:49: 20\t16846678\t0\t\n06/05/11 08:21:49: 15\t0\t0\t\n06/05/11 08:21:50: 126\t32\t83886880\t\n06/05/11 08:21:50: 134\t0\t0\t\n06/05/11 08:21:50: 13\t520\t1240556\t\n06/05/11 08:21:50: 6\t0\t0\t\n06/05/11 08:21:50: 28\t0\t3744\t\n06/05/11 08:21:50: 8\t0\t0\t\n06/05/11 08:21:50: 70\t0\t1244204\t\n06/05/11 08:21:50: 71\t0\t1244204\t\n06/05/11 08:21:50: 13\t520\t1241056\t\n06/05/11 08:21:50: 28\t1\t3744\t\n06/05/11 08:21:50: 134\t0\t0\t\n06/05/11 08:21:50: 13\t520\t1240556\t\n06/05/11 08:21:50: 6\t1\t0\t\n06/05/11 08:21:50: 7\t0\t0\t\n06/05/11 08:21:50: 134\t0\t0\t\n06/05/11 08:21:50: 13\t520\t1240556\t\n06/05/11 08:21:50: 6\t0\t0\t\n06/05/11 08:21:50: 28\t0\t3744\t\n06/05/11 08:21:50: 8\t0\t0\t\n06/05/11 08:21:50: 15\t0\t0\t\n06/05/11 08:21:50: 133\t1\t0\t\n06/05/11 08:21:50: 13\t520\t1239268\t\n06/05/11 08:21:50: 20\t16846678\t0\t\n06/05/11 08:21:50: 70\t0\t1244204\t\n06/05/11 08:21:50: 71\t0\t1244204\t\n06/05/11 08:21:50: 13\t520\t1241056\t\n06/05/11 08:21:50: 28\t1\t3744\t\n06/05/11 08:21:50: 134\t1\t0\t\n06/05/11 08:21:50: 13\t520\t1240556\t\n06/05/11 08:21:50: 6\t1\t0\t\n06/05/11 08:21:50: 7\t0\t0\t\n06/05/11 08:21:50: 26\t24\t1244224\t\n06/05/11 08:21:52: 49713\t16777216\t0\t\n06/05/11 08:21:52: 49510\t0\t0\t\n06/05/11 08:21:53: 70\t0\t1244204\t\n06/05/11 08:21:53: 36\t0\t1243288\t\n06/05/11 08:21:53: 71\t0\t1244204\t\n06/05/11 08:21:53: 3\t0\t4915234\t\n06/05/11 08:21:53: 13\t520\t1241056\t\n06/05/11 08:21:53: 136\t32\t0\t\n06/05/11 08:21:53: 133\t1\t0\t\n06/05/11 08:21:53: 13\t520\t1239680\t\n06/05/11 08:21:53: 20\t16846678\t0\t\n06/05/11 08:21:53: 15\t0\t0\t\n06/05/11 08:21:53: 126\t32\t52430080\t\n06/05/11 08:21:54: 15\t0\t0\t\n06/05/11 08:21:54: 133\t1\t0\t\n06/05/11 08:21:54: 13\t520\t1239268\t\n06/05/11 08:21:54: 20\t33620049\t0\t\n06/05/11 08:21:54: 134\t0\t0\t\n06/05/11 08:21:54: 13\t520\t1240556\t\n06/05/11 08:21:54: 6\t0\t0\t\n06/05/11 08:21:54: 28\t0\t3744\t\n06/05/11 08:21:54: 8\t0\t0\t\n06/05/11 08:21:54: 70\t0\t1244204\t\n06/05/11 08:21:54: 71\t0\t1244204\t\n06/05/11 08:21:54: 13\t520\t1241056\t\n06/05/11 08:21:54: 28\t1\t3744\t\n06/05/11 08:21:54: 134\t0\t0\t\n06/05/11 08:21:54: 13\t520\t1240556\t\n06/05/11 08:21:54: 6\t1\t0\t\n06/05/11 08:21:54: 7\t0\t0\t\n06/05/11 08:21:54: 134\t0\t0\t\n06/05/11 08:21:54: 13\t520\t1240556\t\n06/05/11 08:21:54: 6\t0\t0\t\n06/05/11 08:21:54: 28\t0\t3744\t\n06/05/11 08:21:54: 8\t0\t0\t\n06/05/11 08:21:54: 70\t0\t1244204\t\n06/05/11 08:21:54: 71\t0\t1244204\t\n06/05/11 08:21:54: 13\t520\t1241056\t\n06/05/11 08:21:54: 28\t1\t3744\t\n06/05/11 08:21:54: 134\t1\t0\t\n06/05/11 08:21:54: 13\t520\t1240556\t\n06/05/11 08:21:54: 6\t1\t0\t\n06/05/11 08:21:54: 7\t0\t0\t\n06/05/11 08:21:55: 26\t24\t1244224\t\n06/05/11 08:21:56: 49713\t16777216\t270\t\n06/05/11 08:21:56: 49510\t0\t0\t\n06/05/11 08:21:57: 70\t0\t1244204\t\n06/05/11 08:21:57: 36\t0\t1243288\t\n06/05/11 08:21:57: 71\t0\t1244204\t\n06/05/11 08:21:57: 3\t0\t6357019\t\n06/05/11 08:21:57: 13\t520\t1241056\t\n06/05/11 08:21:57: 136\t32\t0\t\n06/05/11 08:21:57: 133\t1\t0\t\n06/05/11 08:21:57: 13\t520\t1239680\t\n06/05/11 08:21:57: 20\t67174482\t0\t\n06/05/11 08:21:57: 15\t0\t0\t\n06/05/11 08:21:58: 126\t32\t83886880\t\n06/05/11 08:21:58: 15\t0\t0\t\n06/05/11 08:21:58: 133\t1\t0\t\n06/05/11 08:21:58: 13\t520\t1239268\t\n06/05/11 08:21:58: 20\t33620032\t0\t\n06/05/11 08:21:58: 134\t0\t0\t\n06/05/11 08:21:58: 13\t520\t1240556\t\n06/05/11 08:21:58: 6\t0\t0\t\n06/05/11 08:21:58: 28\t0\t3744\t\n06/05/11 08:21:58: 8\t0\t0\t\n06/05/11 08:21:58: 70\t0\t1244204\t\n06/05/11 08:21:58: 71\t0\t1244204\t\n06/05/11 08:21:58: 13\t520\t1241056\t\n06/05/11 08:21:58: 28\t1\t3744\t\n06/05/11 08:21:58: 134\t0\t0\t\n06/05/11 08:21:58: 13\t520\t1240556\t\n06/05/11 08:21:58: 6\t1\t0\t\n06/05/11 08:21:58: 7\t0\t0\t\n06/05/11 08:21:58: 134\t0\t0\t\n06/05/11 08:21:58: 13\t520\t1240556\t\n06/05/11 08:21:58: 6\t0\t0\t\n06/05/11 08:21:58: 28\t0\t3744\t\n06/05/11 08:21:58: 8\t0\t0\t\n06/05/11 08:21:59: 26\t24\t1244224\t\n06/05/11 08:21:59: 70\t0\t1244204\t\n06/05/11 08:21:59: 71\t0\t1244204\t\n06/05/11 08:21:59: 13\t520\t1241056\t\n06/05/11 08:21:59: 28\t1\t3744\t\n06/05/11 08:21:59: 134\t1\t0\t\n06/05/11 08:21:59: 13\t520\t1240556\t\n06/05/11 08:21:59: 6\t1\t0\t\n06/05/11 08:21:59: 7\t0\t0\t\n06/05/11 08:22:01: 49713\t16777216\t0\t\n06/05/11 08:22:01: 49510\t0\t0\t\n06/05/11 08:22:02: 70\t0\t1244204\t\n06/05/11 08:22:02: 36\t0\t1243288\t\n06/05/11 08:22:02: 71\t0\t1244204\t\n06/05/11 08:22:02: 3\t0\t4980772\t\n06/05/11 08:22:02: 13\t520\t1241056\t\n06/05/11 08:22:02: 136\t32\t0\t\n06/05/11 08:22:02: 133\t1\t0\t\n06/05/11 08:22:02: 13\t520\t1239680\t\n06/05/11 08:22:02: 20\t16846678\t0\t\n06/05/11 08:22:02: 15\t0\t0\t\n06/05/11 08:22:02: 126\t32\t52430080\t\n06/05/11 08:22:02: 15\t0\t0\t\n06/05/11 08:22:02: 133\t1\t0\t\n06/05/11 08:22:02: 13\t520\t1239268\t\n06/05/11 08:22:02: 20\t67174482\t0\t\n06/05/11 08:22:03: 134\t0\t0\t\n06/05/11 08:22:03: 13\t520\t1240556\t\n06/05/11 08:22:03: 6\t0\t0\t\n06/05/11 08:22:03: 28\t0\t3744\t\n06/05/11 08:22:03: 8\t0\t0\t\n06/05/11 08:22:03: 70\t0\t1244204\t\n06/05/11 08:22:03: 71\t0\t1244204\t\n06/05/11 08:22:03: 13\t520\t1241056\t\n06/05/11 08:22:03: 28\t1\t3744\t\n06/05/11 08:22:03: 134\t0\t0\t\n06/05/11 08:22:03: 13\t520\t1240556\t\n06/05/11 08:22:03: 6\t1\t0\t\n06/05/11 08:22:03: 7\t0\t0\t\n06/05/11 08:22:03: 134\t0\t0\t\n06/05/11 08:22:03: 13\t520\t1240556\t\n06/05/11 08:22:03: 6\t0\t0\t\n06/05/11 08:22:03: 28\t0\t3744\t\n06/05/11 08:22:03: 8\t0\t0\t\n06/05/11 08:22:03: 26\t24\t1244224\t\n06/05/11 08:22:04: 70\t0\t1244204\t\n06/05/11 08:22:04: 71\t0\t1244204\t\n06/05/11 08:22:04: 13\t520\t1241056\t\n06/05/11 08:22:04: 28\t1\t3744\t\n06/05/11 08:22:04: 134\t1\t0\t\n06/05/11 08:22:04: 13\t520\t1240556\t\n06/05/11 08:22:04: 6\t1\t0\t\n06/05/11 08:22:04: 7\t0\t0\t\n06/05/11 08:22:06: 134\t0\t0\t\n06/05/11 08:22:06: 13\t520\t1240556\t\n06/05/11 08:22:06: 6\t0\t0\t\n06/05/11 08:22:06: 28\t0\t3488\t\n06/05/11 08:22:06: 8\t0\t0\t\n06/05/11 08:22:10: 49713\t16777216\t270\t\n06/05/11 08:22:10: 49510\t0\t0\t\n06/05/11 08:22:11: 70\t0\t1244204\t\n06/05/11 08:22:11: 36\t0\t1243288\t\n06/05/11 08:22:11: 71\t0\t1244204\t\n06/05/11 08:22:11: 3\t0\t6422556\t\n06/05/11 08:22:11: 13\t520\t1241056\t\n06/05/11 08:22:11: 136\t32\t0\t\n06/05/11 08:22:11: 133\t1\t0\t\n06/05/11 08:22:11: 13\t520\t1239680\t\n06/05/11 08:22:11: 20\t33623066\t0\t\n06/05/11 08:22:11: 15\t0\t0\t\n06/05/11 08:22:11: 126\t32\t83886880\t\n06/05/11 08:22:11: 15\t0\t0\t\n06/05/11 08:22:11: 133\t1\t0\t\n06/05/11 08:22:11: 13\t520\t1239268\t\n06/05/11 08:22:11: 20\t33620030\t0\t\n06/05/11 08:22:11: 49713\t16777216\t0\t\n06/05/11 08:22:12: 49510\t0\t0\t\n06/05/11 08:22:12: 26\t24\t1244224\t\n06/05/11 08:22:14: 70\t0\t1244204\t\n06/05/11 08:22:14: 36\t0\t1243288\t\n06/05/11 08:22:14: 71\t0\t1244204\t\n06/05/11 08:22:14: 3\t0\t5046310\t\n06/05/11 08:22:14: 13\t520\t1241056\t\n06/05/11 08:22:14: 136\t32\t0\t\n06/05/11 08:22:14: 133\t1\t0\t\n06/05/11 08:22:14: 13\t520\t1239680\t\n06/05/11 08:22:14: 20\t67174482\t0\t\n06/05/11 08:22:14: 15\t0\t0\t\n06/05/11 08:22:15: 126\t32\t52430080\t\n06/05/11 08:22:15: 15\t0\t0\t\n06/05/11 08:22:15: 133\t1\t0\t\n06/05/11 08:22:15: 13\t520\t1239268\t\n06/05/11 08:22:15: 20\t33620030\t0\t\n06/05/11 08:22:15: 136\t4\t0\t\n06/05/11 08:22:15: 26\t24\t1244224\t\n06/05/11 08:22:22: 537\t7\t0\t\n06/05/11 08:22:23: 537\t7\t0\t\n06/05/11 08:22:23: 537\t7\t0\t\n06/05/11 08:22:23: 537\t32768\t1244220\t\n06/05/11 08:22:24: 537\t7\t0\t\n06/05/11 08:22:24: 537\t7\t0\t\n06/05/11 08:22:24: 537\t7\t0\t\n06/05/11 08:22:24: 537\t7\t0\t\n06/05/11 08:22:25: 537\t7\t0\t\n06/05/11 08:22:29: 136\t32\t0\t\n06/05/11 08:22:29: 133\t1\t0\t\n06/05/11 08:22:29: 13\t520\t1239680\t\n06/05/11 08:22:29: 20\t33620030\t0\t\n06/05/11 08:22:29: 15\t0\t0\t\n06/05/11 08:22:29: 49743\t0\t0\t\n06/05/11 08:22:36: 537\t7\t0\t\n06/05/11 08:22:36: 537\t7\t0", "time": "07:29", "topic": "Changing with and height of a window and a dialog", "username": "Massimo Linossi" } ]
Changing with and height of a window and a dialog
[ { "date": "2011-06-05", "forum": "FiveWin for Harbour/xHarbour", "text": "Massimo,\n\nYes, once we know which one is the rotate event then we can do what we want <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->", "time": "07:34", "topic": "Changing with and height of a window and a dialog", "username": "Antonio Linares" } ]
Changing with and height of a window and a dialog
[ { "date": "2011-06-05", "forum": "FiveWin for Harbour/xHarbour", "text": "Great.\nIs there a reference table about the numbers that the logfile function is creating ?\nI saw that there are always 3 numbers after the time but I don't know what they mean.", "time": "07:41", "topic": "Changing with and height of a window and a dialog", "username": "Massimo Linossi" } ]
Changing with and height of a window and a dialog
[ { "date": "2011-06-05", "forum": "FiveWin for Harbour/xHarbour", "text": "Massimo,\n\nThe first value is the Windows msg sent to the window, the other two values are the supplied parameters (nWParam, nLParam). The msg value has to be converted into hexadecimal and then you can look for it inside windows.h\n\nI think that 49713 value may be related to the rotate event. Please try this:\n[code=fw:444hee2b]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"FiveWin.ch\"</span><br /><br /><span style=\"color: #00C800;\">function</span> Main<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> oWnd := TMyWindow<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;oWnd:<span style=\"color: #0000ff;\">Activate</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">nil</span><br /><br /><span style=\"color: #00C800;\">CLASS</span> TMyWindow <span style=\"color: #0000ff;\">FROM</span> TWindow<br /><br />&nbsp; &nbsp;CLASSDATA lRegistered<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">METHOD</span> HandleEvent<span style=\"color: #000000;\">&#40;</span> nMsg, nWParam, nLParam <span style=\"color: #000000;\">&#41;</span> <br /><br /><span style=\"color: #00C800;\">ENDCLASS</span><br /><br /><span style=\"color: #00C800;\">METHOD</span> HandleEvent<span style=\"color: #000000;\">&#40;</span> nMsg, nWParam, nLParam <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #00C800;\">CLASS</span> TMyWindow<br /><br />&nbsp; &nbsp;LogFile<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"events.log\"</span>, <span style=\"color: #000000;\">&#123;</span> nMsg, nWParam, nLParam <span style=\"color: #000000;\">&#125;</span> <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> nMsg == <span style=\"color: #000000;\">49713</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">MsgInfo</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"rotate\"</span>, nLParam <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br />&nbsp;<br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">Super</span>:<span style=\"color: #000000;\">HandleEvent</span><span style=\"color: #000000;\">&#40;</span> nMsg, nWParam, nLParam <span style=\"color: #000000;\">&#41;</span><br />&nbsp;</div>[/code:444hee2b]", "time": "22:13", "topic": "Changing with and height of a window and a dialog", "username": "Antonio Linares" } ]
Changing with and height of a window and a dialog
[ { "date": "2011-06-06", "forum": "FiveWin for Harbour/xHarbour", "text": "Yes, it is working.\nNow I have to find a way of changing the resolution of the open window and dialog with all the controls inside.\nThanks a lot.\nMassimo.", "time": "18:07", "topic": "Changing with and height of a window and a dialog", "username": "Massimo Linossi" } ]
Changing with and height of a window and a dialog
[ { "date": "2015-11-04", "forum": "FiveWin for Harbour/xHarbour", "text": "I found that the Rotate event is 126\nI modified dialog.prg so I could do the following in my program.\noDlg:bRotate := { || msginfo( 'Rotate '+alltrim(str(ScreenWidth(),5))+'x'+alltrim(str(ScreenHeight(),5)))}\nWith windows 7 the width and height vary with rotation and whether the on screen keyboard is displayed and docked. So there could be 4 different width/height values when using Windows 7.\nWith Windows 10 the width and height vary with screen rotation but does not change when on screen keyboard is displayed so there are only 2 different values.\n\nTo test I modified dialog.prg with something like\n\n#define GF_ROTATE 126\n....\n// Added to Class\n DATA bRotate\n....\n// Added to HandleEvent\n case nMsg == GF_ROTATE\n if ValType( ::bRotate ) == \"B\"\n eval( ::bRotate )\n endif\n return ::Super:HandleEvent( nMsg, nWParam, nLParam )", "time": "16:42", "topic": "Changing with and height of a window and a dialog", "username": "Gale FORd" } ]
Changing with and height of a window and a dialog
[ { "date": "2015-11-04", "forum": "FiveWin for Harbour/xHarbour", "text": "Actually there is an event define\nWM_DISPLAYCHANGE = 126\n\nI found the information here: [url:2k6n76qz]https&#58;//msdn&#46;microsoft&#46;com/en-us/library/ms812142&#46;aspx[/url:2k6n76qz]", "time": "16:45", "topic": "Changing with and height of a window and a dialog", "username": "Gale FORd" } ]
Changing with and height of a window and a dialog
[ { "date": "2015-11-05", "forum": "FiveWin for Harbour/xHarbour", "text": "Gale,\n\nThanks! <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->", "time": "13:02", "topic": "Changing with and height of a window and a dialog", "username": "Antonio Linares" } ]
Changing with and height of a window and a dialog
[ { "date": "2015-11-05", "forum": "FiveWin for Harbour/xHarbour", "text": "Antonio,\nDoes the latest version of FW handle screen rotation? If not do you think something like ::bRotate or ::bOnRotate can be added to native Window class.\nI am working more and more with Tablets and Convertibles.", "time": "15:32", "topic": "Changing with and height of a window and a dialog", "username": "Gale FORd" } ]
Changing with and height of a window and a dialog
[ { "date": "2015-11-05", "forum": "FiveWin for Harbour/xHarbour", "text": "Gale,\n\nAs a first idea I think that we could use FWH functions ScreenWidth() and ScreenHeight() and a timer to control rotation.\n\nI am thinking how to avoid the use of the timer...", "time": "21:18", "topic": "Changing with and height of a window and a dialog", "username": "Antonio Linares" } ]
Changing with and height of a window and a dialog
[ { "date": "2015-11-05", "forum": "FiveWin for Harbour/xHarbour", "text": "Gale,\n\nCould you try this example and rotate the tablet ?\n\nPlease let me know if it beeps when you rotate it, thanks\n\n[code=fw:3nxhtysb]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"FiveWin.ch\"</span><br /><br /><span style=\"color: #00C800;\">function</span> Main<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />   <span style=\"color: #00C800;\">local</span> oWnd<br />   <br />   <span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">WINDOW</span> oWnd<br />   <br />   oWnd:<span style=\"color: #000000;\">bResized</span> = <span style=\"color: #000000;\">&#123;</span> || MsgBeep<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span> <br />    <br />   <span style=\"color: #0000ff;\">ACTIVATE</span> <span style=\"color: #0000ff;\">WINDOW</span> oWnd <span style=\"color: #0000ff;\">MAXIMIZED</span>   <br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">nil</span></div>[/code:3nxhtysb]", "time": "21:25", "topic": "Changing with and height of a window and a dialog", "username": "Antonio Linares" } ]
Changing with and height of a window and a dialog
[ { "date": "2015-11-05", "forum": "FiveWin for Harbour/xHarbour", "text": "i will try it later. just thinking about it, if you want to try it without adding to handleevent then it might be better on paint. i am not sure the dialog/window size changes unless keyboard is visible and sometimes not even then. Windows 7 keyboard undocked does not resize dialog or screen.", "time": "21:53", "topic": "Changing with and height of a window and a dialog", "username": "Gale FORd" } ]
Changing with and height of a window and a dialog
[ { "date": "2015-11-05", "forum": "FiveWin for Harbour/xHarbour", "text": "Gale,\n\nThen you may change in my example:\n\noWnd:bPainted = { || MsgBeep() }\n\nthanks", "time": "22:07", "topic": "Changing with and height of a window and a dialog", "username": "Antonio Linares" } ]
Changing with and height of a window and a dialog
[ { "date": "2015-11-06", "forum": "FiveWin for Harbour/xHarbour", "text": "bPainted does get called when you rotate display. bResized does not get called.\nI cannot get accurate screen sizes when I use bPainted. screenwidth() and screenheight() are not always correct. Maybe it has something to do with buffer/dispbegin().\nOne of the things I need to do when screen is rotated is change the dialog/window position and size. This also affects bPainted.\nIf i modify tDialog with bOnRotate and I check screenwidth() and screenheight() in bOnRotate it returns correct sizes.", "time": "23:06", "topic": "Changing with and height of a window and a dialog", "username": "Gale FORd" } ]
Changing with and height of a window and a dialog
[ { "date": "2015-11-07", "forum": "FiveWin for Harbour/xHarbour", "text": "We know we can easily ascertain Protrait / Landscape mode by comparing ScreenWidth() and ScreenHeight(). If the application window is maximized on Tablet, rotation restults in Resize event and our normal ON RESIZE can react to the change. Whether the window is maximized or not, rotation defintely generates WM_DISPLAYCHANGE message. We can respond to that message.\n\nThere is another change we need to know and respond. In Windows 10, whether on Desktop or Tablet, user can toggle between Desktop and Tablet mode. When the user switches from DeskTop to Tablet mode, normal window automatically gets maximized (generates resize event) and we may need to consider switching to Universal App look in this case and vice versa. This toggle generates WM_SETTINGCHANGE message. In response to this message, we need to ascertain whether the pc/tablet is in Desktop mode or Tablet mode. In other words, we can be in Desktop mode on a Tablet and Tablet Mode on Desktop.\n\nWe can find this from the registry entry HKEY_CURRENT_USER, \"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\ImmersiveShell\\TabletMode\". If the value is 1, then TabletMode is true. But the problem is it takes around one or two seconds for this entry to be updated after we receive the WM_SETTINGCHANGE message. So we need to query this value after a slight delay.\n\nHere is a sample program which responds to rotation and also change in desktop/tablet mode (in case of windows 10 only). Incidentally, this program also detects presence of Touch screen and Mouse.\n\n[code=fw:k1hgvuwc]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"fivewin.ch\"</span><br /><br /><span style=\"color: #00D7D7;\">#define</span> SM_TABLETPC &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #000000;\">86</span><br /><span style=\"color: #00D7D7;\">#define</span> WM_DISPLAYCHANGE &nbsp; &nbsp;0x007E<br /><span style=\"color: #00D7D7;\">#define</span> WM_SETTINGCHANGE &nbsp; &nbsp;WM_WININICHANGE<br />#ifndef SM_DIGITIZER<br /><span style=\"color: #00D7D7;\">#define</span> SM_DIGITIZER &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #000000;\">94</span><br />#endif<br /><span style=\"color: #00D7D7;\">#define</span> SM_CMOUSEBUTTONS &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #000000;\">43</span><br /><br /><span style=\"color: #00C800;\">static</span> cMsg &nbsp;:= <span style=\"color: #ff0000;\">\"\"</span><br /><span style=\"color: #00C800;\">static</span> oTimer<br /><span style=\"color: #00C800;\">static</span> cLog<br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00C800;\">function</span> Main<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> oWnd<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> oFont<br /><br />&nbsp; &nbsp;cLog &nbsp;:= cFileSetExt<span style=\"color: #000000;\">&#40;</span> ExeName<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #ff0000;\">\"log\"</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;FErase<span style=\"color: #000000;\">&#40;</span> cLog <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">FONT</span> oFont <span style=\"color: #0000ff;\">NAME</span> <span style=\"color: #ff0000;\">\"Segoe UI\"</span> <span style=\"color: #0000ff;\">SIZE</span> <span style=\"color: #000000;\">0</span>,<span style=\"color: #000000;\">-30</span><br /><br />&nbsp; &nbsp;oWnd &nbsp;:= TMyWindow<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;oWnd:<span style=\"color: #000000;\">SetColor</span><span style=\"color: #000000;\">&#40;</span> CLR_WHITE, CLR_GREEN <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;oWnd:<span style=\"color: #000000;\">bRClicked</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:= <span style=\"color: #000000;\">&#123;</span> || oWnd:<span style=\"color: #0000ff;\">Refresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span><br />&nbsp; &nbsp;oWnd:<span style=\"color: #000000;\">bOnDisplayChange</span> &nbsp; := <span style=\"color: #000000;\">&#123;</span> || oWnd:<span style=\"color: #0000ff;\">Refresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">&#125;</span><br />&nbsp; &nbsp;oWnd:<span style=\"color: #000000;\">bOnSettingChange</span> &nbsp; := <span style=\"color: #000000;\">&#123;</span> || WaitRefresh<span style=\"color: #000000;\">&#40;</span> oWnd <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #0000ff;\">ACTIVATE</span> <span style=\"color: #0000ff;\">WINDOW</span> oWnd <span style=\"color: #0000ff;\">CENTERED</span> ;<br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">ON</span> <span style=\"color: #0000ff;\">PAINT</span> oWnd:<span style=\"color: #000000;\">SayText</span><span style=\"color: #000000;\">&#40;</span> cMsg := DisplayMessage<span style=\"color: #000000;\">&#40;</span> oWnd <span style=\"color: #000000;\">&#41;</span>, , , oFont <span style=\"color: #000000;\">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">ON</span> RESIZE <span style=\"color: #000000;\">&#40;</span> oWnd:<span style=\"color: #0000ff;\">Refresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #0000ff;\">RELEASE</span> <span style=\"color: #0000ff;\">FONT</span> oFont<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> oTimer != <span style=\"color: #00C800;\">nil</span><br />&nbsp; &nbsp; &nbsp; oTimer:<span style=\"color: #000000;\">End</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> File<span style=\"color: #000000;\">&#40;</span> cLog <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; WinExec<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"notepad.exe \"</span> + cLog <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<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;\">static</span> <span style=\"color: #00C800;\">function</span> WaitRefresh<span style=\"color: #000000;\">&#40;</span> ownd <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">static</span> n := <span style=\"color: #000000;\">0</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> oTimer == <span style=\"color: #00C800;\">nil</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">TIMER</span> oTimer <span style=\"color: #0000ff;\">OF</span> oWnd <span style=\"color: #0000ff;\">INTERVAL</span> <span style=\"color: #000000;\">400</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">ACTION</span> <span style=\"color: #000000;\">&#40;</span> n++, oWnd:<span style=\"color: #0000ff;\">Refresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> n > <span style=\"color: #000000;\">4</span>, <span style=\"color: #000000;\">&#40;</span>oTimer:<span style=\"color: #000000;\">End</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, oTimer := <span style=\"color: #00C800;\">nil</span>, n := <span style=\"color: #000000;\">0</span><span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #00C800;\">nil</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">ACTIVATE</span> <span style=\"color: #0000ff;\">TIMER</span> oTimer<br />&nbsp; &nbsp;<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;\">static</span> <span style=\"color: #00C800;\">function</span> DisplayMessage<span style=\"color: #000000;\">&#40;</span> oWnd <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> lPortrait &nbsp; := ScreenWidth<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> < ScreenHeight<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> lTabletMode := IsTabletMode<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> lTouch &nbsp; &nbsp; &nbsp;:= <span style=\"color: #000000;\">&#40;</span> GetSysMetrics<span style=\"color: #000000;\">&#40;</span> SM_DIGITIZER <span style=\"color: #000000;\">&#41;</span> > <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;cMsg &nbsp;:= <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> IsWindows10<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> lTabletMode, <span style=\"color: #ff0000;\">\"TABLET MODE\"</span>, <span style=\"color: #ff0000;\">\"DESKTOP MODE\"</span> <span style=\"color: #000000;\">&#41;</span> + CRLF, <span style=\"color: #ff0000;\">\"\"</span> <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;cMsg &nbsp;+= <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> lPortrait, &nbsp; <span style=\"color: #ff0000;\">\"POTRAIT\"</span>, <span style=\"color: #ff0000;\">\"LANDSCAPE\"</span> <span style=\"color: #000000;\">&#41;</span> + CRLF + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> IsZoomed<span style=\"color: #000000;\">&#40;</span> oWnd:<span style=\"color: #000000;\">hWnd</span> <span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #ff0000;\">\"MAXIMIZED\"</span>, <span style=\"color: #ff0000;\">\"NORMAL\"</span> <span style=\"color: #000000;\">&#41;</span> + <span style=\"color: #ff0000;\">\" WINDOW\"</span> + CRLF + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> lTouch, <span style=\"color: #ff0000;\">\"\"</span>, <span style=\"color: #ff0000;\">\"NO \"</span> <span style=\"color: #000000;\">&#41;</span> + <span style=\"color: #ff0000;\">\"TOUCH INPUT\"</span> + CRLF + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #ff0000;\">\"MOUSE\"</span> + <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> GetSysMetrics<span style=\"color: #000000;\">&#40;</span> SM_CMOUSEBUTTONS <span style=\"color: #000000;\">&#41;</span> > <span style=\"color: #000000;\">0</span>, <span style=\"color: #ff0000;\">\"\"</span>, <span style=\"color: #ff0000;\">\" NOT\"</span> <span style=\"color: #000000;\">&#41;</span> + <span style=\"color: #ff0000;\">\" PRESENT\"</span><br /><br /><span style=\"color: #00C800;\">return</span> cMsg<br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00C800;\">CLASS</span> TMyWindow <span style=\"color: #0000ff;\">FROM</span> TWindow<br /><br />&nbsp; &nbsp;CLASSDATA lRegistered<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DATA</span> bOnDisplayChange<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DATA</span> bOnSettingChange<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">METHOD</span> HandleEvent<span style=\"color: #000000;\">&#40;</span> nMsg, nWParam, nLParam <span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #00C800;\">ENDCLASS</span><br /><br /><span style=\"color: #00C800;\">METHOD</span> HandleEvent<span style=\"color: #000000;\">&#40;</span> nMsg, nWParam, nLParam <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #00C800;\">CLASS</span> TMyWindow<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">do</span> <span style=\"color: #00C800;\">case</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">case</span> nMsg == WM_DISPLAYCHANGE<br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">if</span> ValType<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">bOnDisplayChange</span> <span style=\"color: #000000;\">&#41;</span> == <span style=\"color: #ff0000;\">'B'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #00C800;\">return</span> Eval<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">bOnDisplayChange</span>, <span style=\"color: #00C800;\">Self</span>, nWParam, nLParam <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">case</span> IsWindows10<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> .and. nMsg == WM_SETTINGCHANGE<br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">if</span> ValType<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">bOnSettingChange</span> <span style=\"color: #000000;\">&#41;</span> == <span style=\"color: #ff0000;\">'B'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #00C800;\">return</span> Eval<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">bOnSettingChange</span>, <span style=\"color: #00C800;\">Self</span>, nWParam, nLParam <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endcase</span><br /><br /><span style=\"color: #00C800;\">return</span> ::<span style=\"color: #00C800;\">Super</span>:<span style=\"color: #000000;\">HandleEvent</span><span style=\"color: #000000;\">&#40;</span> nMsg, nWParam, nLParam <span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br />&nbsp;</div>[/code:k1hgvuwc]\n\nTested on Windows 10 Desktops (touch and without touch screen) and Windows 10 Tablet.\n\n[url=https&#58;//imageshack&#46;com/i/pbymqlMKj:k1hgvuwc][img:k1hgvuwc]http&#58;//imagizer&#46;imageshack&#46;us/v2/xq90/911/ymqlMK&#46;jpg[/img:k1hgvuwc][/url:k1hgvuwc]", "time": "06:58", "topic": "Changing with and height of a window and a dialog", "username": "nageswaragunupudi" } ]
Changing with and height of a window and a dialog
[ { "date": "2015-11-08", "forum": "FiveWin for Harbour/xHarbour", "text": "Is the function IsTabletMode() in later vesrion of FWH?", "time": "04:07", "topic": "Changing with and height of a window and a dialog", "username": "Gale FORd" } ]
Changing with and height of a window and a dialog
[ { "date": "2015-11-08", "forum": "FiveWin for Harbour/xHarbour", "text": "[quote=\"Gale FORd\":21xtto1b]Is the function IsTabletMode() in later vesrion of FWH?[/quote:21xtto1b]\nYes.\nThis is the source code:\n[code=fw:21xtto1b]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #00C800;\">function</span> IsTabletMode<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> oReg, lTabletMode := .f.<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> IsWindows10<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; oReg:= TReg32<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">&#40;</span> HKEY_CURRENT_USER, <span style=\"color: #ff0000;\">\"SOFTWARE<span style=\"color: #000000;\">\\M</span>icrosoft<span style=\"color: #000000;\">\\W</span>indows<span style=\"color: #000000;\">\\C</span>urrentVersion<span style=\"color: #000000;\">\\I</span>mmersiveShell\"</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; lTabletMode := <span style=\"color: #000000;\">&#40;</span> oReg:<span style=\"color: #0000ff;\">Get</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"TabletMode\"</span>, <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">&#41;</span> > <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><br /><span style=\"color: #00C800;\">return</span> lTabletMode<br />&nbsp;</div>[/code:21xtto1b]", "time": "04:10", "topic": "Changing with and height of a window and a dialog", "username": "nageswaragunupudi" } ]
Changing with and height of a window and a dialog
[ { "date": "2015-11-09", "forum": "FiveWin for Harbour/xHarbour", "text": "Thank you for your help.\nI still have some small issue. One of the reasons I need this is to change the dialog size and re-position some controls. Without a timer in bOnDisplayChange the ScreenWidth() and ScreenHeight() are not always correct if the on-screen keyboard is displayed.\nIf the on-screen keyboard is not displayed then it seems to work ok.\nI modified your code and added lUseWait and some resize code. If you left click mouse or touch with finger it swaps lUseWait.\nWith lUseWait = .T. the ScreenWidh() and ScreenHeight() works correctly. With lUseWait = .f. it is not always correct with on-screen keyboard visible .\nI am using a Panasonic Toughpad FZ-G1 with Windows 7 and a Microsoft Surface Pro 3 with Windows 10.\n\n[code=fw:cvrwr2zl]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"fivewin.ch\"</span><br /><br /><span style=\"color: #00D7D7;\">#define</span> SM_TABLETPC &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #000000;\">86</span><br /><span style=\"color: #00D7D7;\">#define</span> WM_DISPLAYCHANGE &nbsp; &nbsp;0x007E<br /><span style=\"color: #00D7D7;\">#define</span> WM_SETTINGCHANGE &nbsp; &nbsp;WM_WININICHANGE<br />#ifndef SM_DIGITIZER<br /><span style=\"color: #00D7D7;\">#define</span> SM_DIGITIZER &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #000000;\">94</span><br />#endif<br /><span style=\"color: #00D7D7;\">#define</span> SM_CMOUSEBUTTONS &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #000000;\">43</span><br /><br /><span style=\"color: #00C800;\">static</span> cMsg &nbsp;:= <span style=\"color: #ff0000;\">\"\"</span><br /><span style=\"color: #00C800;\">static</span> oTimer<br /><span style=\"color: #00C800;\">static</span> cLog<br /><span style=\"color: #00C800;\">static</span> lUseWait<br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00C800;\">function</span> Main<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> oWnd<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> oFont<br /><br />&nbsp; &nbsp;lUseWait := .t.<br /><br />&nbsp; &nbsp;cLog &nbsp;:= cFileSetExt<span style=\"color: #000000;\">&#40;</span> ExeName<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #ff0000;\">\"log\"</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;FErase<span style=\"color: #000000;\">&#40;</span> cLog <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">FONT</span> oFont <span style=\"color: #0000ff;\">NAME</span> <span style=\"color: #ff0000;\">\"Segoe UI\"</span> <span style=\"color: #0000ff;\">SIZE</span> <span style=\"color: #000000;\">0</span>,<span style=\"color: #000000;\">-30</span><br /><br />&nbsp; &nbsp;oWnd &nbsp;:= TMyWindow<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;oWnd:<span style=\"color: #000000;\">SetColor</span><span style=\"color: #000000;\">&#40;</span> CLR_WHITE, CLR_GREEN <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;oWnd:<span style=\"color: #000000;\">bRClicked</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:= <span style=\"color: #000000;\">&#123;</span> || oWnd:<span style=\"color: #0000ff;\">Refresh</span> <span style=\"color: #000000;\">&#125;</span><br />&nbsp; &nbsp;oWnd:<span style=\"color: #000000;\">blClicked</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:= <span style=\"color: #000000;\">&#123;</span> || <span style=\"color: #000000;\">&#40;</span> lUseWait := !luseWait, oWnd:<span style=\"color: #0000ff;\">Refresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span><br />&nbsp; &nbsp;oWnd:<span style=\"color: #000000;\">bOnDisplayChange</span> &nbsp; := <span style=\"color: #000000;\">&#123;</span> || WaitReSize<span style=\"color: #000000;\">&#40;</span> oWnd, <span style=\"color: #ff0000;\">'DispChange'</span> <span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">&#125;</span><br />&nbsp; &nbsp;<span style=\"color: #B900B9;\">//oWnd:bOnDisplayChange &nbsp; := { || oWnd:Refresh(), 0 }</span><br />&nbsp; &nbsp;oWnd:<span style=\"color: #000000;\">bOnSettingChange</span> &nbsp; := <span style=\"color: #000000;\">&#123;</span> || WaitRefresh<span style=\"color: #000000;\">&#40;</span> oWnd <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #0000ff;\">ACTIVATE</span> <span style=\"color: #0000ff;\">WINDOW</span> oWnd <span style=\"color: #0000ff;\">CENTERED</span> <span style=\"color: #0000ff;\">on</span> <span style=\"color: #0000ff;\">INIT</span> WaitReSize<span style=\"color: #000000;\">&#40;</span> oWnd, <span style=\"color: #ff0000;\">'Init'</span> <span style=\"color: #000000;\">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">ON</span> <span style=\"color: #0000ff;\">PAINT</span> oWnd:<span style=\"color: #000000;\">SayText</span><span style=\"color: #000000;\">&#40;</span> cMsg := DisplayMessage<span style=\"color: #000000;\">&#40;</span> oWnd <span style=\"color: #000000;\">&#41;</span>, , , oFont <span style=\"color: #000000;\">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">ON</span> RESIZE <span style=\"color: #000000;\">&#40;</span> oWnd:<span style=\"color: #0000ff;\">Refresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #0000ff;\">RELEASE</span> <span style=\"color: #0000ff;\">FONT</span> oFont<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> oTimer != <span style=\"color: #00C800;\">nil</span><br />&nbsp; &nbsp; &nbsp; oTimer:<span style=\"color: #000000;\">End</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> File<span style=\"color: #000000;\">&#40;</span> cLog <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; WinExec<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"notepad.exe \"</span> + cLog <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<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;\">static</span> <span style=\"color: #00C800;\">function</span> WaitRefresh<span style=\"color: #000000;\">&#40;</span> ownd <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">static</span> n := <span style=\"color: #000000;\">0</span><br />&nbsp; &nbsp;TraceSize<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">'WaitRefresh'</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> oTimer == <span style=\"color: #00C800;\">nil</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">TIMER</span> oTimer <span style=\"color: #0000ff;\">OF</span> oWnd <span style=\"color: #0000ff;\">INTERVAL</span> <span style=\"color: #000000;\">400</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">ACTION</span> <span style=\"color: #000000;\">&#40;</span> n++, oWnd:<span style=\"color: #0000ff;\">Refresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> n > <span style=\"color: #000000;\">4</span>, <span style=\"color: #000000;\">&#40;</span>oTimer:<span style=\"color: #000000;\">End</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, oTimer := <span style=\"color: #00C800;\">nil</span>, n := <span style=\"color: #000000;\">0</span><span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #00C800;\">nil</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">ACTIVATE</span> <span style=\"color: #0000ff;\">TIMER</span> oTimer<br />&nbsp; &nbsp;<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: #00C800;\">static</span> <span style=\"color: #00C800;\">function</span> WaitResize<span style=\"color: #000000;\">&#40;</span> oWnd, cAction <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">static</span> n := <span style=\"color: #000000;\">0</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> lUseWait<br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">if</span> oTimer == <span style=\"color: #00C800;\">nil</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">TIMER</span> oTimer ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">INTERVAL</span> <span style=\"color: #000000;\">400</span> <span style=\"color: #0000ff;\">ACTION</span> <span style=\"color: #000000;\">&#40;</span> n++, <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">&#40;</span> n = <span style=\"color: #000000;\">1</span>, ReSize<span style=\"color: #000000;\">&#40;</span> oWnd, cAction <span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #000000;\">&#40;</span>oTimer:<span style=\"color: #000000;\">End</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, oTimer := <span style=\"color: #00C800;\">nil</span>, n := <span style=\"color: #000000;\">0</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oTimer:<span style=\"color: #0000ff;\">Activate</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">else</span><br />&nbsp; &nbsp; &nbsp; ReSize<span style=\"color: #000000;\">&#40;</span> oWnd, cAction <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">nil</span><br /><br /><span style=\"color: #00C800;\">Static</span> <span style=\"color: #00C800;\">function</span> ReSize<span style=\"color: #000000;\">&#40;</span> oWnd, cAction <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> nTop, nLeft, nWidth, nHeight<br />&nbsp; &nbsp;<span style=\"color: #B900B9;\">//sysrefresh()</span><br />&nbsp; &nbsp;TraceSize<span style=\"color: #000000;\">&#40;</span> cAction <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;nTop := <span style=\"color: #000000;\">40</span><br />&nbsp; &nbsp;nLeft := <span style=\"color: #000000;\">40</span><br />&nbsp; &nbsp;nWidth := ScreenWidth<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> - <span style=\"color: #000000;\">&#40;</span> nLeft*<span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;nHeight := ScreenHeight<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> - <span style=\"color: #000000;\">&#40;</span> nTop*<span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;oWnd:<span style=\"color: #0000ff;\">Move</span><span style=\"color: #000000;\">&#40;</span> nTop, nLeft, nWidth, nHeight <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;oWnd:<span style=\"color: #0000ff;\">Refresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">nil</span><br /><br /><span style=\"color: #00C800;\">Static</span> <span style=\"color: #00C800;\">Function</span> TraceSize<span style=\"color: #000000;\">&#40;</span> cAction <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;tracelog<span style=\"color: #000000;\">&#40;</span> cAction, lUseWait, ScreenWidth<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, ScreenHeight<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, ScreenWidth<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> < ScreenHeight<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</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> DisplayMessage<span style=\"color: #000000;\">&#40;</span> oWnd <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> lPortrait &nbsp; := ScreenWidth<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> < ScreenHeight<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> lTabletMode := IsTabletMode<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> lTouch &nbsp; &nbsp; &nbsp;:= <span style=\"color: #000000;\">&#40;</span> GetSysMetrics<span style=\"color: #000000;\">&#40;</span> SM_DIGITIZER <span style=\"color: #000000;\">&#41;</span> > <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;cMsg &nbsp;:= <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> IsWindows10<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> lTabletMode, <span style=\"color: #ff0000;\">\"TABLET MODE\"</span>, <span style=\"color: #ff0000;\">\"DESKTOP MODE\"</span> <span style=\"color: #000000;\">&#41;</span> + CRLF, <span style=\"color: #ff0000;\">\"\"</span> <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;cMsg &nbsp;+= <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> lPortrait, &nbsp; <span style=\"color: #ff0000;\">\"POTRAIT\"</span>, <span style=\"color: #ff0000;\">\"LANDSCAPE\"</span> <span style=\"color: #000000;\">&#41;</span> + CRLF + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> IsZoomed<span style=\"color: #000000;\">&#40;</span> oWnd:<span style=\"color: #000000;\">hWnd</span> <span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #ff0000;\">\"MAXIMIZED\"</span>, <span style=\"color: #ff0000;\">\"NORMAL\"</span> <span style=\"color: #000000;\">&#41;</span> + <span style=\"color: #ff0000;\">\" WINDOW\"</span> + CRLF + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> lTouch, <span style=\"color: #ff0000;\">\"\"</span>, <span style=\"color: #ff0000;\">\"NO \"</span> <span style=\"color: #000000;\">&#41;</span> + <span style=\"color: #ff0000;\">\"TOUCH INPUT\"</span> + CRLF + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #ff0000;\">\"MOUSE\"</span> + <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> GetSysMetrics<span style=\"color: #000000;\">&#40;</span> SM_CMOUSEBUTTONS <span style=\"color: #000000;\">&#41;</span> > <span style=\"color: #000000;\">0</span>, <span style=\"color: #ff0000;\">\"\"</span>, <span style=\"color: #ff0000;\">\" NOT\"</span> <span style=\"color: #000000;\">&#41;</span> + <span style=\"color: #ff0000;\">\" PRESENT\"</span> + CRLF + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> lUseWait, &nbsp; <span style=\"color: #ff0000;\">\"USE WAIT\"</span>, <span style=\"color: #ff0000;\">\"NO WAIT\"</span> <span style=\"color: #000000;\">&#41;</span> + CRLF<br /><br /><span style=\"color: #00C800;\">return</span> cMsg<br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00C800;\">CLASS</span> TMyWindow <span style=\"color: #0000ff;\">FROM</span> TWindow<br /><br />&nbsp; &nbsp;CLASSDATA lRegistered<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DATA</span> bOnDisplayChange<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DATA</span> bOnSettingChange<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">METHOD</span> HandleEvent<span style=\"color: #000000;\">&#40;</span> nMsg, nWParam, nLParam <span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #00C800;\">ENDCLASS</span><br /><br /><span style=\"color: #00C800;\">METHOD</span> HandleEvent<span style=\"color: #000000;\">&#40;</span> nMsg, nWParam, nLParam <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #00C800;\">CLASS</span> TMyWindow<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">do</span> <span style=\"color: #00C800;\">case</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">case</span> nMsg == WM_DISPLAYCHANGE<br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">if</span> ValType<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">bOnDisplayChange</span> <span style=\"color: #000000;\">&#41;</span> == <span style=\"color: #ff0000;\">'B'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #00C800;\">return</span> Eval<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">bOnDisplayChange</span>, <span style=\"color: #00C800;\">Self</span>, nWParam, nLParam <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">case</span> IsWindows10<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> .and. nMsg == WM_SETTINGCHANGE<br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">if</span> ValType<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">bOnSettingChange</span> <span style=\"color: #000000;\">&#41;</span> == <span style=\"color: #ff0000;\">'B'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #00C800;\">return</span> Eval<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">bOnSettingChange</span>, <span style=\"color: #00C800;\">Self</span>, nWParam, nLParam <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endcase</span><br /><br /><span style=\"color: #00C800;\">return</span> ::<span style=\"color: #00C800;\">Super</span>:<span style=\"color: #000000;\">HandleEvent</span><span style=\"color: #000000;\">&#40;</span> nMsg, nWParam, nLParam <span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><span style=\"color: #00D7D7;\">#define</span> &nbsp;HKEY_CURRENT_USER &nbsp; &nbsp; &nbsp; <span style=\"color: #000000;\">2147483649</span><br /><br /><span style=\"color: #00C800;\">function</span> IsTabletMode<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> oReg, lTabletMode := .f.<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> IsWindows10<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; oReg:= TReg32<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">&#40;</span> HKEY_CURRENT_USER, <span style=\"color: #ff0000;\">\"SOFTWARE<span style=\"color: #000000;\">\\M</span>icrosoft<span style=\"color: #000000;\">\\W</span>indows<span style=\"color: #000000;\">\\C</span>urrentVersion<span style=\"color: #000000;\">\\I</span>mmersiveShell\"</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; lTabletMode := <span style=\"color: #000000;\">&#40;</span> oReg:<span style=\"color: #0000ff;\">Get</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"TabletMode\"</span>, <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">&#41;</span> > <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; oReg:<span style=\"color: #000000;\">Close</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><span style=\"color: #00C800;\">return</span> lTabletMode<br /><br /><span style=\"color: #00D7D7;\">#define</span> &nbsp;HKEY_LOCAL_MACHINE &nbsp;<span style=\"color: #000000;\">2147483650</span> &nbsp;<span style=\"color: #B900B9;\">// 0x80000002</span><br /><br /><span style=\"color: #00C800;\">function</span> IsWindows10<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> oReg := TReg32<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">&#40;</span> HKEY_LOCAL_MACHINE,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #ff0000;\">\"SOFTWARE<span style=\"color: #000000;\">\\M</span>icrosoft<span style=\"color: #000000;\">\\W</span>indows NT<span style=\"color: #000000;\">\\C</span>urrentVersion\"</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.f. <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> cProductName := oReg:<span style=\"color: #0000ff;\">Get</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"ProductName\"</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;oReg:<span style=\"color: #000000;\">Close</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #ff0000;\">\"Windows 10\"</span> $ cProductName<br />&nbsp;</div>[/code:cvrwr2zl]", "time": "18:38", "topic": "Changing with and height of a window and a dialog", "username": "Gale FORd" } ]
Changing with and height of a window and a dialog
[ { "date": "2015-11-09", "forum": "FiveWin for Harbour/xHarbour", "text": "Here is another issue. With Windows 10 the On Screen Keyboard does not adjust screenheight(). So it makes no difference if the keyboard is visible or not. You have to know whether the on screen keyboard is visible in order to make a correct window size. The only way I have found to check it is to use IsWindowEnabled(). Any other way does not work with Windows 10 because it is always running and the position is still withing the window. \nWith Windows 7, screenheight() does get adjusted if keyboard is visable. So I think something like below will work for Windows 10 and Windows 7. I think Windows 8 will work like windows 10 but have not tried it.\n\n[code=fw:38zj1rao]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #B900B9;\">// To Check if Keyboard on Screen</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">if</span> IsWindows10<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> .or. IsWin8<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lReturn := IsWindowEnabled<span style=\"color: #000000;\">&#40;</span> hWndInputPanel <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lReturn := IsWindowVisible<span style=\"color: #000000;\">&#40;</span> hWndInputPanel <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">endif</span><br /><span style=\"color: #B900B9;\">// To get the correct screen height. IsKeyBoardVisible() is a function that contains code above. See full examples in code at end of this post.</span><br />&nbsp; <span style=\"color: #00C800;\">if</span> IsKeyboardVisible<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> .and. <span style=\"color: #000000;\">&#40;</span> IsWindows10<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> .or. IsWin8<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; hWndInputPanel := FindWindow<span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"IPTip_Main_Window\"</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; aCoord := GetWndRect<span style=\"color: #000000;\">&#40;</span> hWndInputPanel <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; nHeight := aCoord<span style=\"color: #000000;\">&#91;</span> <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">&#93;</span> - <span style=\"color: #000000;\">1</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">else</span><br />&nbsp; &nbsp; &nbsp; nHeight := ScreenHeight<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><br />&nbsp;</div>[/code:38zj1rao]\n\nSo a complete working example that seems to work under Windows 7 and Windows 10 that adjusts window size when tablet is rotated.\nYou can test the affect the wait has with on screen keyboard by pressing or clicking on the window to toggle wait timer.\n\n[code=fw:38zj1rao]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"fivewin.ch\"</span><br /><br /><span style=\"color: #00D7D7;\">#define</span> SM_TABLETPC &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #000000;\">86</span><br /><span style=\"color: #00D7D7;\">#define</span> WM_DISPLAYCHANGE &nbsp; &nbsp;0x007E<br /><span style=\"color: #00D7D7;\">#define</span> WM_SETTINGCHANGE &nbsp; &nbsp;WM_WININICHANGE<br />#ifndef SM_DIGITIZER<br /><span style=\"color: #00D7D7;\">#define</span> SM_DIGITIZER &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #000000;\">94</span><br />#endif<br /><span style=\"color: #00D7D7;\">#define</span> SM_CMOUSEBUTTONS &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #000000;\">43</span><br /><br /><span style=\"color: #00C800;\">static</span> cMsg &nbsp;:= <span style=\"color: #ff0000;\">\"\"</span><br /><span style=\"color: #00C800;\">static</span> oTimer<br /><span style=\"color: #00C800;\">static</span> cLog<br /><span style=\"color: #00C800;\">static</span> lUseWait<br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00C800;\">function</span> Main<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> oWnd<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> oFont<br /><br />&nbsp; &nbsp;lUseWait := .t.<br /><br />&nbsp; &nbsp;cLog &nbsp;:= cFileSetExt<span style=\"color: #000000;\">&#40;</span> ExeName<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #ff0000;\">\"log\"</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;FErase<span style=\"color: #000000;\">&#40;</span> cLog <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">FONT</span> oFont <span style=\"color: #0000ff;\">NAME</span> <span style=\"color: #ff0000;\">\"Segoe UI\"</span> <span style=\"color: #0000ff;\">SIZE</span> <span style=\"color: #000000;\">0</span>,<span style=\"color: #000000;\">-30</span><br /><br />&nbsp; &nbsp;oWnd &nbsp;:= TMyWindow<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;oWnd:<span style=\"color: #000000;\">SetColor</span><span style=\"color: #000000;\">&#40;</span> CLR_WHITE, CLR_GREEN <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;oWnd:<span style=\"color: #000000;\">bRClicked</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:= <span style=\"color: #000000;\">&#123;</span> || oWnd:<span style=\"color: #0000ff;\">Refresh</span> <span style=\"color: #000000;\">&#125;</span><br />&nbsp; &nbsp;oWnd:<span style=\"color: #000000;\">blClicked</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:= <span style=\"color: #000000;\">&#123;</span> || <span style=\"color: #000000;\">&#40;</span> lUseWait := !luseWait, oWnd:<span style=\"color: #0000ff;\">Refresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span><br />&nbsp; &nbsp;oWnd:<span style=\"color: #000000;\">bOnDisplayChange</span> &nbsp; := <span style=\"color: #000000;\">&#123;</span> || WaitReSize<span style=\"color: #000000;\">&#40;</span> oWnd, <span style=\"color: #ff0000;\">'DispChange'</span> <span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">&#125;</span><br />&nbsp; &nbsp;<span style=\"color: #B900B9;\">//oWnd:bOnDisplayChange &nbsp; := { || oWnd:Refresh(), 0 }</span><br />&nbsp; &nbsp;oWnd:<span style=\"color: #000000;\">bOnSettingChange</span> &nbsp; := <span style=\"color: #000000;\">&#123;</span> || WaitRefresh<span style=\"color: #000000;\">&#40;</span> oWnd <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #0000ff;\">ACTIVATE</span> <span style=\"color: #0000ff;\">WINDOW</span> oWnd <span style=\"color: #0000ff;\">CENTERED</span> <span style=\"color: #0000ff;\">on</span> <span style=\"color: #0000ff;\">INIT</span> WaitReSize<span style=\"color: #000000;\">&#40;</span> oWnd, <span style=\"color: #ff0000;\">'Init'</span> <span style=\"color: #000000;\">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">ON</span> <span style=\"color: #0000ff;\">PAINT</span> oWnd:<span style=\"color: #000000;\">SayText</span><span style=\"color: #000000;\">&#40;</span> cMsg := DisplayMessage<span style=\"color: #000000;\">&#40;</span> oWnd <span style=\"color: #000000;\">&#41;</span>, , , oFont <span style=\"color: #000000;\">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">ON</span> RESIZE <span style=\"color: #000000;\">&#40;</span> oWnd:<span style=\"color: #0000ff;\">Refresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #0000ff;\">RELEASE</span> <span style=\"color: #0000ff;\">FONT</span> oFont<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> oTimer != <span style=\"color: #00C800;\">nil</span><br />&nbsp; &nbsp; &nbsp; oTimer:<span style=\"color: #000000;\">End</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> File<span style=\"color: #000000;\">&#40;</span> cLog <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; WinExec<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"notepad.exe \"</span> + cLog <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<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;\">static</span> <span style=\"color: #00C800;\">function</span> WaitRefresh<span style=\"color: #000000;\">&#40;</span> ownd <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">static</span> n := <span style=\"color: #000000;\">0</span><br />&nbsp; &nbsp;TraceSize<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">'WaitRefresh'</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> oTimer == <span style=\"color: #00C800;\">nil</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">TIMER</span> oTimer <span style=\"color: #0000ff;\">OF</span> oWnd <span style=\"color: #0000ff;\">INTERVAL</span> <span style=\"color: #000000;\">400</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">ACTION</span> <span style=\"color: #000000;\">&#40;</span> n++, oWnd:<span style=\"color: #0000ff;\">Refresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> n > <span style=\"color: #000000;\">4</span>, <span style=\"color: #000000;\">&#40;</span>oTimer:<span style=\"color: #000000;\">End</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, oTimer := <span style=\"color: #00C800;\">nil</span>, n := <span style=\"color: #000000;\">0</span><span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #00C800;\">nil</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">ACTIVATE</span> <span style=\"color: #0000ff;\">TIMER</span> oTimer<br />&nbsp; &nbsp;<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;\">static</span> <span style=\"color: #00C800;\">function</span> DisplayMessage<span style=\"color: #000000;\">&#40;</span> oWnd <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> lPortrait &nbsp; := ScreenWidth<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> < ScreenHeight<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> lTabletMode := IsTabletMode<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> lTouch &nbsp; &nbsp; &nbsp;:= <span style=\"color: #000000;\">&#40;</span> GetSysMetrics<span style=\"color: #000000;\">&#40;</span> SM_DIGITIZER <span style=\"color: #000000;\">&#41;</span> > <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> lKeyboardVisible := IsKeyboardVisible<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;cMsg &nbsp;:= <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> IsWindows10<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> lTabletMode, <span style=\"color: #ff0000;\">\"TABLET MODE\"</span>, <span style=\"color: #ff0000;\">\"DESKTOP MODE\"</span> <span style=\"color: #000000;\">&#41;</span> + CRLF, <span style=\"color: #ff0000;\">\"\"</span> <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;cMsg &nbsp;+= <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> lPortrait, &nbsp; <span style=\"color: #ff0000;\">\"POTRAIT\"</span>, <span style=\"color: #ff0000;\">\"LANDSCAPE\"</span> <span style=\"color: #000000;\">&#41;</span> + CRLF + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> IsZoomed<span style=\"color: #000000;\">&#40;</span> oWnd:<span style=\"color: #000000;\">hWnd</span> <span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #ff0000;\">\"MAXIMIZED\"</span>, <span style=\"color: #ff0000;\">\"NORMAL\"</span> <span style=\"color: #000000;\">&#41;</span> + <span style=\"color: #ff0000;\">\" WINDOW\"</span> + CRLF + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> lTouch, <span style=\"color: #ff0000;\">\"\"</span>, <span style=\"color: #ff0000;\">\"NO \"</span> <span style=\"color: #000000;\">&#41;</span> + <span style=\"color: #ff0000;\">\"TOUCH INPUT\"</span> + CRLF + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #ff0000;\">\"MOUSE\"</span> + <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> GetSysMetrics<span style=\"color: #000000;\">&#40;</span> SM_CMOUSEBUTTONS <span style=\"color: #000000;\">&#41;</span> > <span style=\"color: #000000;\">0</span>, <span style=\"color: #ff0000;\">\"\"</span>, <span style=\"color: #ff0000;\">\" NOT\"</span> <span style=\"color: #000000;\">&#41;</span> + <span style=\"color: #ff0000;\">\" PRESENT\"</span> + CRLF + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> lUseWait, &nbsp; <span style=\"color: #ff0000;\">\"USE WAIT\"</span>, <span style=\"color: #ff0000;\">\"NO WAIT\"</span> <span style=\"color: #000000;\">&#41;</span> + CRLF + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> lKeyboardVisible, &nbsp; <span style=\"color: #ff0000;\">\"Keyboard Visable\"</span>, <span style=\"color: #ff0000;\">\"Keyboard Not Visable\"</span> <span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #00C800;\">return</span> cMsg<br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00C800;\">CLASS</span> TMyWindow <span style=\"color: #0000ff;\">FROM</span> TWindow<br /><br />&nbsp; &nbsp;CLASSDATA lRegistered<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DATA</span> bOnDisplayChange<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DATA</span> bOnSettingChange<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">METHOD</span> HandleEvent<span style=\"color: #000000;\">&#40;</span> nMsg, nWParam, nLParam <span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #00C800;\">ENDCLASS</span><br /><br /><span style=\"color: #00C800;\">METHOD</span> HandleEvent<span style=\"color: #000000;\">&#40;</span> nMsg, nWParam, nLParam <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #00C800;\">CLASS</span> TMyWindow<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">do</span> <span style=\"color: #00C800;\">case</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">case</span> nMsg == WM_DISPLAYCHANGE<br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">if</span> ValType<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">bOnDisplayChange</span> <span style=\"color: #000000;\">&#41;</span> == <span style=\"color: #ff0000;\">'B'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #00C800;\">return</span> Eval<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">bOnDisplayChange</span>, <span style=\"color: #00C800;\">Self</span>, nWParam, nLParam <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">case</span> IsWindows10<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> .and. nMsg == WM_SETTINGCHANGE<br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">if</span> ValType<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">bOnSettingChange</span> <span style=\"color: #000000;\">&#41;</span> == <span style=\"color: #ff0000;\">'B'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #00C800;\">return</span> Eval<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">bOnSettingChange</span>, <span style=\"color: #00C800;\">Self</span>, nWParam, nLParam <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endcase</span><br /><br /><span style=\"color: #00C800;\">return</span> ::<span style=\"color: #00C800;\">Super</span>:<span style=\"color: #000000;\">HandleEvent</span><span style=\"color: #000000;\">&#40;</span> nMsg, nWParam, nLParam <span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00C800;\">static</span> <span style=\"color: #00C800;\">function</span> WaitResize<span style=\"color: #000000;\">&#40;</span> oWnd, cAction <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">static</span> n := <span style=\"color: #000000;\">0</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> lUseWait<br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">if</span> oTimer == <span style=\"color: #00C800;\">nil</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">TIMER</span> oTimer ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">INTERVAL</span> <span style=\"color: #000000;\">400</span> <span style=\"color: #0000ff;\">ACTION</span> <span style=\"color: #000000;\">&#40;</span> n++, <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">&#40;</span> n = <span style=\"color: #000000;\">1</span>, ReSize<span style=\"color: #000000;\">&#40;</span> oWnd, cAction <span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #000000;\">&#40;</span>oTimer:<span style=\"color: #000000;\">End</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, oTimer := <span style=\"color: #00C800;\">nil</span>, n := <span style=\"color: #000000;\">0</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oTimer:<span style=\"color: #0000ff;\">Activate</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">else</span><br />&nbsp; &nbsp; &nbsp; ReSize<span style=\"color: #000000;\">&#40;</span> oWnd, cAction <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">nil</span><br /><br /><span style=\"color: #00C800;\">Static</span> <span style=\"color: #00C800;\">function</span> ReSize<span style=\"color: #000000;\">&#40;</span> oWnd, cAction <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> nTop, nLeft, nWidth, nHeight<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> lIsKeyboardVisible := IsKeyboardVisible<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #B900B9;\">//sysrefresh()</span><br />&nbsp; &nbsp;TraceSize<span style=\"color: #000000;\">&#40;</span> cAction <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;nTop := <span style=\"color: #000000;\">40</span><br />&nbsp; &nbsp;nLeft := <span style=\"color: #000000;\">40</span><br />&nbsp; &nbsp;nWidth := ScreenWidth<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> - <span style=\"color: #000000;\">&#40;</span> nLeft*<span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;nHeight := MyScreenHeight<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> - <span style=\"color: #000000;\">&#40;</span> nTop*<span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">&#41;</span> &nbsp; <span style=\"color: #B900B9;\">//ScreenHeight() - ( nTop*2 )</span><br />&nbsp; &nbsp;oWnd:<span style=\"color: #0000ff;\">Move</span><span style=\"color: #000000;\">&#40;</span> nTop, nLeft, nWidth, nHeight <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;oWnd:<span style=\"color: #0000ff;\">Refresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">nil</span><br /><br /><span style=\"color: #00C800;\">Static</span> <span style=\"color: #00C800;\">Function</span> TraceSize<span style=\"color: #000000;\">&#40;</span> cAction <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;tracelog<span style=\"color: #000000;\">&#40;</span> cAction, <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">&#40;</span> lUseWait, <span style=\"color: #ff0000;\">'UseWait'</span>, <span style=\"color: #ff0000;\">'NotUseWait'</span> <span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">&#40;</span> gIsLandscape<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #ff0000;\">'LandScape'</span>,<span style=\"color: #ff0000;\">'Portrait'</span> <span style=\"color: #000000;\">&#41;</span>, ScreenWidth<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, ScreenHeight<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, MyScreenHeight<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">nil</span><br /><br /><br /><span style=\"color: #00D7D7;\">#define</span> &nbsp;HKEY_CURRENT_USER &nbsp; &nbsp; &nbsp; <span style=\"color: #000000;\">2147483649</span><br /><br /><span style=\"color: #00C800;\">function</span> IsTabletMode<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> oReg, lTabletMode := .f.<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> IsWindows10<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; oReg:= TReg32<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">&#40;</span> HKEY_CURRENT_USER, <span style=\"color: #ff0000;\">\"SOFTWARE<span style=\"color: #000000;\">\\M</span>icrosoft<span style=\"color: #000000;\">\\W</span>indows<span style=\"color: #000000;\">\\C</span>urrentVersion<span style=\"color: #000000;\">\\I</span>mmersiveShell\"</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; lTabletMode := <span style=\"color: #000000;\">&#40;</span> oReg:<span style=\"color: #0000ff;\">Get</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"TabletMode\"</span>, <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">&#41;</span> > <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; oReg:<span style=\"color: #000000;\">Close</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><span style=\"color: #00C800;\">return</span> lTabletMode<br /><br /><span style=\"color: #00D7D7;\">#define</span> &nbsp;HKEY_LOCAL_MACHINE &nbsp;<span style=\"color: #000000;\">2147483650</span> &nbsp;<span style=\"color: #B900B9;\">// 0x80000002</span><br /><br /><span style=\"color: #00C800;\">function</span> IsWindows10<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> oReg := TReg32<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">&#40;</span> HKEY_LOCAL_MACHINE,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #ff0000;\">\"SOFTWARE<span style=\"color: #000000;\">\\M</span>icrosoft<span style=\"color: #000000;\">\\W</span>indows NT<span style=\"color: #000000;\">\\C</span>urrentVersion\"</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.f. <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> cProductName := oReg:<span style=\"color: #0000ff;\">Get</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"ProductName\"</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;oReg:<span style=\"color: #000000;\">Close</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #ff0000;\">\"Windows 10\"</span> $ cProductName<br /><br /><span style=\"color: #00C800;\">function</span> IsKeyboardVisible<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">Local</span> hWndInputPanel<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">Local</span> aCoord<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">Local</span> lReturn := .f.<br />&nbsp; &nbsp;hWndInputPanel := FindWindow<span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"IPTip_Main_Window\"</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;aCoord := GetWndRect<span style=\"color: #000000;\">&#40;</span> hWndInputPanel <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> hWndInputPanel != <span style=\"color: #000000;\">0</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">if</span> IsWindows10<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> .or. IsWin8<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lReturn := IsWindowEnabled<span style=\"color: #000000;\">&#40;</span> hWndInputPanel <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lReturn := IsWindowVisible<span style=\"color: #000000;\">&#40;</span> hWndInputPanel <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp; &nbsp; tracelog<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">'Check Keyboard'</span>, <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">&#40;</span> lUseWait, <span style=\"color: #ff0000;\">'UseWait'</span>, <span style=\"color: #ff0000;\">'NotUseWait'</span> <span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">&#40;</span> gIsLandscape<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #ff0000;\">'LandScape'</span>,<span style=\"color: #ff0000;\">'Portrait'</span> <span style=\"color: #000000;\">&#41;</span>, ScreenWidth<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, ScreenHeight<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, aCoord<span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">1</span><span style=\"color: #000000;\">&#93;</span>, aCoord<span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">2</span><span style=\"color: #000000;\">&#93;</span>, aCoord<span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">3</span><span style=\"color: #000000;\">&#93;</span>, aCoord<span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">4</span><span style=\"color: #000000;\">&#93;</span>, &nbsp;<span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">&#40;</span> lReturn, <span style=\"color: #ff0000;\">'Keyboard Visible'</span>, <span style=\"color: #ff0000;\">'Keyboard Not Visible'</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><span style=\"color: #00C800;\">return</span> lReturn<br /><br /><span style=\"color: #00C800;\">function</span> MyScreenHeight<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">Local</span> hWndInputPanel<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">Local</span> aCoord<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">Local</span> nHeight<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">Local</span> lReturn := .f.<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> IsKeyboardVisible<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> .and. <span style=\"color: #000000;\">&#40;</span> IsWindows10<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> .or. IsWin8<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; hWndInputPanel := FindWindow<span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"IPTip_Main_Window\"</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; aCoord := GetWndRect<span style=\"color: #000000;\">&#40;</span> hWndInputPanel <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; nHeight := aCoord<span style=\"color: #000000;\">&#91;</span> <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">&#93;</span> - <span style=\"color: #000000;\">1</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">else</span><br />&nbsp; &nbsp; &nbsp; nHeight := ScreenHeight<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><span style=\"color: #00C800;\">return</span> nHeight<br /><br /><span style=\"color: #00C800;\">function</span> gIsLandscape<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><span style=\"color: #00C800;\">return</span><span style=\"color: #000000;\">&#40;</span> screenwidth<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> > screenheight<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span></div>[/code:38zj1rao]\n\n[code=fw:38zj1rao]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\">&nbsp;</div>[/code:38zj1rao]", "time": "23:52", "topic": "Changing with and height of a window and a dialog", "username": "Gale FORd" } ]
Changing with and height of a window and a dialog
[ { "date": "2015-11-10", "forum": "FiveWin for Harbour/xHarbour", "text": "The previous post works correctly if the on screen keyboard is docked. Some adjustments may need to be made if keyboard is not docked. Windows 7 looks like it works ok as is. \nWe would need to find out if keyboard docked on Windows 10 and 8.", "time": "00:04", "topic": "Changing with and height of a window and a dialog", "username": "Gale FORd" } ]
Changing with and height of a window and a dialog
[ { "date": "2015-11-10", "forum": "FiveWin for Harbour/xHarbour", "text": "Gale\nIf it's any help\n\n<!-- l --><a class=\"postlink-local\" href=\"http://forums.fivetechsupport.com/viewtopic.php?f=3&t=25706&p=176030&hilit=keyboard#p175935\">viewtopic.php?f=3&t=25706&p=176030&hilit=keyboard#p175935</a><!-- l -->", "time": "00:53", "topic": "Changing with and height of a window and a dialog", "username": "cnavarro" } ]
Changing with and height of a window and a dialog
[ { "date": "2015-11-10", "forum": "FiveWin for Harbour/xHarbour", "text": "Thanks for your input but we are way past that. We are talking about tablets when they rotate, not just starting the keyboard.", "time": "02:58", "topic": "Changing with and height of a window and a dialog", "username": "Gale FORd" } ]
Changing with and height of a window and a dialog
[ { "date": "2015-11-10", "forum": "FiveWin for Harbour/xHarbour", "text": "If our window/dialog is is in maximized mode, when the tablet is rotated, the window is automatically resized to fit the new orientation. We do not need to recalculate the dimensions of the window. I personally prefer to keep our program code to the minimum and depend more on the system.\n\nShould we resize our window when the OSK popsup?\n\nThe normal practice on tablets is to have all windows/dialogs maximized and to keep input controls on the top half of the Window so that OSK, when pops up, does not cover the input controls. It is a good idea to keep input controls on the top and pure display controls on the bottom of the window. Please note that even on desktops, when the user switches from desktop mode to tablet mode, the window gets automatically maximized. \n\nOn rotation, we may still need to reposition some controls. For this purpose, we do not depend on ScreenHeight(), ScreenWidth() but on ClientRect of the window. That is accurate. This adjustment can be done in normal On Resize clause.\n\nNote: We are also considering relative coordinate system for controls in future versions. Example:\n@ 40, 0.25 GET ....... SIZE 0.50,20 PIXEL OF oWnd. (The meaning should be obvious)\nWith this change, we need not write specific code in our program in response to changes in modes / rotations.", "time": "03:16", "topic": "Changing with and height of a window and a dialog", "username": "nageswaragunupudi" } ]
Changing with and height of a window and a dialog
[ { "date": "2015-11-10", "forum": "FiveWin for Harbour/xHarbour", "text": "even if the dialog is maximized screenheight() still has to be calculated to find the control positions so they are visible with on screen keyboard. Then you have popup dialog boxes that are not maximized. The problem of on screen keyboard and screen size will always be important.", "time": "03:55", "topic": "Changing with and height of a window and a dialog", "username": "Gale FORd" } ]
Changing with and height of a window and a dialog
[ { "date": "2015-11-10", "forum": "FiveWin for Harbour/xHarbour", "text": "[quote:1w56ut4m]screenheight() still has to be calculated to find the control positions so they are visible with on screen keyboard.[/quote:1w56ut4m]\nI suggest using ClientRect of the window instead of screenheight()", "time": "03:58", "topic": "Changing with and height of a window and a dialog", "username": "nageswaragunupudi" } ]
Changing with and height of a window and a dialog
[ { "date": "2015-11-10", "forum": "FiveWin for Harbour/xHarbour", "text": "with windows 10 the screenheight does not account for keyboard. so the window does not resize automatically. That has been one of the reasons for this whole exercise.Some of my controls will be hidden behind keyboard when screen is rotated. I have to figure out what the visible screen dimensions are!!", "time": "04:08", "topic": "Changing with and height of a window and a dialog", "username": "Gale FORd" } ]
Changing with and height of a window and a dialog
[ { "date": "2015-11-10", "forum": "FiveWin for Harbour/xHarbour", "text": "I might have misunderstood your comment. Once the dialog size and position has been determined then we can use coordinates of window.\nI also have to rethink using any of the msg*() functions or any dialog that is centered. Without modification they will not always work right on Windows 10 when on screen keyboard visible.", "time": "15:53", "topic": "Changing with and height of a window and a dialog", "username": "Gale FORd" } ]
Changing with and height of a window and a dialog
[ { "date": "2015-11-10", "forum": "FiveWin for Harbour/xHarbour", "text": "Gale,\n\nMy core strategy in tablet programming with fwh:\n\n- To use dialog controls on ScrollPanel class.\n\n- When control get obtain focus, automatically open osk. Close osk on lost focus.\n\n- When open osk then scrolling Panel until osk top- 1\n\nRegards.", "time": "16:42", "topic": "Changing with and height of a window and a dialog", "username": "Antonio Mart." } ]
Changing with and height of a window and a dialog
[ { "date": "2015-11-10", "forum": "FiveWin for Harbour/xHarbour", "text": "That sounds good and I am glad you have it working for you.\nScrolling dialog is good and I had tried to implement that. There were several issues using that alone. #1 was the placement of navigation buttons like next, previous, print, cancel, etc. With Windows 8 and 10 if you put them on the bottom of the dialog then they could get covered up with on screen keyboard. It is inconvenient to always scroll to find important buttons or controls. Also the manipulation of the on screen keyboard is different from Windows 7 and Windows 8 or 10. I could not get on screen keyboard to start and stop correctly with focus placed back on original control. After working on screen rotation problems I have learned a lot more about on screen keyboards.", "time": "17:06", "topic": "Changing with and height of a window and a dialog", "username": "Gale FORd" } ]
Changing with and height of a window and a dialog
[ { "date": "2015-11-10", "forum": "FiveWin for Harbour/xHarbour", "text": "Gale,\n\n[quote:vig2sxvd] #1 was the placement of navigation buttons like next, previous, print, cancel, etc. With Windows 8 and 10 if you put them on the bottom of the dialog then they could get covered up with on screen keyboard.[/quote:vig2sxvd]\n\n\n1st. buttons on top screen.\n2nd. only running on windows 8 (tabtip osk) \n\nDialog scrolling in action, first stage: <!-- l --><a class=\"postlink-local\" href=\"http://forums.fivetechsupport.com/viewtopic.php?f=3&t=25706&hilit=tablet&start=30#p143679\">viewtopic.php?f=3&t=25706&hilit=tablet&start=30#p143679</a><!-- l -->\n\nRegards", "time": "17:23", "topic": "Changing with and height of a window and a dialog", "username": "Antonio Mart." } ]
Changing with and height of a window and a dialog
[ { "date": "2014-08-28", "forum": "FiveWin for Harbour/xHarbour", "text": "To All\n\nI am attempting to re-use an xBrowse already defined with an Ado data source and fields assigned to resource ID and browser object. I want to be able to re-use the same xBrowse and assign it a new data source and fields re-using the same resource id and xBrowse object at run-time.\n\nTo further clarify .. I want to be able to click on a radio button and show an xBrowse with its data source, fields and resource ID then be able to click on another radio button and re-use the same xBrowse with a new data source and fields utilizing the same resource ID and xBrowse object.\n\nI have not attempted to do this before and have stayed awake most of the night thinking about how I would attempt this Logic.\n\n1) Is there such a method as oLbx:CLose()\n2) How would I reconfigure xBrowse at runtime to accept a new data source and fields at run-time using the same resource ID and browser object ?\n\nI would greatly appreciate anyone's thoughts!\n\nRick Lipkin", "time": "13:56", "topic": "Changing xBrowse data source and fields at runtime", "username": "Rick Lipkin" } ]
Changing xBrowse data source and fields at runtime
[ { "date": "2014-08-28", "forum": "FiveWin for Harbour/xHarbour", "text": "Rick: \nMaybe this sample code will be of some help. Here, I used ComboBox instead of Radio-buttons.\n[code=fw:3iqndgxi]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #B900B9;\">//---------------------------------// </span><br /><span style=\"color: #00C800;\">Function</span> FapSoftScan<span style=\"color: #000000;\">&#40;</span>oVent<span style=\"color: #000000;\">&#41;</span><br /><span style=\"color: #00C800;\">local</span> oDlg, oBrw, oCbx, oBt2<br /><span style=\"color: #00C800;\">local</span> aInfo:=<span style=\"color: #000000;\">&#123;</span><span style=\"color: #000000;\">&#125;</span>, aTitCols:=<span style=\"color: #000000;\">&#123;</span><span style=\"color: #000000;\">&#125;</span>, aWMIscan, bMonitoring<br /><span style=\"color: #00C800;\">local</span> cVar, nPos:=<span style=\"color: #000000;\">1</span>, n<br /><span style=\"color: #00C800;\">local</span> aOptions := <span style=\"color: #000000;\">&#123;</span><span style=\"color: #ff0000;\">\"01  Grupo de Programas      (Win32 Logical Program Group)  \"</span>,;<br />                   <span style=\"color: #ff0000;\">\"02  Sistema del Ordenador   (Win32 Computer Systen)        \"</span> <span style=\"color: #000000;\">&#125;</span><br /><br /><br />bMonitoring := <span style=\"color: #000000;\">&#123;</span>|| aWMIscan:=FapMonitoring<span style=\"color: #000000;\">&#40;</span>nPos,oWMI,<span style=\"color: #000000;\">18</span><span style=\"color: #000000;\">&#41;</span> ,;<br />                   aInfo:=aWMIscan<span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">1</span><span style=\"color: #000000;\">&#93;</span>, aTitCols:=aWMIscan<span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">2</span><span style=\"color: #000000;\">&#93;</span>,;<br />                   oBrw:<span style=\"color: #000000;\">SetArray</span><span style=\"color: #000000;\">&#40;</span>aInfo,.t.,<span style=\"color: #000000;\">1</span>,.t.<span style=\"color: #000000;\">&#41;</span>,;<br />                   oBrw:<span style=\"color: #000000;\">cHeaders</span> := aTitCols, ;<br />                   oBrw:<span style=\"color: #000000;\">nHeadStrAligns</span> := AL_CENTER, ;   <span style=\"color: #B900B9;\">//    oBrw:nWidths := 160 ,;</span><br />                   AEval<span style=\"color: #000000;\">&#40;</span>oBrw:<span style=\"color: #000000;\">aCols</span>,<span style=\"color: #000000;\">&#123;</span>|o,n,oCol|  <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">&#40;</span>ValType<span style=\"color: #000000;\">&#40;</span>o:<span style=\"color: #000000;\">Value</span><span style=\"color: #000000;\">&#41;</span> ==<span style=\"color: #ff0000;\">\"N\"</span>, o:<span style=\"color: #000000;\">nWidth</span> := <span style=\"color: #0000ff;\">Max</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">40</span>, oBrw:<span style=\"color: #000000;\">aCols</span><span style=\"color: #000000;\">&#91;</span>n<span style=\"color: #000000;\">&#93;</span>:<span style=\"color: #000000;\">HeaderWidth</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span>, o:<span style=\"color: #000000;\">nWidth</span>:=<span style=\"color: #000000;\">160</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span><span style=\"color: #000000;\">&#41;</span>,;<br />                   oBrw:<span style=\"color: #000000;\">nColSel</span> := <span style=\"color: #000000;\">1</span>, oBrw:<span style=\"color: #0000ff;\">Refresh</span><span style=\"color: #000000;\">&#40;</span>.t.<span style=\"color: #000000;\">&#41;</span>,;<br />                   oBrw:<span style=\"color: #000000;\">SetFocus</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span><br /><br /><br /><span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDlg <span style=\"color: #0000ff;\">SIZE</span> oVent:<span style=\"color: #000000;\">nWidth</span>, oVent:<span style=\"color: #000000;\">nHeight</span> <span style=\"color: #0000ff;\">TITLE</span> <span style=\"color: #ff0000;\">\"FapSoftScan\"</span> TRANSPARENT<br /><br />cVar := aOptions<span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">1</span><span style=\"color: #000000;\">&#93;</span><br /><br />@ oDlg:<span style=\"color: #000000;\">nTop</span><span style=\"color: #000000;\">+10</span>,<span style=\"color: #000000;\">8</span> <span style=\"color: #0000ff;\">COMBOBOX</span> oCBx <span style=\"color: #0000ff;\">VAR</span> cVar <span style=\"color: #0000ff;\">OF</span> oDlg <span style=\"color: #0000ff;\">PIXEL</span>;<br />                 <span style=\"color: #0000ff;\">ITEMS</span> aOptions ;<br />                 <span style=\"color: #0000ff;\">SIZE</span> <span style=\"color: #000000;\">140</span>,<span style=\"color: #000000;\">16</span> ;<br />                 <span style=\"color: #0000ff;\">ON</span> <span style=\"color: #0000ff;\">CHANGE</span> <span style=\"color: #000000;\">&#40;</span> nPos := oCbx:<span style=\"color: #000000;\">nAt</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, Eval<span style=\"color: #000000;\">&#40;</span>bMonitoring<span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br /><br />@<span style=\"color: #000000;\">1</span>,<span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">XBROWSE</span> oBrw <span style=\"color: #0000ff;\">OF</span> oDlg ; <br />     ARRAY <span style=\"color: #000000;\">&#123;</span><span style=\"color: #000000;\">&#125;</span> CELL LINES FOOTERS AUTOSORT<br /><br />     oBrw:<span style=\"color: #000000;\">CreateFromCode</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />     Eval<span style=\"color: #000000;\">&#40;</span>bMonitoring<span style=\"color: #000000;\">&#41;</span><br /><br /><br /> @ oDlg:<span style=\"color: #000000;\">nTop</span><span style=\"color: #000000;\">+245</span>,<span style=\"color: #000000;\">380</span> BUTTONBMP oBt2 <span style=\"color: #0000ff;\">PROMPT</span> <span style=\"color: #ff0000;\">\"Salir/Cancelar\"</span> <span style=\"color: #0000ff;\">OF</span> oDlg ;<br />                    <span style=\"color: #0000ff;\">SIZE</span> <span style=\"color: #000000;\">60</span>, <span style=\"color: #000000;\">12</span>  <span style=\"color: #0000ff;\">PIXEL</span> ;<br />                    BITMAP <span style=\"color: #ff0000;\">\"SALIR16x16\"</span> TEXTRIGHT ;<br />                    <span style=\"color: #0000ff;\">ACTION</span> oDlg:<span style=\"color: #000000;\">End</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /> <br /> <span style=\"color: #0000ff;\">ACTIVATE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDlg <span style=\"color: #0000ff;\">CENTERED</span> ;<br />   <span style=\"color: #0000ff;\">ON</span> <span style=\"color: #0000ff;\">INIT</span> <span style=\"color: #000000;\">&#40;</span> oBrw:<span style=\"color: #000000;\">nHeight</span>:=oDlg:<span style=\"color: #000000;\">nHeight</span><span style=\"color: #000000;\">-118</span>, oBrw:<span style=\"color: #000000;\">nWidth</span>:=oDlg:<span style=\"color: #000000;\">nWidth</span><span style=\"color: #000000;\">-34</span>, oBrw:<span style=\"color: #000000;\">nTop</span>:=oDlg:<span style=\"color: #000000;\">nTop</span><span style=\"color: #000000;\">+50</span> ,;<br />             oBrw:<span style=\"color: #000000;\">SetFocus</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #00C800;\">Return</span> <span style=\"color: #00C800;\">nil</span><br /><br /><br /><span style=\"color: #B900B9;\">//-------------------------------------------------------------</span><br /><span style=\"color: #00C800;\">Function</span> FapMonitoring<span style=\"color: #000000;\">&#40;</span>nOption,oWMI<span style=\"color: #000000;\">&#41;</span><br /><span style=\"color: #00C800;\">local</span> oPC, oQry<br /><span style=\"color: #00C800;\">local</span> aInfo:=<span style=\"color: #000000;\">&#123;</span><span style=\"color: #000000;\">&#125;</span>, aTitCols, n, nLen<br /><br /><span style=\"color: #00C800;\">if</span> nOption == <span style=\"color: #000000;\">1</span><br />   oQry := oWMI:<span style=\"color: #000000;\">ExecQuery</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"Select * FROM Win32_LogicalProgramGroup\"</span> <span style=\"color: #000000;\">&#41;</span><br />   aTitCols:= <span style=\"color: #000000;\">&#123;</span><span style=\"color: #ff0000;\">\"Caption\"</span>,<span style=\"color: #ff0000;\">\"Description\"</span>,<span style=\"color: #ff0000;\">\"GroupName\"</span>,<span style=\"color: #ff0000;\">\"Name\"</span>,<span style=\"color: #ff0000;\">\"UserName\"</span>,<span style=\"color: #ff0000;\">\"InstallDate\"</span>,<span style=\"color: #ff0000;\">\"Status\"</span><span style=\"color: #000000;\">&#125;</span><br />   <span style=\"color: #00C800;\">for</span> each oPC in oQry<br />      aadd<span style=\"color: #000000;\">&#40;</span>aInfo, <span style=\"color: #000000;\">&#123;</span>oPC:<span style=\"color: #000000;\">Caption</span>, oPC:<span style=\"color: #000000;\">Description</span>, oPC:<span style=\"color: #000000;\">GroupName</span>, oPC:<span style=\"color: #0000ff;\">Name</span>, oPc:<span style=\"color: #000000;\">UserName</span>, oPc:<span style=\"color: #000000;\">InstallDate</span>, oPc:<span style=\"color: #000000;\">Status</span><span style=\"color: #000000;\">&#125;</span> <span style=\"color: #000000;\">&#41;</span><br />   <span style=\"color: #00C800;\">next</span><br /><br />elseif nOption == <span style=\"color: #000000;\">2</span><br />   oQry := oWMI:<span style=\"color: #000000;\">ExecQuery</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"Select * FROM Win32_ComputerSystem\"</span> <span style=\"color: #000000;\">&#41;</span><br />   aTitCols:= <span style=\"color: #000000;\">&#123;</span><span style=\"color: #ff0000;\">\"Caption\"</span>,<span style=\"color: #ff0000;\">\"Description\"</span>,<span style=\"color: #ff0000;\">\"Domain\"</span>,<span style=\"color: #ff0000;\">\"Model\"</span>,<span style=\"color: #ff0000;\">\"Name\"</span>,<span style=\"color: #ff0000;\">\"Processors\"</span>,<span style=\"color: #ff0000;\">\"Status\"</span>,<span style=\"color: #ff0000;\">\"System Type\"</span>,<span style=\"color: #ff0000;\">\"User Name\"</span><span style=\"color: #000000;\">&#125;</span><br />   <span style=\"color: #00C800;\">for</span> each oPC in oQry<br />      aadd<span style=\"color: #000000;\">&#40;</span>aInfo, <span style=\"color: #000000;\">&#123;</span>oPC:<span style=\"color: #000000;\">Caption</span>, oPC:<span style=\"color: #000000;\">Description</span>, oPC:<span style=\"color: #000000;\">Domain</span>, oPC:<span style=\"color: #000000;\">Model</span>, oPC:<span style=\"color: #0000ff;\">Name</span>, oPc:<span style=\"color: #000000;\">NumberOfProcessors</span>, oPc:<span style=\"color: #000000;\">Status</span>, oPC:<span style=\"color: #000000;\">SystemType</span>, oPC:<span style=\"color: #000000;\">UserName</span><span style=\"color: #000000;\">&#125;</span> <span style=\"color: #000000;\">&#41;</span><br />   <span style=\"color: #00C800;\">next</span>   <br /><span style=\"color: #00C800;\">endif</span><br /><br /><span style=\"color: #00C800;\">RETURN</span> <span style=\"color: #000000;\">&#123;</span>aInfo,aTitCols<span style=\"color: #000000;\">&#125;</span><br /> </div>[/code:3iqndgxi]\nBest regards", "time": "15:44", "topic": "Changing xBrowse data source and fields at runtime", "username": "FranciscoA" } ]
Changing xBrowse data source and fields at runtime
[ { "date": "2014-08-28", "forum": "FiveWin for Harbour/xHarbour", "text": "Francisco\n\nGreat LDAP query !! I understand what you are doing logically .. I don't know if I am going to run into any problems since my xBrowse is tied to a resource ID .. I am thinking I may have difficulty re-initializing the browse since I am using a recordset vs an array <!-- s:( --><img src=\"{SMILIES_PATH}/icon_sad.gif\" alt=\":(\" title=\"Sad\" /><!-- s:( --> \n\nI am thinking I am going to create the oRs object and create a recordset, then oRs:Close() and then re-use oRs as my new recordset re-using the same recordset object ?\n\nI am working on the logic now ... Thank you for your suggestion!\n\nRick", "time": "16:05", "topic": "Changing xBrowse data source and fields at runtime", "username": "Rick Lipkin" } ]
Changing xBrowse data source and fields at runtime
[ { "date": "2016-11-30", "forum": "Off Topic / Otros temas", "text": "[img:26ttypjf]http&#58;//i&#46;imgur&#46;com/LEZQsWK&#46;jpg[/img:26ttypjf]\n\n <!-- s:cry: --><img src=\"{SMILIES_PATH}/icon_cry.gif\" alt=\":cry:\" title=\"Crying or Very sad\" /><!-- s:cry: --> <!-- s:cry: --><img src=\"{SMILIES_PATH}/icon_cry.gif\" alt=\":cry:\" title=\"Crying or Very sad\" /><!-- s:cry: --> <!-- s:cry: --><img src=\"{SMILIES_PATH}/icon_cry.gif\" alt=\":cry:\" title=\"Crying or Very sad\" /><!-- s:cry: --> <!-- s:cry: --><img src=\"{SMILIES_PATH}/icon_cry.gif\" alt=\":cry:\" title=\"Crying or Very sad\" /><!-- s:cry: --> <!-- s:cry: --><img src=\"{SMILIES_PATH}/icon_cry.gif\" alt=\":cry:\" title=\"Crying or Very sad\" /><!-- s:cry: --> \n\nSaludos", "time": "15:10", "topic": "Chapecoense Campeón/Campeão", "username": "karinha" } ]
Chapecoense Campeón/Campeão
[ { "date": "2016-12-01", "forum": "Off Topic / Otros temas", "text": "Força CHAPECOENSE !\n\nGoian bego !\n\nPara nosotros \"Carpe diem\" ...\n\n[url:1jh0dvvq]https&#58;//www&#46;youtube&#46;com/watch?v=70ehPdHkEiQ[/url:1jh0dvvq]", "time": "17:33", "topic": "Chapecoense Campeón/Campeão", "username": "Baxajaun" } ]
Chapecoense Campeón/Campeão
[ { "date": "2008-06-29", "forum": "FiveWin for Harbour/xHarbour", "text": "I had previously understood that in 32 bits we don't have the 64k size limit for a char string that we had in 16 bits. However, I saw in the xHarbour documentation for Memoread() that there still is a 64k size limit for a char string in xHarbour.\r\n\r\nHow about FWH - do we still have a 64k limit for a char string?\r\n\r\n- Roger", "time": "13:49", "topic": "Char string size limit still 64k?", "username": "Roger Seiler" } ]
Char string size limit still 64k?