Click here to Skip to main content
15,897,518 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Not able to get Text From Rich Edit Pin
GauranG Shah18-Sep-07 4:09
GauranG Shah18-Sep-07 4:09 
QuestionRe: Not able to get Text From Rich Edit Pin
David Crow18-Sep-07 4:31
David Crow18-Sep-07 4:31 
AnswerRe: Not able to get Text From Rich Edit Pin
GauranG Shah18-Sep-07 18:36
GauranG Shah18-Sep-07 18:36 
GeneralRe: Not able to get Text From Rich Edit Pin
David Crow19-Sep-07 2:35
David Crow19-Sep-07 2:35 
Answer[OT] Pin
David Crow18-Sep-07 3:02
David Crow18-Sep-07 3:02 
QuestionHow to Use IActiveDesktop Interface in vc++ Pin
padpras18-Sep-07 0:29
padpras18-Sep-07 0:29 
AnswerRe: How to Use IActiveDesktop Interface in vc++ Pin
Hamid_RT18-Sep-07 2:54
Hamid_RT18-Sep-07 2:54 
QuestionMFC Custom Control Problem Pin
Jinzuu18-Sep-07 0:16
Jinzuu18-Sep-07 0:16 
Hi there,

I've got a weird problem with Subclassing in MFC:
What I want is the following:
I want to create a custom control (CRotarySlider) based on the CSliderCtrl-Class of MFC. I want to disable the Paint-Function of the CSliderCtrl and draw myself.

Now I did this by overriding the OnPaint() and NOT calling the CSliderCtrl::OnPaint().
Also I want to create a MemDC and draw to this DC and then simply BitBlt the MemDC to the DC of the OnPaint() Function.
In a Test-Application where I create one of my SliderCtrl it all works out fine.
I put a CSliderCtrl onto the Dialog, then add a Member-Variable to the Dialog.h:
CRotarySlider m_mySlider;
Also, I add the control to the DoDataExchange():
DDX_Control(pDX, IDC_SLIDER1, m_mySlider);
As I said, everything works fine.
BUT: In the real project I need 10 of these Sliders. So I define them as before, but now in an array of Controls:
CRotarySlider m_mySliders[10]
and:
<br />
DDX_Control(pDX, IDC_SLIDER1,  m_mySliders[ 0]);<br />
DDX_Control(pDX, IDC_SLIDER2,  m_mySliders[ 1]);<br />
and so on.

The Dialog is created when I start the application, and shown at a specific point. But then I can't see anything of my controls.
They're not drawn.
And it seems that the creation of the MemDC fails. But I get NO message like WM_CREATE, or WM_SHOW. Nothing.
The only thing I receive is WM_CHILDACTIVATE. But at that time my DC seems to be incorrect. So the compatible MemDC is also incorrect.

I hope anyone of you has an idea about that. Sorry if this post is too long, but I don't know where the error may hide so I thought I give you as much information as possible.
AnswerRe: MFC Custom Control Problem Pin
Iain Clarke, Warrior Programmer18-Sep-07 2:29
Iain Clarke, Warrior Programmer18-Sep-07 2:29 
GeneralRe: MFC Custom Control Problem Pin
Jinzuu20-Sep-07 5:52
Jinzuu20-Sep-07 5:52 
GeneralRe: MFC Custom Control Problem Pin
Iain Clarke, Warrior Programmer20-Sep-07 6:34
Iain Clarke, Warrior Programmer20-Sep-07 6:34 
Questionopengl in mfc Pin
saisp17-Sep-07 23:40
saisp17-Sep-07 23:40 
AnswerRe: opengl in mfc Pin
Russell'18-Sep-07 1:00
Russell'18-Sep-07 1:00 
QuestionAn Multi Thread SDI application Pin
Marimuthu.r17-Sep-07 23:26
Marimuthu.r17-Sep-07 23:26 
AnswerRe: An Multi Thread SDI application Pin
baerten18-Sep-07 0:10
baerten18-Sep-07 0:10 
GeneralRe: An Multi Thread SDI application Pin
Marimuthu.r18-Sep-07 1:19
Marimuthu.r18-Sep-07 1:19 
GeneralRe: An Multi Thread SDI application Pin
Waldermort18-Sep-07 2:34
Waldermort18-Sep-07 2:34 
AnswerRe: An Multi Thread SDI application Pin
Russell'18-Sep-07 0:10
Russell'18-Sep-07 0:10 
AnswerRe: An Multi Thread SDI application Pin
Cliff Hatch18-Sep-07 9:04
Cliff Hatch18-Sep-07 9:04 
QuestionON_COMMAND_EX Pin
Rockone17-Sep-07 22:25
Rockone17-Sep-07 22:25 
AnswerRe: ON_COMMAND_EX Pin
ashukasama17-Sep-07 22:57
ashukasama17-Sep-07 22:57 
GeneralRe: ON_COMMAND_EX Pin
Rockone17-Sep-07 23:20
Rockone17-Sep-07 23:20 
QuestionRe: ON_COMMAND_EX Pin
David Crow18-Sep-07 3:09
David Crow18-Sep-07 3:09 
AnswerRe: ON_COMMAND_EX Pin
Rockone18-Sep-07 16:12
Rockone18-Sep-07 16:12 
QuestionRe: ON_COMMAND_EX Pin
David Crow19-Sep-07 2:40
David Crow19-Sep-07 2:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.