[lazarus] Speedbutton questions
SMiller1 at stvgb.org
Mon Mar 13 16:40:11 EST 2000
I have figured out how the controls that don't have an associated window get their paint messages.
Whewn a TWinControl gets a WM_PAINT it run's through it's FCOntrols list to determine certain things about those controls. Then it calls the FControls.Perform(WM_PAINT) procedure.
This will work in our case. I have to add some code to handle this so I will hopefully finish it tomorrow or wednesday and commit it. I currently Do get a TSpeedbutton to show up when I set visible to TRUE. Once the form re-draws itself though I lose it.
Here's a problem though. When you create a TControlCanvas (which is what TGraphicsControls use) what you are doing is setting the Canvas.Handl;e to point to the parent's DC. The problem with our implementation is that if I do that before the form is actually visible and tell it to display it'll crash. It seems that the forms FIXED gtk wiget doesn't have a gdkWindow associated with it just yet. That causes a bunch of asserts to fail and you get an access violation. The asserts fail when doing the gdk_gc_new( ) and gdk_set_function in GetDC.
Someone should look into that. I'll have example code once I get this TWincontrol drawing completed.
More information about the Lazarus