Solved

Problems creatinf 3D Controls

Posted on 2003-11-13
6
171 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
string initialization in java 11 109
fix34  challenge 9 104
Dell Alienware Graphics Amplifier Driver for non-Alienware systems 18 184
unix example issues 18 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: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
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.
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…

943 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

6 Experts available now in Live!

Get 1:1 Help Now