Solved

window region and resizing

Posted on 2000-03-28
2
272 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
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.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…

717 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