Page 2 of 2

Re: Why the MAIN Window always behind the CHILD Windows?

Posted: Wed Jun 02, 2010 2:13 pm
by bootwan
.

Re: Why the MAIN Window always behind the CHILD Windows?

Posted: Wed Jun 02, 2010 2:46 pm
by bootwan
.

Re: Why the MAIN Window always behind the CHILD Windows?

Posted: Wed Jun 02, 2010 3:09 pm
by Rathinagiri
Sorry Bootwan,

I had seen the API reference and could not understand about the third parameter of setwindowlong() function. I think somebody with strong 'C' base like Grigory/Roberto can help you.

Re: Why the MAIN Window always behind the CHILD Windows?

Posted: Wed Jun 02, 2010 3:53 pm
by Roberto Lopez
bootwan wrote:
Roberto Lopez wrote: Child windows does not appear on taskbar ;)
Hi, Roberto
The HMG author appears finally. :D
I known that child-windows will not appear on taskbar.
The HMG must has a MAIN window and I don't want to use the common menu-type style interface, thus the MAIN window just is a background with menu simply. It must set to MAXMIZED and occupies the whole desktop then CHILD windows work on it.
This subject of topic and the attached picture on the 2nd reply show what I meant.
Why I must use the different user interface? I don't know.
The program functions display in TREE structures maybe more clear to end-user, I think.
And I did it in VB6, The end-user responsed well and nice.
Why I choose HMG? Why not FIVEWIN?
Because I must combine pure DOS workstations and Windows computers via Novell Netware files sharing,
And I believed you Roberto, you will do maximizing efforts on MiniGUI in the future.
So, The GUI interface is very very important thing about me to dealing with CLIPPER codes,
I don't want any API in my codes, just make it simply and clear to use.
And I hope you can add more and more events/properties/methods/functions in MiniGUI (ex. the Forms' ShowInTaskbar.... and the controls' KeyPress, KeyUp, KeyDown, MouseOver, MouseLeave, MouseUp, MouseDown), and don't forget to update the document, I found some functions are undocumented.
Sorry about my poor english. :lol:
Main window can be considered as some kind of 'application object'.

It means that the start and end of the main window usually will be the start and end of your GUI app.

I've designed so for simplicity.

So, main window must always exist even you decided to not show that.

The way in that child and standard windows works is as described on this thread.

Re: Why the MAIN Window always behind the CHILD Windows?

Posted: Thu Jun 03, 2010 2:22 am
by bootwan
.

Re: Why the MAIN Window always behind the CHILD Windows?

Posted: Thu Jun 03, 2010 3:21 am
by Roberto Lopez
bootwan wrote: I'm discouraged about this forum.
All we here, try to help each others the best way we can.

When someone knows the answer to a question, then the question is quickly answered.

Some questions could require a little research to be properly answered and others could be answered simply by looking a little to samples or HMG sources.

If you run a search for SetWindowLong at \source, you'll get a sample of use in c_radio.c, but you'll have your definitive answer when apply that you've learned from sources in a test app (in your case, changing windows styles).

I'll like to see the results of your experiences. That could be useful for other users here.

Thanks in advance.

Re: Why the MAIN Window always behind the CHILD Windows?

Posted: Thu Jun 03, 2010 3:49 am
by Rathinagiri
bootwan wrote:
rathinagiri wrote:Sorry Bootwan,

I had seen the API reference and could not understand about the third parameter of setwindowlong() function. I think somebody with strong 'C' base like Grigory/Roberto can help you.
You are stingy I felt suddenly.
Is it so hard to answer the coversions of hb_bitor, hb_bitand,hb_bitnot in C routine for you?
I'm discuraged about this forum.
I feel really sorry :( for you friend.

Basically I don't know C well. Honestly I didn't even hear about 'hb_bitor, and, not' functions and use them even once. Combining these two, came my answer. Sorry that I couldn't help you in this regard. However, I am thinking of a different approach to your problem, which I would check and revert back.

Re: Why the MAIN Window always behind the CHILD Windows?

Posted: Thu Jun 03, 2010 4:22 am
by Rathinagiri
I think I had found out a method to create standard windows but hide them in task bar.

Here is a small sample. Click the button to create as many standard windows as required. They will not be shown in the task bar. :)

Code: Select all

#include <hmg.ch>

Function Main
public n := 1
define window x at 0,0 width 300 height 100 main
   define button a
      row 10
      col 10
      caption "click"
      action createnewwindow()
   end button
end window
x.center
x.activate 
Return

function createnewwindow
local wname := "window_" + alltrim(str(n))
n := n + 1 
define window &wname at 0,0 width 200 height 100 windowtype standard title wname on init hideintaskbar(wname) 

end window
center window &wname
activate window &wname 
return nil

FUNCTION HideInTaskBar(cFormName)
LOCAL hWnd
hWnd   := GetFormHandle(cFormName)
HBHideWindow(hWnd)
RETURN NIL

#pragma BEGINDUMP

#include <windows.h>
#include <commctrl.h>
#include "hbapi.h"
#include <wingdi.h>

HB_FUNC ( HBHIDEWINDOW  )
{
   HWND hWnd1;
   hWnd1 = (HWND) hb_parnl (1);
   ShowWindow(hWnd1, SW_HIDE) ;
   SetWindowLong(hWnd1, GWL_EXSTYLE, WS_EX_TOOLWINDOW ) ;
   ShowWindow(hWnd1, SW_SHOW) ;
}

#pragma ENDDUMP
Thanks for this site. :)

http://delphi.about.com/od/kbwinshell/a ... other1.htm

Re: Why the MAIN Window always behind the CHILD Windows?

Posted: Thu Jun 03, 2010 5:43 am
by Alex Gustow
Hi Rathi! Very useful thing! Thanks for sample - and for pointing to delphi.about.com too.