|
m_pwd is an edit control. Note the use of GetWindowText() !! What is the "okok" function? Define "debug error."
|
|
|
|
|
oops. okok = OnOk() but i mistyped it.
I changed m_pwd with my edit control variable, and now when i compile, i get these errors:
error C2039: 'GetWindowTextA' : is not a member of 'ATL::CStringT<basetype,stringtraits>'
with
[
BaseType=char,
StringTraits=StrTraitMFC_DLL<char>
]
hmm, was m_pwd supposed to me a "Control" variable or a "value" variable when i created it witht he add variable wizzard? i made it a value, so its a CString, not a CEdit.
[Edit]
~it works! that was it. thanks a whole whole whole lot!
*.*
cin >> knowledge;
|
|
|
|
|
keegan wrote:
hmm, was m_pwd supposed to me a "Control" variable or a "value" variable when i created it witht he add variable wizzard? i made it a value, so its a CString, not a CEdit.
It is a "control" variable. You would not be able to use GetWindowText() on a "value" variable.
|
|
|
|
|
just figured that out, once again you saved me from the horrors of MFC. thanks.
*.*
cin >> knowledge;
|
|
|
|
|
It should not make a difference that something is in another cpp file if your variable vaild in the scope that you need to use it.
The way I do this is in your OnOK dialog for the password entry you do the required password varification and create the second dialog if necissary. As a result of the second dialog you either exit the first dialog by calling the base class CDialog::OnOK() or continue by not calling it.
John
|
|
|
|
|
well, i would make the dialog i need top be created if the password is correct (m_sh), but the only place i can call
m_sh.DoModal()
is in PropsView.cpp, and the onok() is in property.cpp. If, in Property.cpp, i try to include PropsView.h, where m_sh is defined, i get a whole lotta errors. so, as far as i can figure out i have to create the new dialog in PropsView.cpp, and do the authentication of the password there.
grr.
*.*
cin >> knowledge;
|
|
|
|
|
when I use string ,I can write
m_StringeditBox.GetWindowText (str);
if(str.IsEmpty()){
MessageBox("please,choose one of them ! ");
return;
}
like tihs !
if I use edit box for numeric value how can I warn ?
emroz
|
|
|
|
|
|
it didn't work
emroz
|
|
|
|
|
How about a code snippet?
|
|
|
|
|
When I add information to access table ,I use this code !
set.m_access_attribute = GetDlgItemInt (IDC_EDIT1);
How can I warn to fill edit box ?
emroz
|
|
|
|
|
I don't use GetDlgItemInt() (see below), but if that is what you are limited to, you'll want to use its second parameter, lpTrans. If it is 0 upon return, an error was encountered in translating the edit control text. This includes being empty.
Whether I'm dealing with letters, numbers, or a combination of the two, I extract edit box data using GetWindowText() . It's easy to check for emptiness, and if the end result needs to be stored in a number, atoi() is only a function call away.
|
|
|
|
|
i do it by adding a variable for the edit box to the class. right click on m_StringeditBox class, go to add variable. Select 'control' from the check boxe, and change "Category:" to variable. add a variable name, and add min. and max. value and you're set, it makes it mandatory for a user to enter something.
*.*
cin >> knowledge;
|
|
|
|
|
Hi!
I am trying to make a program which will read all the text files in a directory and create a single textfile...
But I don't have any idia how I can read those files because I don't know their names or numbers...
Does anyone know how????
Thank you for your future answers!
Well... I am a beginner ...
|
|
|
|
|
FindFirstFile
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Use the FindFirstFile()/FindNextFile() pair, or the CFileFind class.
|
|
|
|
|
When I call this function "COleClientItem::CreateCloneFrom" to create a copy of the specified OLE item. And use this function to support undo operations.
found that store file that including ole item will grow greater and greater!
ZHANGYIFEI
|
|
|
|
|
Theoretically, OLE structured storage files can get cleaned up. In practice, the structured storage implementation causes deleted streams to remain in the file forever. Which is why Word document files keep on growing.
The only way to clear out dead information is to create a new storage file, then copy all the streams you want to keep from the old one.
|
|
|
|
|
can you give some code or example? thanks!
|
|
|
|
|
Hi !!
Does anyone know about the tiffio library ? I need it to use a tiff reader for Qt, but cannot find (even after many searches on the net) the files needed....
Thank you for your help,
Jerome
|
|
|
|
|
|
any time you need to find a ceratin .h file, do this:
go to your favorite search engine (www.google = the best)
do a search for "index *.h"
but replace the * with your h file name.
Ie, to find tiffio.h i would go to google, and type in
index tiffio.h
and browse the results.
*.*
cin >> knowledge;
|
|
|
|
|
Ok, i give up. I've written the code for a password dialog box in MFC. everything works just dadndy, except when the user enters his/her password, the actual letters show up.
How to i get the asteric thingies? lol, i did a lot of googling and found some stuff on CPasswordDlg, but um, thats confusing.
any help?
*.*
cin >> knowledge;
|
|
|
|
|
Add the style 'ES_PASSWORD' to the edit box where the user enters a password.
Chris Meech
"what makes CP different is the people and sense of community, things people will only discover if they join up and join in." Christian Graus Nov 14, 2002.
Oh and for those that ask programming questions in the lounge. Seek the truth here[^].
|
|
|
|
|
hah! i knew it was something simple. thank you sir!
*.*
cin >> knowledge;
|
|
|
|