Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Problems creatinf 3D Controls

Posted on 2003-11-13
6
Medium Priority
?
205 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 500 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

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

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: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
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.
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

636 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