UPDATE: Still no SetWindowRgn

The place to bring up any design issues, or post your own creations

Moderator: Moderator Team

michael79

UPDATE: Still no SetWindowRgn

Post by michael79 » Tue May 08, 2007 10:27 pm

Hi devs!

SetWindowRgn still doesn't work on 0.3.1.
If someone could work on it I could make
ReactOS UI rock! I'm working on a window
frame (and more...) skinning app that should
work on ReactOS. The problem is that
SetWindowRgn does NOT clip the window.
For example, applying a region on the Calculator
accessory makes the window inaccessible (as if
a 0,0,0,0 region has been applied) but the window
still displays normally as if no region was set.
Resetting the region works.
Please debug this very basic win32 api!

Thanks,

Michael
It's NOT. I beleive TrueTransparency does
not use Regions but make itself parent of the application
(this DOES PARTIALLY work on ReactOS) and traps
Window creation (this DOES NOT work).
I made a test to change a parent's window. It works but
the window does not display at correct location.
[/b]
Last edited by michael79 on Mon Aug 20, 2007 3:28 pm, edited 2 times in total.

Haos
Test Team
Posts: 2954
Joined: Thu Mar 22, 2007 5:42 am
Contact:

Post by Haos » Tue May 08, 2007 11:04 pm

Guys, please!! UI is really the least important thing now if one cant even boot ROS on real hardware! Basic things still are missing, SetWindowRgn as well, but every single api needs a lots of time, research and coding.

Michael79 if you really wanna help, try to research this API. This could make it easier for some dev to code it. Posting in "I want this, i want that" style is prolly gonna be ignored.

michael79

Post by michael79 » Tue May 08, 2007 11:08 pm

Haos wrote:Guys, please!! UI is really the least important thing now if one cant even boot ROS on real hardware! Basic things still are missing, SetWindowRgn as well, but every single api needs a lots of time, research and coding.
ReactOS has forgot Windows history. Windows was first created
to create a user interface for DOS.
Haos wrote:Michael79 if you really wanna help, try to research this API. This could make it easier for some dev to code it. Posting in "I want this, i want that" style is prolly gonna be ignored.
If ReactOS wants to provide a good alternative to Windows
the API should work. So I'm simply reporting a
problem with this well documented function!

Haos
Test Team
Posts: 2954
Joined: Thu Mar 22, 2007 5:42 am
Contact:

Post by Haos » Tue May 08, 2007 11:24 pm

ReactOS has forgot Windows history. Windows was first created
to create a user interface for DOS.
Define Windows... there is 1.0-3.11, Win9x and NT period. Of what period of Windows history are you talking?
If ReactOS wants to provide a good alternative to Windows
the API should work. So I'm simply reporting a
problem with this well documented function!
PnP, MM, semgr, DirectX, ntfs, npfs, i/o, modern storage stack and MANY MANY MORE! Would you like to provide a full list then?
YES! Win32 isnt completed yet! same as other Windows API! We are fully aware of this situation. You dont need to point out the missing pieces, as there are still more of the missing than complete ones. If this API is well documented, please provide those docs, then proof-test them if you`re talking about MSDN, as this source is OFTEN INCORRECT!

Phobos
Posts: 96
Joined: Mon Feb 19, 2007 10:50 pm

Post by Phobos » Tue May 08, 2007 11:24 pm

michael79 wrote:ReactOS has forgot Windows history. Windows was first created to create a user interface for DOS.
heh, that was windows 95 and 98... this is windows NT :P

anyways, as you yourself said, first there was DOS, THEN windows.... not the other way around
michael79 wrote:If ReactOS wants to provide a good alternative to Windows the API should work. So I'm simply reporting a problem with this well documented function!


there are other things that must be done before the UI, but as haos said, you can always collaborate in better ways than saying what doesn't work yet hehe

Ged
Developer
Posts: 925
Joined: Thu Sep 29, 2005 3:00 pm
Location: UK

Post by Ged » Tue May 08, 2007 11:57 pm

If this is a valid bug, please file it in bugzilla preferably with a screenshot of the said problem.

Bugs like this are very important, esspecially when our GDI is being actively worked on, as it is now.

EmuandCo
Developer
Posts: 4317
Joined: Sun Nov 28, 2004 7:52 pm
Location: Germany, Bavaria, Steinfeld
Contact:

Post by EmuandCo » Wed May 09, 2007 11:24 am

michael79, thats why its called Alpha Stage. I think you agree if the devs say ther's more important stuff than the GUI right now. I do!

mf
Developer
Posts: 368
Joined: Mon Dec 27, 2004 2:37 pm
Location: Eindhoven, NL
Contact:

Post by mf » Wed May 09, 2007 11:35 am

Wow, all the useless topics in here get 100+ enthusiast replies, and the first valid one I see coming along in at least a year gets shot down with "ReactOS is alpha" crap.

As Ged said, please file a bugzilla report and/or go on IRC to see if you can get proactively involved in fixing the bug (letting a developer know about it, and test with him). Thanks.
It compiles, let's ship it!

EmuandCo
Developer
Posts: 4317
Joined: Sun Nov 28, 2004 7:52 pm
Location: Germany, Bavaria, Steinfeld
Contact:

Post by EmuandCo » Wed May 09, 2007 11:51 am

mf: You know very well that it was not meant this way. It was a simple reply to this Windows history discussion. Of course Ged is right and a Bugreport has to be filed.

michael79

Post by michael79 » Tue Jun 05, 2007 9:20 pm

mf wrote:Wow, all the useless topics in here get 100+ enthusiast replies, and the first valid one I see coming along in at least a year gets shot down with "ReactOS is alpha" crap.

As Ged said, please file a bugzilla report and/or go on IRC to see if you can get proactively involved in fixing the bug (letting a developer know about it, and test with him). Thanks.
one word. thanks :wink:

Reacter
Posts: 326
Joined: Tue Feb 06, 2007 9:57 pm
Location: Tornado Alley

Post by Reacter » Wed Jun 06, 2007 7:15 am

Just keep on screwing around with it, if all of the sudden it disappears because of some other bug causing this one, that would be nice. Otherwise, it is on our bug list until we shake it.
More ReactOS, please!

Dr. Fred
Developer
Posts: 607
Joined: Wed Dec 22, 2004 10:09 pm
Location: Amsterdam

Post by Dr. Fred » Wed Jun 06, 2007 1:00 pm

Please write a test case.
Where do you want ReactOS to go today ?

michael79

Test Case

Post by michael79 » Tue Jun 12, 2007 12:06 pm

Dr. Fred wrote:Please write a test case.
The only thing I can say is that creating a Region seem
to work since it returns a value.
But applying the region to a window does not. The window
is still displayed entirely but does not react to user
interraction anymore.
Maybe the region is not created properly (despite it returns
a value) or maybe the region is not applied propertly to
the window.
Hope it helps.

mf
Developer
Posts: 368
Joined: Mon Dec 27, 2004 2:37 pm
Location: Eindhoven, NL
Contact:

Re: Test Case

Post by mf » Tue Jun 12, 2007 10:50 pm

michael79 wrote:
Dr. Fred wrote:Please write a test case.
The only thing I can say is that creating a Region seem
to work since it returns a value.
But applying the region to a window does not. The window
is still displayed entirely but does not react to user
interraction anymore.
Maybe the region is not created properly (despite it returns
a value) or maybe the region is not applied propertly to
the window.
Hope it helps.
A test case is a piece of code that shows the wrong (or right) behaviour. So, please write a tiny app that uses SetWindowRgn, and that works on Windows, but fails on ReactOS (as it is now), and submit that to the mailing list.
It compiles, let's ship it!

michael79

Re: Test Case

Post by michael79 » Tue Jun 12, 2007 11:06 pm

mf wrote:
michael79 wrote:
Dr. Fred wrote:Please write a test case.
The only thing I can say is that creating a Region seem
to work since it returns a value.
But applying the region to a window does not. The window
is still displayed entirely but does not react to user
interraction anymore.
Maybe the region is not created properly (despite it returns
a value) or maybe the region is not applied propertly to
the window.
Hope it helps.
A test case is a piece of code that shows the wrong (or right) behaviour. So, please write a tiny app that uses SetWindowRgn, and that works on Windows, but fails on ReactOS (as it is now), and submit that to the mailing list.
I don't program in C but the code is so simple that you might figure out
why it does not work:

Code: Select all

Type Point
  X As Long
  Y As Long
End Type

Type Rectangle
  Left As Long
  Top As Long
  Right As Long
  Bottom As Long
End Type

Declare Function CreateRectRgn Lib "gdi32" Alias "CreateRectRgn" (ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
Declare Function SetWindowRgn Lib "user32" Alias "SetWindowRgn" (ByVal HWnd As Long, ByVal hRgn As Long, ByVal bRedraw As Long) As Long
Declare Function DeleteObject Lib "gdi32" Alias "DeleteObject" (ByVal hObject As Long) As Long
Declare Function GetWindowRect Lib "user32" Alias "GetWindowRect" (ByVal HWnd As Long, lpRect As Rectangle) As Long
Declare Function ScreenToClient Lib "user32" Alias "ScreenToClient" (ByVal HWnd As Long, lpPoint As Point) As Long

Sub RemoveControlBorder(HWnd As Long, BorderSize As Long)
  Dim Rgn As Long
  Dim Rect As Rectangle
  GetWindowRect HWnd, Rect
  Dim Size As Point
  Size.X = Rect.Right
  Size.Y = Rect.Bottom
  ScreenToClient HWnd, Size
  Rgn = CreateRectRgn(BorderSize, BorderSize, Size.X - BorderSize, Size.Y - BorderSize)
  SetWindowRgn HWnd, Rgn, True
  DeleteObject Rgn
End Sub

Dim Form As QForm

RemoveControlBorder Form.Handle, 3

Form.ShowModal

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest