Solved

window region and resizing

Posted on 2000-03-28
2
270 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Show shut-down message as Windows 8 shuts down. 9 107
repeatSeparator  java  challenge 13 58
Expand data scrubbing tool 13 36
WinWaitActive parameters 12 31
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
In this post we will learn different types of Android Layout and some basics of an Android App.
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.

726 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