Search found 79 matches

by Marcus Frenkel
Sat Mar 07, 2009 10:45 pm
Forum: C++ Development
Topic: Best location to store passwords
Replies: 11
Views: 2163

Best location to store passwords

Hi, I have an application that logs the user into a server application. I also have "remmember password" option which requires the user password to be stored on the hard disk. Currently I use wxConfig to store the encrypted password in a file. My question is, what is the best location to store the e...
by Marcus Frenkel
Fri Oct 24, 2008 12:15 am
Forum: C++ Development
Topic: Set default html font
Replies: 11
Views: 1438

Yeah I guess I have to use FONT tag for wxSimpleHtmlListBox as there is no <Default Font> solution for that. wxNORMAL_FONT->GetPixelSize() is helpful I only needed to increase it by two points (x&y) to get the same size like the default one. Thanks to tan I found GetParser function very helpful. The...
by Marcus Frenkel
Fri Oct 17, 2008 11:45 pm
Forum: C++ Development
Topic: Set default html font
Replies: 11
Views: 1438

Sorry to still bother with this. Whatever function I use from the parser (MySimpleHtmlListBox->m_HtmlParser->..) the application crashes. I guess that it can't be forcefully used as a public member without fixing some other stuff.

Marcus
by Marcus Frenkel
Thu Oct 16, 2008 8:29 pm
Forum: C++ Development
Topic: Set default html font
Replies: 11
Views: 1438

I did that but the application crashes when I use GetParser->.. on wxSimpleHtmlListBox. The debug points the break point at: . . for (i = 0; i < 7; i++) m_FontsSizes[i] = sizes[i]; . . inside void wxHtmlWinParser::SetFonts(const wxString& normal_face, const wxString& fixed_face, const int *sizes)
by Marcus Frenkel
Thu Oct 16, 2008 2:16 pm
Forum: C++ Development
Topic: Set default html font
Replies: 11
Views: 1438

Chris, that works great for wxHtmlWindow.

What about the wxSimpleHtmlListBox? There is no GetParser accessible function like Tan mentioned.
by Marcus Frenkel
Thu Oct 16, 2008 1:36 pm
Forum: C++ Development
Topic: Set default html font
Replies: 11
Views: 1438

Thanks. Using your code for wxHtmlWindow it do works but only in between <font></font> tags. If the text is not inside <font> tag or it's in a <td> tag then the GetParser->SetFonts or GetParser->SetFontSize doesn't have any effect. In addition, the array with the font sizes must have the default val...
by Marcus Frenkel
Thu Oct 16, 2008 8:16 am
Forum: C++ Development
Topic: Set default html font
Replies: 11
Views: 1438

Thank you. Any simple code how can I use wxHtmlWinParser to change the default font for the wxHtmlWindow?

Marcus
by Marcus Frenkel
Thu Oct 16, 2008 1:20 am
Forum: C++ Development
Topic: Set default html font
Replies: 11
Views: 1438

Set default html font

Hi, I use SetFont to set the font/size of all items in the wxSimpleHtmlListBox but there is no effect and the font/size remains the same. I use the below code with no luck: MySimpleHtmlListBox->SetFont( wxFont( 1, 70, 90, 90, false, wxT("Tahoma") ) ); I also tried to change the default font on wxHtm...
by Marcus Frenkel
Mon Sep 29, 2008 3:35 pm
Forum: C++ Development
Topic: Read text file backwards
Replies: 22
Views: 3655

Just one more thing to make my life calm and happy:

When I use wxFile to write into file, the file is not load into memory right? I know this 99% but I need to be sure. Or better use wxTextOutputStream?

Marcus
by Marcus Frenkel
Mon Sep 29, 2008 3:29 pm
Forum: C++ Development
Topic: Read text file backwards
Replies: 22
Views: 3655

OK found it. It doesn't work when I create the test text file using windows notepad. When I create the file using wxWidgets it's working great. The issue was something related to line termination.

Thanks for all the help!
by Marcus Frenkel
Mon Sep 29, 2008 2:55 pm
Forum: C++ Development
Topic: Read text file backwards
Replies: 22
Views: 3655

Romas, thanks for the ongoing attention to this issue. Did you tried the code with the

Code: Select all

wxMessageBox(mystring, wxT(""),wxYES_NO | wxCANCEL, frame);
included? Did you get the text of each line in a message box?

Thanks, Marcus
by Marcus Frenkel
Mon Sep 29, 2008 2:35 pm
Forum: C++ Development
Topic: Read text file backwards
Replies: 22
Views: 3655

I'm not really familiar with debuging. Can anybody please check the code on windows platform. The potential bug is not related to string to wxString conversion because I tried to use ofstream to save each line (from the 2nd loop) to another text file and the result is the same - empty file or some w...
by Marcus Frenkel
Mon Sep 29, 2008 2:02 pm
Forum: C++ Development
Topic: Read text file backwards
Replies: 22
Views: 3655

I'm on Win XP using MSVC 2008, file.clear is not removed. Here is the code I use: struct SLineInfo { int iLength; int iOffset; }; const int bufferSize = 1024 * 9; char buffer [bufferSize]; vector<SLineInfo> nLines; ifstream file ("C:\\test.txt"); // find all the lines and their offset while (!file.e...
by Marcus Frenkel
Mon Sep 29, 2008 1:29 pm
Forum: C++ Development
Topic: Read text file backwards
Replies: 22
Views: 3655

I add that to the code and I don't get compilation error now. Now when I try to get the text from each line in the 2nd loop I get empty string or sometimes one "random" character from the text: ... file.seekg ((*it).iOffset, ios_base::beg); file.getline (buffer, bufferSize); wxString mystring(buffer...
by Marcus Frenkel
Mon Sep 29, 2008 10:32 am
Forum: C++ Development
Topic: Read text file backwards
Replies: 22
Views: 3655

Thank you Romas for writing the code. It has some bugs I'll try to fix them and post back. I'll try to use wxHashMap because when I use vector I get error: <'SLineInfo' : undeclared identifier> even though I have #include <iostream> #include <vector> #include <string> using namespace std; Just one t...