Click here to Skip to main content
15,906,567 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: std::map basic_string TCHAR - How to achieve case in-sensitive string lookup ? Pin
anand_study9-Feb-07 16:24
anand_study9-Feb-07 16:24 
GeneralRe: std::map basic_string TCHAR - How to achieve case in-sensitive string lookup ? Pin
Stuart Dootson9-Feb-07 22:47
professionalStuart Dootson9-Feb-07 22:47 
GeneralRe: std::map basic_string TCHAR - How to achieve case in-sensitive string lookup ? Pin
Sceptic Mole10-Feb-07 1:58
Sceptic Mole10-Feb-07 1:58 
Questionread and write text from edit box Pin
Siddam6-Feb-07 5:38
Siddam6-Feb-07 5:38 
Questionread and write text from edit box Pin
Siddam6-Feb-07 5:38
Siddam6-Feb-07 5:38 
AnswerRe: read and write text from edit box Pin
ThatsAlok6-Feb-07 19:49
ThatsAlok6-Feb-07 19:49 
AnswerRe: read and write text from edit box Pin
Hamid_RT14-Feb-07 18:24
Hamid_RT14-Feb-07 18:24 
QuestionWTL Radio DDX function Pin
Konrad P5-Feb-07 20:03
Konrad P5-Feb-07 20:03 
Ok,

I'm trying to figure this whole WTL thing out and it's going rough. So far I've done ok on my own scavenging code and figuring it out, but I've hit a little snag.

On my main form I have a set of 3 radio buttons. Although I'm at a loss as to how the program reads these buttons.

In my YarrView.h header I have

-------------YarrView.h--------------------

class CYarrView : public CDialogImpl<CYarrView>,
public CWinDataExchange<CYarrView>
{
public:
enum { IDD = IDD_YARR_FORM };

BOOL PreTranslateMessage(MSG* pMsg);

BEGIN_MSG_MAP(CYarrView)
END_MSG_MAP()

BEGIN_DDX_MAP(CYarrView)
DDX_RADIO(IDC_BILGE, puzzle)
END_DDX_MAP()

BOOL OnInitDialog ( HWND hwndFocus, LPARAM lParam );

int OnApply();

// For radio selection
int puzzle;
};

--------------------------------------

Now my three buttons are IDC_OPT1 IDC_OPT2 and IDC_OPT3

Looking at other peoples code, this is what they have done. And my int puzzle will hold which radio button was chosen? Now how exactly does int hold it? 0 for the first button, 1 for the second, etc? Thats what I assume and it does by what order they're listed in my resource script but a confirmation would be nice.

From my understanding I have this part right so far. The dialog IDC_YARR_FORM contains the buttons so the DDX code goes in that header file correct?

Now in my YarrView.cpp code

---------------YarrView.cpp---------------

#include "stdafx.h"
#include "resource.h"

#include "YarrView.h"

BOOL CYarrView::OnInitDialog ( HWND hwndFocus, LPARAM lParam )
{
DoDataExchange();
return TRUE;
}
int CYarrView::OnApply()
{
return DoDataExchange(true) ? PSNRET_NOERROR : PSNRET_INVALID;
}
BOOL CYarrView::PreTranslateMessage(MSG* pMsg)
{
return CWindow::IsDialogMessage(pMsg);
}

-----------------------------------

This is all the stuff needed to make sure the buttons get read correct?

From my understanding in my MainFrm.h the line

CYarrView m_view;

declared an instance of CYarrView as m_view;

so m_view.puzzle = the button I chose... Unfortunatly, I'm not getting any result from this whatsoever.

Is my code wrong and I just don't know how to read the m_view.puzzle variable properly? (Doubtful)

Could it be something in my resources?

My eyes are hurting from trying to figure this out for so long, no pounding away at others code is giving me anything D'Oh! | :doh:

Please anyone, some advice here.




Also once this is figured out, I plan on having a running process going but with the ability to just hit cancel and stop it... I thought I could just create child dialog and put the code in the OnIdle(){ //code here}; section but it turns out that it just doesnt get executed no matter how much I IdleLaugh | :laugh: .
So any direction on doing something like that would also be much appreciated.

Hopefully theres enough information here for someone to help me. If not just tell me what you need.
Now my eyes need some Sleepy | :zzz:
AnswerRe: WTL Radio DDX function Pin
Michael Dunn5-Feb-07 20:42
sitebuilderMichael Dunn5-Feb-07 20:42 
QuestionShould I build my objects as ATL project? Pin
moonreflection20003-Feb-07 9:57
moonreflection20003-Feb-07 9:57 
AnswerRe: Should I build my objects as ATL project? Pin
Dmitry Khudorozhkov9-Feb-07 8:29
Dmitry Khudorozhkov9-Feb-07 8:29 
QuestionAggregation component ? Pin
cjpvscjp2-Feb-07 21:08
cjpvscjp2-Feb-07 21:08 
QuestionExport the needed Interface Pin
aloktambi1-Feb-07 19:25
aloktambi1-Feb-07 19:25 
QuestionATL IDispEventSimpleImpl reverse order bug still present in VC++ 2005 ???? Pin
Emmanuel TB1-Feb-07 3:44
Emmanuel TB1-Feb-07 3:44 
Questioni wana show the plugin only in Outlook and wana hide in Word and Excel Pin
salman kazi1-Feb-07 0:51
salman kazi1-Feb-07 0:51 
AnswerRe: i wana show the plugin only in Outlook and wana hide in Word and Excel Pin
kltslijun1-Feb-07 21:02
kltslijun1-Feb-07 21:02 
GeneralRe: i wana show the plugin only in Outlook and wana hide in Word and Excel Pin
salman kazi8-Feb-07 18:41
salman kazi8-Feb-07 18:41 
QuestionTemplate and operator &lt;&lt; Pin
manustone30-Jan-07 23:34
manustone30-Jan-07 23:34 
AnswerRe: Template and operator &lt;&lt; Pin
prasad_som31-Jan-07 1:14
prasad_som31-Jan-07 1:14 
GeneralRe: Template and operator &lt;&lt; Pin
manustone31-Jan-07 1:44
manustone31-Jan-07 1:44 
GeneralRe: Template and operator &amp;lt;&amp;lt; Pin
prasad_som31-Jan-07 2:10
prasad_som31-Jan-07 2:10 
GeneralRe: Template and operator &lt;&lt; Pin
manustone31-Jan-07 1:55
manustone31-Jan-07 1:55 
AnswerRe: Template and operator &lt;&lt; Pin
Michael Dunn31-Jan-07 3:12
sitebuilderMichael Dunn31-Jan-07 3:12 
QuestionProblem with a Function Template Pin
manustone30-Jan-07 9:22
manustone30-Jan-07 9:22 
AnswerRe: Problem with a Function Template Pin
Michael Dunn30-Jan-07 10:15
sitebuilderMichael Dunn30-Jan-07 10:15 

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.