Hello,
is there a way to disable or hide the close button on the title bar of a Gtwin application?
Il 20/10/2024 23:32, Rob Fum ha scritto:
Hello,
is there a way to disable or hide the close button on the title bar of
a Gtwin application?
What is a "Gtwin application"? Do you mean a console program?
Yes a console program.
#include <windows.h>Thank you, but it doesn't work.
This is working fine here:
This is working fine here:
Thank you, but as I got the unresolved external warning, I suppose the problem is that I'm using an old commercial (xharbour.com) version. This
is the output of xBuild.
NoClose.prg(20): warning #2027: Missing prototype for 'GetConsoleWindow'.
Search all of your *.h for "GetConsoleWindow" and let me know what you
find.
Search all of your *.h for "GetConsoleWindow" and let me know what you
find.
Wincon.h
#if (_WIN32_WINNT >= 0x0500)
....
....
....
WINBASEAPI HWND APIENTRY GetConsoleWindow(VOID);
#endif /* _WIN32_WINNT >= 0x0500 */
Try to add
#include "windows.h"
#include "wincon.h" <-- THIS
and report back.
Finally I found the solution!
#define _WIN32_WINNT 0x0500
#include "windows.h"
#include "wincon.h"
HB_FUNC( DISABLECLOSEBUTTON )
{
Thank you for you support!
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 74 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 01:41:07 |
| Calls: | 1,194 |
| Files: | 1,353 |
| D/L today: |
2 files (1,590K bytes) |
| Messages: | 290,985 |