Click here to Skip to main content
15,902,032 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All

My problem is simple to explain. In my dialog based app I create a control using CWnd::Create function. It creates it propperly but with no border, I've added WS_BORDER style to the CWnd::Create call but no change, it's still without border. I've tried clling ModifyStyle(0, WS_BORDER) but no result again. I've googled the problem but nothing came out.

Any help will be appreciated!
Posted

I've found the solution myself, here it is:

CWnd::CreateEx(WS_EX_CLIENTEDGE, "STATIC", "", uiFlags, refRect, pParent, uiID);


So if you want to create control with sunken border that the style is WS_EX_CLIENTEDGE not WS_BORDER ;)
 
Share this answer
 
Try using CreateEx or ModifyStyleEx
 
Share this answer
 
Comments
Ivan Ivanov 83 2-Aug-10 4:32am    
No result. Besides WS_BORDER isn't an extended style, it's basic style, but anyway thanks for the try :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900