Thanks Saulius,
At least SetConsoleMenuClose grayed also the option Close in caption menu not
only the button in title bar. :)
I still don't understand why we have to introduce HB_BREAK_FLAG in Inkey Poll
in response to CTRL_CLOSE_EVENT.
I think if we do this .-
---
Index: gtwin.c
=
Hi,
> Do you know which windows version accepts SetConsoleMenuClose()
> and other functions like SetConsolePalette()?
>
> If this is commonly supported functionality then we can add some
> extension to GTWIN.
These goodies appears since Windows 2000.
Also console alias, command history, font serv
On Fri, 05 Mar 2010, Saulius Zrelskis wrote:
Hi,
> > SetConsoleMenuClose() is an undocumented Windows API function,
> > so IMO it's not a good idea to use it in Harbour.
> We are familiar with undocumented things since Clipper days.
> And Harbour is and must be compatible with it 100% :)
Do you
On Fri, 05 Mar 2010, Saulius Zrelskis wrote:
Hi,
> [for those interested]
> Sample below really controls console close button on Windows XP and
> later systems. Please test it and enjoy:)
Yes it is and we have exactly such code in our GTWIN (unfortunately it
needs GetConsoleWindow() so it does n
Hi,
>> SetConsoleMenuClose() is an undocumented Windows API function,
>> so IMO it's not a good idea to use it in Harbour.
>
> We are familiar with undocumented things since Clipper days.
That's okay, but it's quite dangerous thing to do,
as the API may disappear (easy to handle, see commit),
> SetConsoleMenuClose() is an undocumented Windows API function,
> so IMO it's not a good idea to use it in Harbour.
We are familiar with undocumented things since Clipper days.
And Harbour is and must be compatible with it 100% :)
Best regards,
Saulius
___
Thank you. I did implement similar a few days ago in GTWIN.
SetConsoleMenuClose() is an undocumented Windows API function,
so IMO it's not a good idea to use it in Harbour.
Brgds,
Viktor
On 2010 Mar 5, at 10:19, Saulius Zrelskis wrote:
> [for those interested]
> Sample below really controls co
[for those interested]
Sample below really controls console close button on Windows XP and
later systems. Please test it and enjoy:)
--->>>
#include 'inkey.ch'
proc main()
local nKey
while (nKey := Inkey(0)) # K_ESC
Qout(Str(nKey) +' "' +Chr(nKey) +'"')
if nKey == Asc("0") .or. nKey ==
Hi Xavi,
> Maybe is about CTRL_LOGOFF_EVENT, CTRL_SHUTDOWN_EVENT that is received only
> by services.
> But if so is a issue of Vista and Win7/2008, not ours, because the official
> documentation nothing says about this, AFAIK.
The documentation was just not updated for Vista/Win7,
I see you s
Viktor,
It also doesn't work on Vista/Win7/2008.
Maybe is about CTRL_LOGOFF_EVENT, CTRL_SHUTDOWN_EVENT that is received only by
services.
But if so is a issue of Vista and Win7/2008, not ours, because the official
documentation nothing says about this, AFAIK.
And no excuse for not correcting
It also doesn't work on Vista/Win7/2008.
Did _you_ read the comments in your quoted (now
for the 6th times) article?
I tested it on XP x64, there there is a window
asking for 'Cancel' and 'End Now', so even here
this method cannot prevent the app to be closed
by user. In any case it's not a S
Sorry I meant SetCancel(.F.)
http://msdn.microsoft.com/en-us/library/ms683242%28VS.85%29.aspx
"
An application-defined function used with the SetConsoleCtrlHandler function. A console process uses this function to handle
control signals received by the process. When the signal is received, the
It doesn't work on Vista and Win7/2008.
Brgds,
Viktor
On 2010 Mar 4, at 20:16, Xavi wrote:
> [ I don't know because I've to answer this. Maybe the last time. :( ]
>
> http://msdn.microsoft.com/en-us/library/ms683242%28VS.85%29.aspx
>
> "
> An application-defined function used with the SetConso
[ I don't know because I've to answer this. Maybe the last time. :( ]
http://msdn.microsoft.com/en-us/library/ms683242%28VS.85%29.aspx
"
An application-defined function used with the SetConsoleCtrlHandler function. A console process uses this function to handle
control signals received by the p
> http://msdn.microsoft.com/en-us/library/ms683242%28VS.85%29.aspx
>
> "
> Return TRUE. In this case, no other handler functions are called, and the
> system displays a pop-up dialog box that asks the user whether to terminate
> the process. The system also displays this dialog box if the proces
>> Can you describe what is exactly this "expected" result?
>
> http://msdn.microsoft.com/en-us/library/ms683242%28VS.85%29.aspx
>
> "
> Return TRUE. In this case, no other handler functions are called, and the
> system displays a pop-up dialog box that asks the user whether to terminate
> the
Can you describe what is exactly this "expected" result?
http://msdn.microsoft.com/en-us/library/ms683242%28VS.85%29.aspx
"
Return TRUE. In this case, no other handler functions are called, and the system displays a pop-up dialog box that asks the user
whether to terminate the process. The sys
>> I was referring to your patch. Did you
>> try it with a test application with both
>> SETCANCEL(.T.) and SETCANCEL(.F.) ?
>>
>>> IMHO this difference can be assumed because the code must be fixed in MT
>>> mode.
>>> [
>>> #if ! defined( HB_MT_VM )&& 0
>>> if( hb_setGetCancel() )
>>>
Did you test this code?
Yes, if you're referring to that SetCancel( .T. ) Clipper's program under NTVDM
differs.
I was referring to your patch. Did you
try it with a test application with both
SETCANCEL(.T.) and SETCANCEL(.F.) ?
IMHO this difference can be assumed because the code must be f
>> Did you test this code?
>
> Yes, if you're referring to that SetCancel( .T. ) Clipper's program under
> NTVDM differs.
I was referring to your patch. Did you
try it with a test application with both
SETCANCEL(.T.) and SETCANCEL(.F.) ?
> IMHO this difference can be assumed because the code
Hi,
Did you test this code?
Yes, if you're referring to that SetCancel( .T. ) Clipper's program under NTVDM
differs.
IMHO this difference can be assumed because the code must be fixed in MT mode.
[
#if ! defined( HB_MT_VM ) && 0
if( hb_setGetCancel() )
s_bBreak = HB_TRUE;
Hi Xavi,
> Yes, you're right.
> I have another patch to fix this, IMHO a issue, but I don't have right to
> commit it, there are two differents points of view and few opinions. Please
> note that GTWIN behavior is the same as a Clipper program under NTVDM.
>
> --- .patch
> Index: gtwin.c
>
Hi,
I'm trying to write a simple Hello World app that does something like a
WAIT command and maybe calls a function if I click the X button for a
GTWIN app.
Yes, you're right.
I have another patch to fix this, IMHO a issue, but I don't have right to commit it, there are two differents points o
>> I have it in mind to try that 'one of these days', meaning probably within
>> your lifetime. ;-)
>
> It would be nice if this could be chewed
> into HB_GTI_NOTIFIERBLOCK support for GTWIN,
> at least for close events that is.
>
> Any results of your experiments is useful,
> so just take yo
Hi Paul,
>> With GTWIN I still have to see proof that
>> it's technically possible to catch close
>> events like that, until then I assume it's
>> not possible, and for sure it's not implemented
>> in Harbour.
>
> I have seen some code posted on the Clipper forum that I hope I captured
> concern
Victor,
With GTWIN I still have to see proof that
it's technically possible to catch close
events like that, until then I assume it's
not possible, and for sure it's not implemented
in Harbour.
I have seen some code posted on the Clipper forum that I hope I captured
concerning fullscreen/Wind
Wow this test is really cute. I'll be poking around with this. Thanks a
ton!
On Wed, Mar 3, 2010 at 2:21 PM, Viktor Szakáts wrote:
> > I'm trying to write a simple Hello World app that does something like a
> WAIT command and maybe calls a function if I click the X button for a GTWIN
> app. I
> I'm trying to write a simple Hello World app that does something like a WAIT
> command and maybe calls a function if I click the X button for a GTWIN app.
> I have no idea if this is even possible, as I have grepped the entire harbour
> src .zip file contents for some hints. In the few resul
Hi,
I'm trying to write a simple Hello World app that does something like a WAIT
command and maybe calls a function if I click the X button for a GTWIN app.
I have no idea if this is even possible, as I have grepped the entire
harbour src .zip file contents for some hints. In the few results for
29 matches
Mail list logo