|
i face a problem
problem is that then i make dialog box in mfc and make its class and also make a menu then i add this menu to the the dailog box . menu contain two commands one for addition and one for updation.
i make second dialog box in mfc then i add some edit controls on it and make a class of this dailog box.
so when i click on addtion command on menu in first dialog box it display second dialog box
and when i click on updation command in menu then it will again display second dialog box but now i want that some edit controls are disabled that is they can not take value
how can i do this
plz help me whoever know this
thanks
ya u give solution but that is not solve my problem
i want to disable it from menu which is on first dailog box and i want to disable edit control on second dailog box so enablewindow demand of object and i declare object of that edit in second dialog box and in first it will not take that one
hi
-- modified at 2:28 Wednesday 7th June, 2006
|
|
|
|
|
for disable and enable controls use EnableWindow
whitesky
|
|
|
|
|
yar it will not so easy as i want to do it from menu to other dialog box
hi
|
|
|
|
|
so you need to Here[^]
whitesky
|
|
|
|
|
We have already provided a solution for your problem. What problem are you still facing
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
paras_s12 wrote: ya u give solution but that is not solve my problem
i want to disable it from menu which is on first dailog box and i want to disable edit control on second dailog box so enablewindow demand of object and i declare object of that edit in second dialog box and in first it will not take that one
Create the pointer of the Secoend dialog box into first one and access the elements/Objects through that pointer.
Hope i understood your problem.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
\\\\\\\\\\\\\\\\\\\plz help me \\\\\\\\\\\\\\\\\\
i made a class of the the first dailog box which contain menu as CAfterone
and made a class of second dialog box which contain edit boxes as CAgaindialog now i declare
CAgaindialog *pop; in the header file of the CAfterone
ass i declare it in CAfterone :: public CDialog (public mode)
////////////can i declare it any where or in the class
CAfterone :: public CDialog (public mode)////////////
then i use to call second dailog box from menu as
void CPasswordDlg::OnDel()
{
d.DoModal();
pop->GetDlgItem(IDC_EDIT)->EnableWindow(FALSE);
}
but it will not do job for me
hi
-- modified at 3:43 Wednesday 7th June, 2006
|
|
|
|
|
paras_s12 wrote: but it will not do job for me
Try to make the Variable as extern , initialise it properly before invoking the enablewindow api.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
as i make variable of edit control of the type CEdit how could i make it extern
d.DoModal();
pop->GetDlgItem(m_nemp)->EnableWindow(FALSE);
i take m_nemp as CEdit type and call it but it will give error that undefind in class one
hi
|
|
|
|
|
wrote: as i make variable of edit control of the type CEdit how could i make it extern
d.DoModal();
pop->GetDlgItem(m_nemp)->EnableWindow(FALSE);
i take m_nemp as CEdit type and call it but it will give error that undefind in class one
I mean make extern variable of the second dialog box.
access it after initialisation.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
Hi gurus,
what is the difference between following statements
int *p[10];
int (*p)[10];
what is the memory structure for both?
How to access the elements?
Thanks in advance..
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
int *p[10];
it is a two dimensional array and its elements can be accessed as
p[0][0],p[0][1].....
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
-- modified at 2:25 Wednesday 7th June, 2006
|
|
|
|
|
AnShUmAn wrote: int *p[10];
it is a two dimensional array and its elements can be accessed as
p[0][0],p[0][1].....
i think int *p[10] is array of 10 pointers.. am i right?
where we have to allocate the memory for each..
Knock out 't' from can't,
You can if you think you can
-- modified at 2:27 Wednesday 7th June, 2006
|
|
|
|
|
See for int *p[10];
<br />
int *p[2];<br />
memset(&p,0,sizeof(int[2]));<br />
<br />
int b=10;<br />
p[0]=&b;<br />
int c;<br />
c=20;<br />
p[1]=&c;<br />
<br />
int A;<br />
A=*p[0];<br />
A=*p[1];<br />
whitesky
|
|
|
|
|
int *p[10]
is a array of 10 pointers.
and i think second one is pointer to an array of 10 integers.
or you may declare it as int **p
assign memory to *p of 10 blocks so it will be an array
and then **p will be the pointer to array of 10 integers.
Leya
|
|
|
|
|
Since in operator precedence the "[] " operator has a priority above the "* " operator, the expression "int *p[10] " denotes an array of ten pointers, each pointing to an integer. In "int (*p)[10] " the order of interpretation was changed, and here we have a pointer to an array of ten integers.
In the first case, the size of p is 40 bytes (in our compiler), in the second case, the size is 4 bytes.
In the first case, you can assign new value for each array element like this:
p[2] = &z;
p[7] = new int;
Expression like *p[2] here can be used to change the value of z :
*p[2] = 100;
In the second case, you first have to allocate an array and assign its address to the pointer:
p = (int (*)[10]) new int [10];
Now you can access elements from this array:
(*p)[3] = 100;
(*p)[5] = 200;
Then you can delete the array:
delete [] p;
|
|
|
|
|
Viorel wrote: p = (int (*)[10]) new int [10];
Is it necessary to typecast the allocated memory ??
As per my knowledge the new operator returns the appropriate pointer.
or Should we allocate memory as
p = new int [5][10];
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
I think, with older compilers an assignment like "int (*p)[10] = new int [10] " would work, but today, in VS 2003 or GCC, it is not acceptable. Compiler complains: "cannot convert from 'int *' to 'int (*)[10]'". I suppose this is made to follow standards.
Regarding the second question, yes, you can make the assignment "int (*p)[10] = new int [5][10] " if you are going to interpret p as a pointer to bi-dimensional array. You can refer the elements like p[2][7] .
|
|
|
|
|
Viorel wrote: int (*p)[10] = new int [10]
fine..
int (*p)[10] =(int (*)[10]) new int [10]; How many elements array able to hold.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
As I know the number of array’s elements, as well as the number of dimensions in multi-dimensional array is not limited by the language, but is limited by the compiler, libraries and available resources.
The size of available memory is a factor which determines the array’s limits. If no enough memory for new operator, an exception is thrown.
Compiler and libraries included in VS 2003 enforce the total size of an array to be less then 0xFFFFFFFF. Therefore an array of integers cannot have more then approx. 1e9 elements, but the available memory space is usually smaller.
|
|
|
|
|
RahulRKulkarni wrote: I want to build an application of login and call google user.
I am going to use libjingle application.
any suggetions, ideas needed.
Search for google API's and through them validate the Google user.
following link have sample requests for validating the client login..
Here[^]
Hope this helps you.
Knock out 't' from can't,
You can if you think you can
-- modified at 2:08 Wednesday 7th June, 2006
|
|
|
|
|
Link give page not found error
Rahul Kulkarni
|
|
|
|
|
RahulRKulkarni wrote: Link give page not found error
Check it again... sorry some text missed in link
welcome to CP
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
Found
Thanks.
Let's see how it helps to me
Rahul Kulkarni
|
|
|
|
|
Hi ,
I have to display 2 sheet in single Excel application. I am using CWorkbook,CWorkbooks,CWorksheet,CWorksheets class for it. But I am not able to display it.Can any one know how to do this using this classes.
Mike
|
|
|
|