Solved

window region and resizing

Posted on 2000-03-28
2
266 Views
Last Modified: 2013-11-20
Hi!

On my dialog I put a control(like Static) and then I set a region to the static(like a circle for example). When I resize the dialog I resize the static proportionally and set a new region(circle) to it(I delele old ,of course)
But what happens,that if OnPaint of the dialog is called I cannot see anymore the region rather the rect of the static,but events limited only within the region, so it behaves like regioned control and not regioned.
How can solve this problem?
0
Comment
Question by:kishori
2 Comments
 
LVL 6

Expert Comment

by:MichaelS
ID: 2663662
Can you show some code?
0
 
LVL 10

Accepted Solution

by:
RONSLOW earned 100 total points
ID: 2682608
some/most standard controls don't respect window regions.

for example, and edit control will apply the region to its border/edge, but the inner edit box client area (the white part where you type) stays rectangular.

if you want to do window regions, then use a plain CWnd and draw it yourself, rather than use a CStatic or other standard windows control.

or do all the painting yourself and limit your own painting to the region (eg. if you want something circular, only paint a cirular shape).

if this still doesn't work, try doing a RedrawWindow for the control after changing the region.  Or, better, Invalidate for the whole dialog.  it could be that the region is getting changed AFTER the dialog is repainted.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
if loop error 4 77
repeatSeparator  java  challenge 13 56
lucky13 challenge 11 112
mapBully challenge 6 92
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now