|
re: what OS am I running?
Win2k.
|
|
|
|
|
Well Paul, for some odd reason i was thinking either Win2k or WinXP had a service that allowed you to treat FTP sites as you would a mapped network drive. Try as i might, i cannot find it on either though, so it must have been the fevered ravings of an overworked imagination.
Good luck finding something that'll work; sorry i couldn't help.
---
Shog9
If I could sleep forever, I could forget about everything...
|
|
|
|
|
Hi!
Is there a way to obtain the content of a Rich Edit control without the RTF format?
I'm not using MFC but the Win32 APIs. I'm sending the EM_GETTEXTRANGE message to the Rich Edit control, but sometimes, I'm receiving a "Access is denied" message when I call the function GetLastError ().
I have a variable with a RTF content and I want to get the text of this variable without RTF. I think I have to use an intermediate Rich Edit Control and then obtain the text from the control, but how?
Thks in advance!
Appstmd
|
|
|
|
|
Did you try GetWindowText ?
VOTD:"5. The Lord loves righteousness and justice;
the Earth is full of his unfailing love. "-Psalm 33:5
|
|
|
|
|
hio.. i am using alot of COleDateTime objects in my program.. i only use them for the date, not the time.. so a few times i do comparisons like
if (olTime1 <= olTime2)
.. and i think that it should be true.. but its false because the olTime1's time is after olTime2's time.. but the dates are equal..
is there anyway to just compare dates? i had written a stupid function like:
BOOL CCommonFunctions::DatesAreEqual(COleDateTime olDate1, COleDateTime olDate2)
{
return (olDate1.GetYear() == olDate2.GetYear() && olDate1.GetMonth() == olDate2.GetMonth() && olDate1.GetDay() == olDate2.GetDay());
}
but this is just a stupid solution.. does anyone else have a suggestion?
-dz
|
|
|
|
|
Before performing comparison, reset the hour/minute/second with a call to COleDateTime::SetTime.
Tomasz Sowinski -- http://www.shooltz.com
What is "scratch" and why can everything be made from it?
|
|
|
|
|
i tried to do that and set the time to 1,1,1 and it always caused the date to become invalid (12/31/1899).. i am just combining the < > operators with my AreDatesEqual() function.. good enough for now.. just surprised there is not a date only control
-dz
|
|
|
|
|
You could subtract the two dates to get a COleDateTimeSpan and then use COleDateTimeSpan::GetDays() and check if it is 0;
Jason Henderson quasi-homepage articles "Like it or not, I'm right!"
|
|
|
|
|
I don't clearly understand your idea. If you want to get a Window's text, just use GetWindowText
Hung Son
A Vietnamese student
i-g.hypermart.net
dlhson2001@yahoo.com
|
|
|
|
|
Sorry for the newbie question, but lets say i have a text file, and in a certain location in the text file, there is a string of characters I would like to modify.. lets say its HIGHSPEED.. if I want to replace HIGHSPEED with DIALUP, without having excess whitespaces, how would I accomplish that? I want to remove the extra spaces that would be at the end if I were to seek the offset, and replace the word with my secondary word.
Thanks in advance.
btw. I can do this in MFC or C style. MFC prefered (bleh)
|
|
|
|
|
Is the file very large? If not, you could load it into memory, perform string replace and write back.
Tomasz Sowinski -- http://www.shooltz.com
What is "scratch" and why can everything be made from it?
|
|
|
|
|
Even if it's so large, you can use String tech with FileMapping
Hung Son
A Vietnamese student
i-g.hypermart.net
dlhson2001@yahoo.com
|
|
|
|
|
How do you grow or shrink memory mapped file?
Tomasz Sowinski -- http://www.shooltz.com
What is "scratch" and why can everything be made from it?
|
|
|
|
|
replace HIGHSPEED with DIALUP
You must handle that.
Hung Son
A Vietnamese student
i-g.hypermart.net
dlhson2001@yahoo.com
|
|
|
|
|
I am trying to load a particular field of all records in a table into a listbox. when i run the exe, I am getting a messagebox with the error:
too few paramaters expected one.
what does this type of error mean??
|
|
|
|
|
it should be just:
m_MyListBox.AddString(myRecord.m_strField1); you should post code if you want help with an error.. so we can see where the error is being caused.
-dz
|
|
|
|
|
When I run it, I get the messagebox error and when the dialog appears, I donot have the fileds loaded?
I have the code where I have tried to load the field..
void CMgen1View::OnInitialUpdate()
{
m_pSet = &GetDocument()->m_mgen1Set;
CRecordView::OnInitialUpdate();
LoadListbox(); //CALLING HERE
}
void CMgen1View::LoadListbox()
{
CMgen1Doc* pDoc = GetDocument();
CListBox* pLB = (CListBox*) GetDlgItem(IDC_LIST1);
CSectionSet sect(&pDoc->m_database);
sect.Open();
while(!sect.IsEOF()) {
pLB->AddString(sect.m_CourseID);
sect.MoveNext();
}
}
|
|
|
|
|
The database query you're executing has probably a misspelled column name. Check the SQL text.
Tomasz Sowinski -- http://www.shooltz.com
What is "scratch" and why can everything be made from it?
|
|
|
|
|
too few paramaters expected one.
I'm sure that your SQL command is incorrect;P
Hung Son
A Vietnamese student
i-g.hypermart.net
dlhson2001@yahoo.com
|
|
|
|
|
I want a user to definitely input a value into a certain editbox. If GetWindowText is "" I SetFocus back to it. But this doesnt prevent them from still ignoring it and pressing another button "Done" that proceeds with the rest of the code Needless to say the code crashes if you dont have an input in the editbox. Short of checking to see if the editbox is filled (and setting focus back to it if not)in the BN_CLICKED event of the "Done" button is there a way of forcing the user to make an entry in the editbox?
Thanks,
ns
|
|
|
|
|
disable everything else until the edit control is filled ?
Conservative:
One who admires radicals centuries after they're dead.
-- Leo C. Rosten
|
|
|
|
|
Thats a great solution! Thnaks,
ns
|
|
|
|
|
I really should post my GUI helper class that makes it trivial to do this. Meanwhile, if you want to be really cool do the following:- In the resource editor, set the OK button's "disabled" property.
- Write a handler for the edit control's
EN_CHANGE notification.
- In the handler, get the edit control's text and enable the OK button only when the text is non-empty. Be sure to
TrimRight() and TrimLeft() the text after you get it. /ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Okay. I'l give that a shot as well. I did a less sophisticated version without the EN_CHANGE, but thats a cool idea like you said.
|
|
|
|
|
I'm emailing you a "preview" version of the GUI helper stuff I as talking about. Stay tuned...
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|