I was searching for a article on how to create non-rectangular window that can be resized and found the following pdf document.
http://www.ratedog.com/cpp/nonrect.pdf You will definitely like this.
I am trying to set the Roundrect region for a CStatic control using SetWindowRgn() in order to set rounded bmp in the control. SetWindowRgn() works properly for the first time, but the second time when is call the same function again in the On Paint function the controls comes up with the orginal rect
Please let me know if there is any solution or work around
How do i create a programme in Vc++ to create a Small Bitmap Sizing to the Thubnail Running Above my Task Bar. I got Some exe's from net That is a share ware. That A bird flying on my desktop or a Cat running above my taskbar that type i wan to make .
How does the OS does it, ie, create non-rectangular windows.
ISSUE: When I hover the mouse on a window, the OS must determine on which window the mouse is currently on. So that the mouse-move message is put to the right window's queue. Same goes for all the messages, not excluding wm_paint.
For a rectangular window, this is easy. One needs say four comparisons to find out if the current mouse position is within a particular window.
How does the system do it for non-rectangular windows. For ellipitical windows, using the simple equation of an ellipse can do. But I have no idea if the OS does this.
For the regions created from bitmap, one way would be to check the bitmap again to see if the click was inside the window. But I have no idea if the OS does this.
I cannot figure out how to persistently change the clipping region of a child window control.
I have a rich edit control (non-mfc... created with CreateWindowEx), and I want to change the visible area of the control dynamically. There seem to be three approaches, and I cannot seem to figure out how to get any of them to work:
1. Call SetWindowRgn() on the child window control: this weirdly enough seems to make the specified region invisible, rather than visible, and is not persistent (the next InvalidateRect call re-draws the region.
2. Call SelectClipRgn(): this isn't persistent after the display context is released. The following code for example completely ignores my call to SelectClipRgn():
3. Intercept the WM_PAINT message of the control, and change the clipping region before the control is painted. The problem here is that I don't know how to intercept the child window WM_PAINT message without completely re-writing the control, and that doesn't seem to be the right solution.
Chief Technology Officer
It works great!! and shows the window with the specified
region but if the window is dragged then the phantom lines
which are shown while dragging shows the default rectangular
region rather then the windows visible region.
Can u suggest some way to solve it..
Don't work. Only caption displays. What am I doing wrong?
// Declare the application class
class CHelloApp : public CWinApp
virtual BOOL InitInstance();
// Create an instance of the application class
// Declare the main window class
class CHelloWindow : public CFrameWnd
// The InitInstance function is called each
// time the application first executes.
m_pMainWnd = new CHelloWindow();
// The constructor for the window class
// Create the window itself
"The Big Push",
CRect(0,0,600,400)); // x,y top-left - x,y bottom-right corner