Solved

Problems creatinf 3D Controls

Posted on 2003-11-13
6
198 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

724 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