I've learnt earlier that we just have to check "Group" property of the first radio button to group the subsequent radio buttons under it. However after some time, i decided to add another 2 radio buttons on the dialog box. Visually, it's just below the previous radio buttons.However i don't know how to place them under the previous group of radion buttons.... can anyone help? thanks
raner
Posts
-
group radio button -
Multiple Line EditHi while we are at it, i was wondering if we can do bolding, using similar method, as well?
-
Multiple Line EditHey it works! Thanks alot!:laugh:
-
Multiple Line EditI want to update some text to an edit box (UpdateData(FALSE)), however i find the words displayed in a long single line...I've changed the style of the edit box to Multiline (and checked AutoVSCroll and Vertical Scroll) , but it doesnt automatically display the text in multiline form. I tried m_csText ="i want \n mulitline" too...but it doesnt work. anyone know why or what to do? thks
-
urgent..How to use GetDeviceCaps() n GetPixel() problemGuess it'll have to read up on that. But do you know how do i test after i've BitBlt it to offscreen bitmap? thks
-
urgent..How to use GetDeviceCaps() n GetPixel() problembool bPelSupport=dc->GetDeviceCaps(RASTERCAPS)!=RC_NONE;
gives me compilation error...should there be a bracket somewhere? anyway my dc is defined as below,in my CView class...so shouldnt it have pixels?..CDC *dc=this->GetDC();
Anyway how do i render to an offscreen bitmap? thks -
urgent..How to use GetDeviceCaps() n GetPixel() problemmy pgm was using GetPixel() function, but i realize not all device support the function and that we can use GetDeviceCap() to check its RC_BITBLT capability. so though i'm not exactly sure how to use the function, i tried the following..
int test = dc->GetDeviceCaps(RASTERCAPS);
(1)It returns me a negative value(-4349)...what does this mean? What shld the function return me if my device has RC_BITBLT capability anyway? (2)If my device doesnt have the capability, what can i do to have the capability? And what determines whether a device has the capability? thks -
Error assigning values?!!:-D i c i c yes i did enable it, under project->settings->c++ language...
-
Error assigning values?!!;Poops...i mean i did run the right statement(that below) when i got an exception error. pView = dynamic_cast(pMF->GetActiveView());
-
Error assigning values?!!It ran into exception handling error while executing pView = dynamic_cast(pMF->GetActiveView()); Anyway...is there a better way to obtain member variables of a CView class then?
-
Error assigning values?!!How do i use dynamic_cast?...sorry,i've heard of it but i've never tried anything like that..
-
Error assigning values?!!what is source control?...i thought it simply gets the MainFrame pointer and then the active view's pointer? anyway...i don't understand how GetActiveView() can just stop working?
-
Error assigning values?!!i don't know how to see that the returned pointer is a CMy3027View*..but i've only one CView-derived class so i thought it should be?
-
Error assigning values?!!oh yah, i do get the "This is the problem" message box..but what does it mean?;P
-
Error assigning values?!!Hi A very unexpected error happened...below is the code snippet.
CMy3027View *pView;
CMainFrame *pMF = (CMainFrame*)AfxGetMainWnd();
pView = (CMy3027View*)pMF->GetActiveView();m_numOfValues= pView->m_imageIndex;
where m_numOfValues is declared as a class member variable(integer), m_imageIndex is a public member variable of my CView class. 1. On debugging,pView->m_imageIndex is working fine but m_numOfValues just doesnt get assigned. It even ran into exception error. 2. In a previous version of the same program, the same method of assignment had work fine. I have no idea why it's not working suddenly. 3. When i try declaring m_numOfValues locally(in the function) instead, the assignment work fine. 4.Another problem is i declared
CMy3027View *pView;
in my class's header file, under private.But after assigning it in a member function, the subsequent functions do not see the assigned value. Anyone has any idea wat's happening? pls help.. thks
-
2 CDialog questionsi noted down your suggestions and will try them to debug my pgm..in the meantime..u have any idea where to set the message map for OnEraseBackground?...because i cant find it in the Class Wizard. really grateful for your help :-O
-
2 CDialog questionsthks for your reply. as u suggested, i try debugging and found out that OnPaint() was called and entered.Below, is relevant code snippet in OnPaint().It was found though, that "plotGraph.Plot(pDC,link)" was not executed.plotGraph is a CObject-derived class and Plot(CDC *pDC,int link) is the function definition...link var is just for my own program purpose.
CWnd\* graphFrame = (CWnd\*)GetDlgItem(IDC\_GRAPH\_FRAME); CDC\* pDC = graphFrame->GetDC(); plotGraph.Plot(pDC,link);
The odd thing is this had worked fine while i was using modal dialog boxes. any idea what is or might be wrong? a big thank you.
-
2 CDialog questions1. No, i derived CGrapDlg from CDialog,not CView, but i passed a CView parameter into its constructor because a tutorial i was following did that and because i was creating CGrapDlg from my CView class. 3. yes, plotGraph is a member of CGrapDlg and "link" is just a variable needed for my program to know where to retrieve data for my drawing purposes, it's not a handle. is there any problem with the way i'm creating the modeless dialog? thks thks
-
2 CDialog questionsthks for your previous reply about creating multiple instances :)..it's exactly what i was looking for!...(and i find your english very clear actually) as for the code, below are just some of the codes.i don't know if it's sufficient for you to find out what's going on.Actually if you don't mind emailing me your email address, i cant send you a more complete source code. in my CView class..
dlgGraph[i]=new CGrapDlg(this);
dlgGraph[i]->SetLink(i);
if (dlgGraph[i]->GetSafeHwnd()==0){
dlgGraph[i]->Create(); //displays dialog window
}
dlgGraph[i]->ModifyStyle(0,WS_VISIBLE);in my CGrapDlg...
CGrapDlg::CGrapDlg(CView *pView) //modeless constructor
:CDialog()
{
m_pView=pView;
}BOOL CGrapDlg::Create()
{
return CDialog::Create(CGrapDlg::IDD);
}void CGrapDlg::OnPaint()
{
CWnd* graphFrame = (CWnd*)GetDlgItem(IDC_GRAPH_FRAME);
CDC* pDC = graphFrame->GetDC();try{ plotGraph.Plot(pDC,link);} //plotGraph is a CObject-derived class catch(...) { AfxMessageBox("Error plotting graph.Has files been opened?"); } ReleaseDC(pDC);
}
Thanks alot, really.
-
2 CDialog questionsI tried create() and then ModifyStyle(0,WS_VISIBLE)...however i've an OnPaint() for my CDlg and it doesnt seem to be called...why is that so and what can i do?