Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating an irregular shaped window

Status
Not open for further replies.

RHoare

Programmer
Nov 22, 2000
1
GB
I am wondering how to create an irregularly shaped window from C++.
Products exist, such as the Palm Pilot Emulator, which create a window in a non-rectangular shape, without the normal windows border, and bring up the normal task bar box with right-click access to minimise / move etc.
Does anyone know how this is done?
 
Assuming that you're using MFC, try calling the CWnd::SetWindowRgn function from your main window (you can do it in OnPaint in a generic CWnd). Create a CRgn object defining the coordinates of your window, and pass that into the function (type-cast to HRGN). Only the portions of your window that appear within your region's boundaries will be drawn on screen.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top