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
Solved

window region and resizing

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Add content to output file 4 67
How to convert MFC::CString to UTF8 wchar_t* 10 279
Problem to open Excel file 15 175
x-bar in Google Sheets 2 70
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
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…
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.

861 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