Difference when drawing with Brush Programming Software Development by pritaeas … when I subclass TGraphicControl versus TCustomControl. The expected behaviour occurs when using the TCustomControl descendant. Each paint starts with… Vcl.Buttons; type TCard = class(TGraphicControl) // Change to TCustomControl to view the difference private FBackColor: TColor; FBrushBitmap: TBitmap; … Paint not painting properly Programming Software Development by stinkypete …]->resizeWindow(w, h); } } __fastcall editor::editor(TComponent* Owner) : TCustomControl(Owner) { Color = clGreen; Left = 0; Top = 0; Height …tabs[20]; class editor *eds[20]; }; class editor : public TCustomControl { public: __fastcall editor(TComponent* Owner); void __fastcall Paint(); void… Rounded corners - one more time Programming Software Development by bob on whidbey I've created a playing card descendent of TCustomControl and I want it to have rounded corners. The card … Re: Difference when drawing with Brush Programming Software Development by pritaeas The only thing I can think of as to why this is happening, is that the custom control has it's own message loop (windows handle), whereas the graphic control does not. Still, any references to a definite answer are welcomed. Re: Paint not painting properly Programming Software Development by raptr_dflo I haven't tried whichever GUI SDK you're using, but I'm concerned about the lack of information provided to the Canvas object. How does -it- know which font to use? Does the same tab always display the same way (whether correctly or incorrectly), or will it display one way, and then if you go to another tab and come back to the first one, it … Re: Paint not painting properly Programming Software Development by stinkypete Thanks for replying. I have added [CODE] Canvas->Font->Name = "Fixedsys"; Canvas->Font->Size = 9; [/CODE] into my setCanvas method which seems to have addressed the font problem. I have just run the program and tabs 6, 11, 16, 17, 18, 19 display correctly, and all the others don't. They just show a green window … Re: Paint not painting properly Programming Software Development by raptr_dflo Hmmm, I just noticed you included the keyword 'class' at line 11 of your header file above. Instead I think what you need to do is "forward declare" your editor class by adding a single line before line 3: [CODE] class editor; [/CODE] and then remove the word "class" in front of "editor" inside your Tmixala class. … Re: Paint not painting properly Programming Software Development by stinkypete I have made the forward declaration change you suggested. TCanvas does not seem to have any size. At least, there are no properties that suggest they might contain the size. I was a bit premature when I said that naming and sizing the canvas's font had fixed it: the second and subsequent times a tab is selected the text size, and colour may … Re: Rounded corners - one more time Programming Software Development by glindhot Try the function [code]RoundRect(DC: HDC; X1, Y1, X2, Y2, X3, Y3: Integer) : Bool;[/code] I've never got around to using it, but it says in the book "Draws a rectangle with rounded corners using the selected pen and filled using the selected brush." Re: Rounded corners - one more time Programming Software Development by Duoas Regions are for windows. [I]Not[/I] for painting. You should be able to set the [B]transparent[/B] and [B]transparentColor[/B] properties of the bitmap before [B]draw[/B]ing it in your paint procedure. Hope this helps. Re: Rounded corners - one more time Programming Software Development by bob on whidbey As the card is dragged from the gray side to the green "table" the background will change. Depending on where the card is, some of the time 1 or 2 corners will have a green background and 3 or 2 will have gray corners. Sometimes even half and half as the corner is about 3 x 2 pixels. When I set the transparent color (to the unique … Re: Rounded corners - one more time Programming Software Development by Duoas So your card [I]is[/I] actually a separate window? If it is just the problem of dragging the card across different components on a single form, you can use a TPaintBox (found in the System tab of the components palette) to draw on the form directly. Then you could avoid using a separate window and window regions...