Solved

Problems creatinf 3D Controls

Posted on 2003-11-13
6
162 Views
Last Modified: 2013-11-20
Hi,
I'm new with MFC. I'm trying to develop an application where I need create my controls manually. I try to create a CEdit control using the Create(...) function, and it works, but I can´t get a 3D look, and when I try it with the CSpinButtonCtrl and the CButton, I don´t get anything.
Does somebody know what´s is going on ?
Excuse my poor English, Pablo.
0
Comment
Question by:latacita
  • 2
6 Comments
 
LVL 13

Expert Comment

by:SteH
ID: 9739849
In my dlg based app created with the app wizard during WinApp::InitInstance () the following lines appear
#ifdef _AFXDLL
      Enable3dControls();                  // Call this when using MFC in a shared DLL
#else
      Enable3dControlsStatic();      // Call this when linking to MFC statically
#endif
Are these missing in your app?

Assure that the following style is set for those controls
WS_EX_CLIENTEDGE   Specifies that a window has a 3D look — that is, a border with a sunken edge.
Either using CreateEx () if available or using
ModifyStyleEx ().



0
 

Author Comment

by:latacita
ID: 9740535
Thank for your answer, I've tried that, but the problem is just that when I used the ModifyStyle function, the system does nothing, and it returns an ok code, so the fucntion looks work right.
Have you ever seen something like that ?
Thanks, Pablo.
0
 
LVL 13

Accepted Solution

by:
SteH earned 125 total points
ID: 9740615
You are aware of the fact that the first parameter in the call to
ModifyStyleEx are the flags to be removed? The second one contains the flags to be added.

Another tool which could help is Spy++. Use it to get the window styles of the controls you created. Then you can see whether the style is set and you have to look somewhere else.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
How to calculate times for developing software? 8 60
Perl Awk Need Help 3 94
matchUp  challenge 6 48
Fibonacci challenge 11 82
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

707 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now