Why the MAIN Window always behind the CHILD Windows?
Moderator: Rathinagiri
Why the MAIN Window always behind the CHILD Windows?
.
Last edited by bootwan on Sat Jun 26, 2010 3:53 pm, edited 1 time in total.
Re: Why the MAIN Window always behind the CHILD Windows?
.
Last edited by bootwan on Sat Jun 26, 2010 3:53 pm, edited 1 time in total.
- Rathinagiri
- Posts: 5482
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Why the MAIN Window always behind the CHILD Windows?
IMHO it is not only the property of HMG but also the property of Win32, or even GTK. Please try GIMP. Or open MS-Excel. Press Ctrl+F (search window). The search window is a child window, which will always be in front of the main window! So, the main window will be behind a child window.
In GUI applications, main window is a background window and all operations are handled through either child windows or modal windows. If you want to handle both main and child windows at a time, it has to be designed such that, there will be space for both the windows. (Like HMG-IDE)
In GUI applications, main window is a background window and all operations are handled through either child windows or modal windows. If you want to handle both main and child windows at a time, it has to be designed such that, there will be space for both the windows. (Like HMG-IDE)
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
Re: Why the MAIN Window always behind the CHILD Windows?
.
Last edited by bootwan on Sat Jun 26, 2010 3:52 pm, edited 1 time in total.
Re: Why the MAIN Window always behind the CHILD Windows?
Hi,bootwan wrote:There is no one reply. I show the pictures to explain it.
The following application has a MAIN window "Program Main Menu" with TREE control in it for user to choosing program item.
If we open CHILD forms (Customers, Suppliers and Employees), we can see the whole form by click the title of form.
But it will not show the whole form when we click the MAIN window "Program Main Menu"
Try to use WINDOWTYPE STANDARD instead of WINDOWTYPE CHILD for child windows
Hope that helps
Kind Regards,
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
- Rathinagiri
- Posts: 5482
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Why the MAIN Window always behind the CHILD Windows?
Thanks for the info Grigory. 
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
Re: Why the MAIN Window always behind the CHILD Windows?
.
Last edited by bootwan on Sat Jun 26, 2010 3:52 pm, edited 1 time in total.
Re: Why the MAIN Window always behind the CHILD Windows?
.
Last edited by bootwan on Sat Jun 26, 2010 3:51 pm, edited 1 time in total.
- Rathinagiri
- Posts: 5482
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Why the MAIN Window always behind the CHILD Windows?
You can't call C functions like this. We have to pass the necessary variables to the C functions via 'HB_FUNC'.
Consider your code:
And, hb_bitor, hb_bitand,hb_bitnot can not be used inside C Code. We have to find some equivalent functions in C.
Consider your code:
Code: Select all
STATIC FUNCTION ShowInTaskBar(cFormName, lVisible)
LOCAL hWnd, nStyle
hWnd := GetFormHandle(cFormName)
if lVisible
HBSetWindowLong(hWnd,1)
else
HBSetWindowLong(hWnd,0)
endif
RETURN NIL
#pragma BEGINDUMP
#include <windows.h>
#include <commctrl.h>
#include "hbapi.h"
#include <wingdi.h>
HB_FUNC ( HBSETWINDOWLONG )
{
HWND hWnd1;
hWnd1 = (HWND) hb_parnl (1);
if (hb_parni(2) = 1)
{
SetWindowLong( hWnd1, GWL_EXSTYLE, HB_BITOR( GetWindowLong(hWnd1, GWL_EXSTYLE), WS_EX_APPWINDOW ) );
}
else
{
SetWindowLong( hWnd1, GWL_EXSTYLE, HB_BITAND( GetWindowLong(hWnd1, GWL_EXSTYLE), HB_BITNOT(WS_EX_APPWINDOW) ) ) ;
}
}
#pragma ENDDUMP
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
- Roberto Lopez
- HMG Founder
- Posts: 4023
- Joined: Wed Jul 30, 2008 6:43 pm
Re: Why the MAIN Window always behind the CHILD Windows?
Child windows does not appear on taskbarbootwan wrote:Great! Great!
It appears as what I wanted.
Thanks to gfilatov.
Another question is how to hide the standard forms from TaskBar?
Cause HMG has no the property "ShowInTaskbar".
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)