|
Hi All
I want to find all the sites visited by a user in Mozilla Firefox.
As I know that for Internet Explorere there are some interfaces like IEnumSTATURL, IUrlHistoryStg2 etc. for finding history and cahche files of internet explorer.
So is there any similar way to find out history, cache, cookies etc. in Mozilla Firefox. Please tell me.
if not then please guide me the way to achive this.( better if provide some code snippets)
Thanks.
|
|
|
|
|
Hi,
I am developing a program using C++ and WinAPI (no MFC). It contains resources like dialogs and menus. What is the best way to make those resources language independent? I'd like to provide language packs for English, German etc...
|
|
|
|
|
People generally use different resource DLLs for different languages
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
|
In some modern programs,xml and picture files are used.
But the simple way is using resource dll
Easycvs is an easy and quick tool for version control system.it's a cvs integrated into Visual studio.
For more information,please visit http://www.easyvcs.com/
|
|
|
|
|
What are picture files?
Are there any benefits in using XML?
|
|
|
|
|
Hi, I have some questions, concerning three different things:
1.: if there is a text file with some identical lines in it, how can I find out, if there are identical lines and how can I delete these identical lines except of the first one?
2.: how can I replace the "GOTO" by an other statement? I already tried it with a simple "return", but that doesn't work.
_eins:
if (m_dlgSheet.DoModal() == IDOK) {
condition 1= ...
condition 2 = ...
if(condition1 != true&& condition2 != true) {
goto _eins;
}
}
3: do somebody know, how to implement a "zoom window"-function? Having this function, the user should be albe to draw with a left-mouse-klick a rectangle; while LMouseButtonUp, the content of the chosen rectangle should be enlarged to the whole size of the window. Maybe somebody knows a link or even source-code for this problem?
Hanno
|
|
|
|
|
1) there are many ways to do this, personaly I would read the file into a buffer line by line. Look at the basic_string or CString in MFC, these classes make it easy to compare to lines "strings" of text.
2) GOTO is an ugly statement. try:
while (!statement1 && !statement2) {
....
}
but beware that you could quite likely end up in an endless loop, you should have some sort of check in there and to exit the while loop use the break command
while (...) {
if (endless_loop)
break; // or return; will exit the function
}
3) maybe somebody else could better help you here. But here[^] is a project that might start you on the right track. You should also look on MSDN for mouse input functions here[^]
|
|
|
|
|
The 1st one:
------------
#include <iostream>
#include <string>
#include <vector>
#include <fstream>
#include <algorithm>
#include <iterator>
using namespace std;
struct LineOfText
{
LineOfText() : m_LineNumber(1) {}
unsigned int m_LineNumber;
string m_Text;
};
ostream& operator<<(ostream &s, const LineOfText &line)
{
s << line.m_Text << " (line " << line.m_LineNumber << ")";
return s;
}
struct SortByText
{
bool operator()(const LineOfText &l, const LineOfText &r) const
{
return l.m_Text < r.m_Text;
}
};
struct IsTextEqual
{
bool operator()(const LineOfText &l, const LineOfText &r) const
{
return l.m_Text == r.m_Text;
}
};
struct SortByLine
{
bool operator()(const LineOfText &l, const LineOfText &r) const
{
return l.m_LineNumber < r.m_LineNumber;
}
};
typedef vector<LineOfText> Lines;
Lines g_Lines;
int main(int argc, char* argv[])
{
// Open the input file.
ifstream ifs("C:\\a.txt");
if (!ifs)
{
return 1;
}
// Read lines of input file into a vector.
LineOfText line;
while (getline(ifs, line.m_Text))
{
g_Lines.push_back(line);
++line.m_LineNumber;
}
// Elimiate duplicate text but keep what remains in line order.
stable_sort(g_Lines.begin(), g_Lines.end(), SortByText());
Lines::iterator new_end = unique(g_Lines.begin(), g_Lines.end(), IsTextEqual());
sort(g_Lines.begin(), new_end, SortByLine());
// Output the results.
copy(g_Lines.begin(), new_end, ostream_iterator<LineOfText>(cout, "\n"));
return 0;
}
Steve
|
|
|
|
|
hi
i have a simple question, I usually see such line of code in someones class(for example) :
void CSomeClasss::Get(CString str, TCHAR tchar )
{
...
}
I am interested in what is the use of writing /*= _T(' ')*/
-- modified at 2:43 Saturday 18th March, 2006
|
|
|
|
|
Nothing special...It is just to remind oneself what kind of input he is recieving at the time of calling. Statement written between /* and */ is not executed in c++. We use it to explain, what this piece of code is doing. So you can write any thing between it.
Good Luck.
We Believe in Excellence
www.aqueelmirza.cjb.net
-- modified at 2:53 Saturday 18th March, 2006
|
|
|
|
|
It's just tell compilers and readers that this parameter is not used in this function.You will appreciate it if you are using visual c++ and set the warning level to 4
Easycvs is an easy and quick tool for version control system.it's a cvs integrated into Visual studio.
For more information,please visit http://www.easyvcs.com/
|
|
|
|
|
"It's just tell compilers and readers that this parameter is not used in this function"
if so then why don't simply remove this parameter >
|
|
|
|
|
Because when people like you or me look at this function, we know exactly what is passed to it without having to step through it. This is the mark of a good programer. Lamers who do not add comments to their code often spend more time re reading their code than doing the actual programing.
Adding comments is good practice for both yourself and for others who may one day edit your code.
|
|
|
|
|
Oh,I'm sorry for looking it as "TCAHR /*tchar */"
In your case,it's just because this function has a default
argument,you can't use "TCHAR tchar= _T(' ')" in the definition after you hase declared this function.
But if you remove this comment,you may forget that this parameter has a default argument.
It's nothing special;P
Easycvs is an easy and quick tool for version control system.it's a cvs integrated into Visual studio.
For more information,please visit http://www.easyvcs.com/
|
|
|
|
|
|
First of all TCHAR tchar is definitely used in the function, unlike someone has pointed few posts above.
by writing TCHAR tchar /*= _T(' ')*/ along with function argument it becomes clear that tchar has a default value of ' '. So in the class declaration this function would have been defined as
<br />
class CSomeClasss<br />
{<br />
.<br />
void Get(CString str, TCHAR tchar = _T(' '));<br />
.<br />
};
This makes it easy to remember that tchar have a default value of ' ' during read code or debugging.
-Saurabh
|
|
|
|
|
I use FreeImage in my MFC app to view image infos as http://codeproject.com/bitmap/graphicsuite.asp#xxxx[^]
But when compile....
DlgImageInfos.obj : error LNK2001: unresolved external symbol
__imp__FreeImage_GetDIBSize@4
DlgImageInfos.obj : error LNK2001: unresolved external symbol __imp__FreeImage_GetHeight@4
DlgImageInfos.obj : error LNK2001: unresolved external symbol __imp__FreeImage_GetWidth@4
DlgImageInfos.obj : error LNK2001: unresolved external symbol __imp__FreeImage_GetDotsPerMeterY@4
DlgImageInfos.obj : error LNK2001: unresolved external symbol __imp__FreeImage_GetDotsPerMeterX@4
DlgImageInfos.obj : error LNK2001: unresolved external symbol __imp__FreeImage_GetColorType@4
DlgImageInfos.obj : error LNK2001: unresolved external symbol __imp__FreeImage_GetColorsUsed@4
DlgImageInfos.obj : error LNK2001: unresolved external symbol __imp__FreeImage_GetBPP@4
Anyone can debug for me,thanks so much !!
|
|
|
|
|
This type of error is common when you forget to link with the correct library file. I have not used the graphicssuite before but I can see there is a .lib file included in the sources. Make sure you have also added this to your project.
In MSVC project settings -> Link -> input -> and add it to the Object/Library modules
|
|
|
|
|
Hi, I using some of the ODBC function that only supported in 3.0. However, I don't know if the computer that I'll run the application have the ODBC 3.0 or not. How can I get this information out of the computer and where to get the version update if it is not the latest.
Thanks
|
|
|
|
|
nhuythanh wrote: How can I get this information out of the computer and where to get the version update if it is not the latest.
Look around the Control Panel for anything to do with ODBC.
|
|
|
|
|
I have captured video from webcam with default frame rate.(i,e)15 fps
How to calculate the frame rate on reciving side?
DWORD dwRequestMicroSecPerFrame;
Requested frame rate, in microseconds. The default value is 66667, which corresponds to 15 frames per second.
JAYARAJ
-- modified at 23:27 Tuesday 21st March, 2006
|
|
|
|
|
I am loading a a .rtf file and displaying the contents within a rich edit control. After updating to the latest verson (4.1) of the edit control I am having some trouble correctly displaying data within a table. The main problem is that none of the data is being show.
Strange thing is, if I open the rtf file in one of the demo projects here on codepage, the data is displayed correctly. Since there is not much code involved, it leads me to beleive it is a problem with the initialisation.
Has anybody experienced similar problems, or know of any good websites which document richedit 4.1 or the rtf format? All I am able to find are a few poorly commented MFC examples, which I am trying to convert to use in a non-MFC application.
|
|
|
|
|
Hello everyone!
Alright... Look at the top of my file:
================
// Size of screen
#define WIDTH 640
#define HEIGHT 480
// Character/Tile size
#define CSIZE 16
// Window title
#define WINTITLE "Test SDL game..."
#include <iostream> // Standard lib
using namespace std; // Standard lib
#include "SDL.h" // SDL
#include "SDL_image.h" // SDL_image (for loading non-BMP graphics)
#include "DisplayHandling.cpp" // And this one handles displaying to screen
================
I get this error:
================
/home/kixdemp/devel/sdltest/src/DisplayHandling.cpp:32: error: ‘IMGDIR’ was not declared in this scope
================
How is it not declared, if I declared it just above it?
Also, I have a second question... I have this at the top of another file:
================
#ifndef _GAMECLASS_CPP_
#define _GAMECLASS_CPP_
================
But I still get a function redefinition error on the function in that file...
Whoever answers these quiestions, will be the true king of England!
Just kidding, but, thanks!
BTW: There's something wrong with the code tag...
Lord Kixdemp
www.SulfurMidis.com
www.SulfurSoft.tk
[ftp://][http://][hotline://]tsfc.ath.cx
|
|
|
|
|
I can't see where you've declared IMGDIR .
Also re-inclusion guards are normally used for header files not C/C+ files.
Including a .CPP file is almost certainly a bad idea (although there are exceptions to every rule).
Steve
|
|
|
|