?
Solved

window region and resizing

Posted on 2000-03-28
2
Medium Priority
?
273 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 300 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses
Course of the Month13 days, 21 hours left to enroll

801 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