|
sir u geneous
thanks
but sir iwill not display second dialog box as second dialog box has class named CAdmin and first dialog box has class CAfterone
case 0: // regular user
{
CAfterone dlg;
dlg.DoModal();
}
break;
case 1: // administrator
{
CAdmin dlg;
dlg.DoModal();
}
break;
}
Please mail me
|
|
|
|
|
thanks a lot sir this works very well u r absolutly geneious
Please mail me
|
|
|
|
|
Please read this article[^] on why you do not want to use GetDlgItem and how you can avoid it while makeing your code mor readble.
The author Joseph M. Newcomer is a old regular here on codeproject. His Page is full of great tips.
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
if CMainDialog is main dialog and CLocalDialog is another dialog use this code in another dialog
<br />
CMainDialog* m_Main = (CMainDialog* )GetParent();<br />
m_Main->m_Youredit.EnableWindow(0);
whitesky
|
|
|
|
|
The problem with the compiler VC8 is as follows:
<br />
char sz[]="Hello";<br />
std::string s=sz;<br />
std::string::const_iterator iBegin,iEnd,iPos;<br />
<br />
iBegin=s.begin();<br />
iEnd=iBegin+3;<br />
iPos=std::find(iBegin,iEnd,'e');<br />
<br />
iBegin=std::string::const_iterator(sz,NULL);<br />
iEnd =iBegin+3;<br />
iPos =std::find(iBegin,iEnd,'e');<br />
Is it possible to avoid const_iterator(sz,NULL) without using the defines
<br />
#define _HAS_ITERATOR_DEBUGGING 0<br />
#define _SECURE_SCL 0<br />
Or must I copy the char array into stl:string? Is it really standard const_iterator(ptr, this)?
|
|
|
|
|
If is acceptable, for searching in sz string you can use std::find function in this manner:
char * p = std::find(sz, sz + 3, 'e');
In this case you do not need iterator. I don't think the const_iterator can be constructed in your code. It is supplied for you by STL.
|
|
|
|
|
Yes, I know this. My problem is const_iterator and iterator. I have installed the new Visual Studio 2005 and after that I run into this problem.
When I use the standard
<br />
std::string::const_iterator iBegin;<br />
<br />
iBegin=std::string::const_iterator(sz);<br />
I get the compiler error
<br />
error C2440: '<function-style-cast>' : cannot convert from 'char [6]' to 'std::_String_const_iterator<_Elem,_Traits,_Alloc>'<br />
1> with<br />
1> [<br />
1> _Elem=char,<br />
1> _Traits=std::char_traits<char>,<br />
1> _Alloc=std::allocator<char><br />
1> ]<br />
1> No constructor could take the source type, or constructor overload resolution was ambiguous<br />
|
|
|
|
|
|
Hi guys
I have a question: is it possible to mask the user input by using a pre-determined symbol?
Like when a password is being inputted, instead of the actual password, '*'s will appear to mask it. Is this possible in std c++ and if it is, how do I do it?
Thanks in advance!
Regards,
Peter
|
|
|
|
|
the output is UI/platform dependant, not standard C++.,
What exacly are you trying to acheive ? you want to do the same in a console application ?
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Yes, I wanted to achieve that in a console app.
I was afraid it wouldn't be possible, but I had to know for sure.
Thanks for confirming my hunch!
|
|
|
|
|
I am not sure there is such a feature in STL or C++ libraries.
Using Windows API, you can try at least to hide the input while the user enters the password. Investigate the SetConsoleMode function with ENABLE_ECHO_INPUT flag. Also you can try to read each character separately in a loop and print '*'s yourself.
|
|
|
|
|
How can I create Report ListController with thumbnail as subitem…
|
|
|
|
|
Hope this helps you:
Click Here[^]
Cheers
"Peace of mind through Technology"
|
|
|
|
|
how to use the variable of another property sheet in M.F.C?
how to do communicaion in between property sheet
prashant jain malviya national institute of technology
-- modified at 6:33 Monday 12th June, 2006
|
|
|
|
|
prashantjain wrote: how to use the variable of another property sheet in M.F.C?
how to do communicaion in between property sheet
see Help of CPropertyPage and CPropertySheet in MSDN, you will every thing there?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
thnx for suggestion. but i want to use the variable of another property page of the same property sheet which is not explained there.
prashant jain malviya national institute of technology
|
|
|
|
|
prashantjain wrote: i want to use the variable of another property page of the same property sheet which is not explained there.
It required little logic to reach there, Call GetParent() to reterive Pointer to Parent Property sheet, then by calling CPropertySheet::GetPage to reterive the Pointer of Specfic Page whoes variable you want to access...
prashantjain wrote: malviya national institute of technology
Where it is?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
thanx for your sugesstion but if you can please send me a sample code taking any simple example please
prashant jain
|
|
|
|
|
prashantjain wrote: how to use the variable of another property sheet in M.F.C?
Does one property sheet own the other?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
no, i want to use the variable of another property page of the same property sheet
prashant jain malviya national institute of technology
|
|
|
|
|
prashantjain wrote: use the variable of another property page
Yet the subject says "use the variable of another property sheet."
If you are simply wanting one page to communicate with another, create a class/structure that is owned by the sheet. Load/store data in that.
There's no need for one page to communicate directly with another.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
hi,
I am able to make interface browser b/w vc++ using CHTMLView class inside my vc++ application.I am using this to open my own web site for downloading some files from server.tht is also working fine.problem is when i click on download, a window appears asking whether i should open or save the file.I dont want to give user this option.On click download it should directly save in some specific directory on local system.is it possible to do this????
if so pls reply how....pls
thanx
FutureSE
|
|
|
|
|
You can investigate how SetSilent member of the CHtmlView class affects the functionality.
|
|
|
|
|
ok thank u i ll look into that
FutureSE
WhiteHawk
|
|
|
|