Solved

Problems creatinf 3D Controls

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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
WinWaitActive parameters 12 31
if loop in java 3 142
VBA "SendKeys" Syntax for Multiple Keystrokes 7 109
Problem to App source 6 41
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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 Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
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.

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