[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Border Painting in MFC

Posted on 1997-01-18
1
Medium Priority
?
1,549 Views
Last Modified: 2013-12-03
I need to control the painting of the border of CWnd derived classes. I can do this for some windows by handling the WM_NCPAINT message to over-draw the existing border. However, it other classes derived from CWnd, such as CTabCtrl and CEdit, the border is drawn after recieving the WM_NCPAINT message and I have not been able to prevent the border from being drawn. In general, I wish to control the painting of borders in all types of windows. How can I do this?
0
Comment
Question by:cmahle
1 Comment
 
LVL 1

Accepted Solution

by:
gtschech earned 100 total points
ID: 1298607
A way to achieve this should be to create the windows without the WS_BORDER style (modify the style parameter in the PreCreateWindow() method),
and then reacting to the WM_NCCALCSIZE message (OnNcCalcsize()) with modification of the client area; see the MSDev explanation of OnNcCalcSize(). There is no other possibility to prevent en edit control from drawing it's border.

There may even be no chance to modify a combo box button, because this is always drawn.

I have another idea, but maybe try this first.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

This tutorial is about how to put some of your C++ program's functionality into a standard DLL, and how to make working with the EXE and the DLL simple and seamless.   We'll be using Microsoft Visual Studio 2008 and we will cut out the noise; that i…
After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…

831 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