<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p><br>
</p>
<br>
<div class="moz-cite-prefix">On 05/16/2017 01:27 PM, James Richters
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:00ec01d2ce2e$fe3e02e0$faba08a0$@productionautomation.net">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:315383217;
mso-list-type:hybrid;
mso-list-template-ids:572402178 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level2
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level3
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
@list l0:level4
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level5
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level6
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
@list l0:level7
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level8
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level9
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p>> Hmm? But he only wants to change the title of the
window. Even on Windows that should work from a different
thread. However a platform independent SetWindowTitle() for
ptcgraph would be rather useful I guess.<o:p></o:p></p>
<p class="MsoNormal">I did a quick test and ran one program that
did a writeln of it’s handle, then put that handle in another
program and ran it and I was able to change the window title
of the first program with the second program. So if ptcgraph
also had the graphwindow : handle variable I think it would
work.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">>Though I'd like to know why he needs
ShowWindow()...<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">My application is purposefully designed not
to use a mouse… It’s CNC control software and mice, even
optical ones out in dusty shops are tedious and difficult…
it’s often difficult to even find a place to put a mouse,
nevermind seeing a pointer when the screen is full of sawdust.
So I have keyboard commands that get me back to the console
window where I can look at some things like the contents of
some variables, then when I’m done I hit another key and it
puts me back on the graphics window. I just use both crt and
pctcrt and do things like crt.readkey and pctcrt.readkey to
know which screen got the input. I can get by without
ShowWindow() because I can alt-tab between the windows without
a mouse, and admittedly there isn’t a huge use for the console
window, but it is a lot nicer for the program to put the
correct window on top by itself.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">It would be nice if I could: <o:p></o:p></p>
<ol style="margin-top:0in" start="1" type="1">
<li class="MsoListParagraph"
style="margin-left:0in;mso-list:l0 level1 lfo1">The above
mentioned ShowWindow()<o:p></o:p></li>
<li class="MsoListParagraph"
style="margin-left:0in;mso-list:l0 level1 lfo1">Make the
graph window full screen always, it normally does not come
up full screen it’s the correct size for full screen but
mispositioned.. I can probably fix this in a shortcut that
starts it but would be nice if the program itself forced
full screen</li>
</ol>
</div>
</blockquote>
Yes, you can do this, if you set:<br>
<br>
FullscreenGraph := true;<br>
<br>
In the beginning of your program (before InitGraph). Tonight I'll
also add the option for changing the title bar text, when in
windowed mode.<br>
<blockquote type="cite"
cite="mid:00ec01d2ce2e$fe3e02e0$faba08a0$@productionautomation.net">
<div class="WordSection1">
<ol style="margin-top:0in" start="1" type="1">
<li class="MsoListParagraph"
style="margin-left:0in;mso-list:l0 level1 lfo1"><o:p></o:p></li>
<li class="MsoListParagraph"
style="margin-left:0in;mso-list:l0 level1 lfo1">Get rid of
the windows titlebar all together, I could just draw my
own. I was able to shut the title bar off with the graph
unit, but the window would still be the size of the screen
minus the bar. I believe if the titlebar was defined to be
shut off before the window was created, or shortly after
then I could have completely full screen with no title bar.
But I don’t know where or how the window is created to do
that.<o:p></o:p></li>
<li class="MsoListParagraph"
style="margin-left:0in;mso-list:l0 level1 lfo1">If I can’t
get rid of the titlebar, then setting a custom window title
would be nice, preferably after my program was running so I
could put status information up there, but if not possible
then a one time custom title bar name would be great.<o:p></o:p></li>
</ol>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">James<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b>From:</b> fpc-pascal
[<a class="moz-txt-link-freetext" href="mailto:fpc-pascal-bounces@lists.freepascal.org">mailto:fpc-pascal-bounces@lists.freepascal.org</a>] <b>On Behalf
Of </b>Sven Barth via fpc-pascal<br>
<b>Sent:</b> Tuesday, May 16, 2017 2:00 AM<br>
<b>To:</b> FPC-Pascal users discussions
<a class="moz-txt-link-rfc2396E" href="mailto:fpc-pascal@lists.freepascal.org"><fpc-pascal@lists.freepascal.org></a><br>
<b>Cc:</b> Sven Barth <a class="moz-txt-link-rfc2396E" href="mailto:pascaldragon@googlemail.com"><pascaldragon@googlemail.com></a><br>
<b>Subject:</b> Re: [fpc-pascal] FPC Graphics options?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p>Am 16.05.2017 02:46 schrieb "Nikolay Nikolov" <<a
href="mailto:nickysn@gmail.com" moz-do-not-send="true">nickysn@gmail.com</a>>:<br>
>> I also no longer have the 'graphwindow' handle
variable so I had to comment out anything that was using it
like<br>
>><br>
>> SetWindowTextA(graphicwindow,graphwindowtext);<br>
>> And<br>
>> ShowWindow(graphwindow, SW_SHOW);<br>
>> So I just commented them out for now. I'm hoping
there is a way to get around the graphwindow variable because
I was using the above 2 functions and I don't know how else to
determine the graphic window handle... but the performance
gain and ease of implementation will make working out any
other issues worth the effort. Any advice on how I can
capture the graph window handle would be appreciated<br>
><br>
> Unfortunately, you can't do that and it's actually the
main reason why ptcgraph is fast. Even if you modify the
ptcgraph source, so that you get the window handle, it would
do you no good, because the window is created in a different
thread and this means that you cannot draw to the window from
your program's thread. In fact, all the ptcgraph drawing
routines actually render to an internal software buffer and
issue no winapi drawing calls at all. That's the reason
ptcgraph is fast and the regular graph unit is slow - the
winapi drawing routines are really the bottleneck in this case
and not the speed of the code, generated by FPC.<o:p></o:p></p>
<p>Hmm? But he only wants to change the tttle of the window.
Even on Windows that should work from a different thread.
However a platform independent SetWindowTitle() for ptcgraph
would be rather useful I guess.<o:p></o:p></p>
<p>Though I'd like to know why he needs ShowWindow()...<o:p></o:p></p>
<p>Regards,<br>
Sven<o:p></o:p></p>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
fpc-pascal maillist - <a class="moz-txt-link-abbreviated" href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal">http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal</a></pre>
</blockquote>
<br>
</body>
</html>