|
two words: strcmp and fopen .
The rest is left as an exercise to the reader.
Michel
It is a lovely language, but it takes a very long time to say anything in it, because we do not say anything in it, unless it is worth taking a very long time to say, and to listen to.
- TreeBeard
|
|
|
|
|
I would use ifstream to open the file, and then pass everything into a std::set, first checking if it is there. If it's there, I know that it is a duplicate, if all I want is to filter out duplicates, I am done. If I wanted to maintain order, I'd use a map and use the line number as the key.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
1) I have designed a primary Dialog Box, from which, on the selection of a menu command, i want to open another dialog box. In this case its just a File->Open command which should open a new modal dialog box to enter the filename/path. I added a new dialog by simply selecting one from insert->resource. I think i do need to define a new class for the dialog box, anyone agree? So once that has been done, how do i trigger the box from the main dialog? I was using something like
"CProgdlg::OnFileOpen{
CFildlg dlg;
dlg.DoModal();}"
but every time i compile or build it, it gives an error that the file (CFiledlg) is an undeclared identifier. Please Help.
2) Also, how does one make a set of multiple windows, like in installation file for programs, where a new dialog box is opened on pressing "next" and the earlier one is closed. The last box having "finish" instead of next, as always.
Cheers
Ayush
|
|
|
|
|
If CFildlg is a dialog you created you must #include "Fildlg.h" in this .cpp file. Otherwise if you meant to use MFC's CFileDialog then it is misspelled.
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
1) How about:
A) Looks like you misspelled "CFiledlg" in the 2nd line of code.
B) Did you #include the header file for your secondary dialog?
2) You want a wizard, and that's not in the scope of an explanation here.
------- signature starts
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
Please review the Legal Disclaimer in my bio.
------- signature ends
|
|
|
|
|
The code i gave was an example, so its not from the cpp file.
unfortunately, i forgot to include the header. Silly me, i think i must stop long hours of programming, its make me forget simple things.
Thanks a ton,
Ayush
|
|
|
|
|
Using Platform Builder 2.12 on Win2K:
I wrote a DLL which ciompiles and links fine, except that CEPB refuses to generate a LIB file. I've compaered this new DLL with other existing DLL's, and I can't find anything wrong with the setting (even the checkbox labelled "Do not create .LIB file" is NOT checked), and the compiler settings include a "/implib:My.DLL" command.
Anyone?
------- signature starts
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
Please review the Legal Disclaimer in my bio.
------- signature ends
|
|
|
|
|
Who thought that Dunn's articles were going to stop those postings ?
How low can you go ? (MS rant)
|
|
|
|
|
Um...
Majid Shahabfar wrote:
Hi Dear,
I say this to my wife. I'd recommend something a little less familiar for a web forum.
Majid Shahabfar wrote:
How can I cast a CString object to WCHAR* ?
Check out Michael Dunns articles on strings, he covers all of this very well.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
please help me explaining the problem. iv got a jpglib but the linker says so much problems when compiling.. where can i find something smaller, simpler to use - i just want to compress bmp to jpg. please.
no mfc.
regards for your help.
|
|
|
|
|
what are these linker errors ?
“If it turns out that I’m actually the one who did it, then looking for the real killers would be a big old waste of time.”
-- OJ Simpson
|
|
|
|
|
it says that there are problem with _beginthreadex and _endthreadex, smth like this. cant force this problem isnt there anything simpler to compress that bmp to jpg than using some library?
|
|
|
|
|
the problem is probably that your app and the library are built using different C run time libaries.
(in VC6) open Project / Settings, choose the JpegLib project, go to the C++ tab, choose the Code Generation category. note what it says in the "Use run-time library" combo.
no do the same for the application project. if they don't match, change the JpegLib project to match your app. then rebuild.
int01h wrote:
isnt there anything simpler to compress that bmp to jpg than using some library?
not without GDI+
-c
“If it turns out that I’m actually the one who did it, then looking for the real killers would be a big old waste of time.”
-- OJ Simpson
|
|
|
|
|
okay, could you tell me now what is the _main_ jpeglib webpage?i need the url cause the lib i have - i cant be sure if it is the newest/best/anything.
thanks
|
|
|
|
|
the latest JpegLib is 6b (written in 98). it is as solid a piece of software as i've ever seen. and what you're describing is not a JpegLib issue.
the main jpeglib homepage is www.ijg.org.
-c
“If it turns out that I’m actually the one who did it, then looking for the real killers would be a big old waste of time.”
-- OJ Simpson
|
|
|
|
|
Hi,
I have a dumb question.. I purchased a Active-X object from a 3rd party, once I add the active x object to my project and create the object etc.. as long as I include the required dll's and register them on a target system everything works as it should.
My question.. Is their a way to auto-load the dll's when the app is started? or better yet is there a way to static link the dll's into my project?
Thanks!
|
|
|
|
|
Anonymous wrote:
Is their a way to auto-load the dll's when the app is started?
not with ActiveX controls. what do you hope to accomplish by doing this?
Anonymous wrote:
or better yet is there a way to static link the dll's into my project?
no, not with AX controls.
-c
“If it turns out that I’m actually the one who did it, then looking for the real killers would be a big old waste of time.”
-- OJ Simpson
|
|
|
|
|
Are you trying to find a way so that you do not have to register? I am not sure what you are trying to achieve. But if you are looking for a way so that you do not have to register the ActiveX object then you cannot. COM objects must be registered.
|
|
|
|
|
CreateWindowEx(0, "BUTTON", "Test", WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX, ... This creates a checkbox with the text "Test" next to it. The background color becomes the default dialog background color (light gray), however I want it to be white. (Because I have a static control surrounding some of these checkboxes and it has got the SS_WHITERECT style).
And how can I get my static control to get that XP-Style look? That is, completely flat (no shadows or 3D effects) and slightly blue.
Sprudling
|
|
|
|
|
I have a CHtmlView based project that has a problem. It is loading a HTML page that contains only a Flash file (.swf). There is a link in flash that launches a web browser with another local page. The problem is that if I close the new window before it finishes loading (it is a large page) the original window does not refresh. It is like the Flash Active X is not refreshing, but I'm not sure it is that or my CHtmlView. Anyone ever have anything like this?
Thanks for any ideas,
Steve
|
|
|
|
|
Why is the original window expected to refresh itself ?
How low can you go ? (MS rant)
|
|
|
|
|
Well when you close the new window the underneath window should redraw. Instead it is just white anywhere that the new window had covered.
|
|
|
|
|
This scenario is weird enough. The only reliable reason why this should happen is that the original window not only opens a child window, it also feeds it with a stream.
Regardless of such a bad design (the child window should open and load its own stream), you would solve the issue by just tricking the web browser :
in the child window, add an onunload handler, and ask parent to auto-refresh :
<body onunload="window.opener.refresh();">
Might help. Not sure, but what a f***ing design!
How low can you go ? (MS rant)
|
|
|
|
|
Hi!
I have a hard time finding the tutorial or documents of using the MSComm Control in VC++. Does anyone know where to find this info? Please help!
Thanks
p. h.
|
|
|
|
|
Forgive me if I'm wrong about this but I believe MSComm is a VB feature. If you are looking to get to the serial port I can give you some help. Use CreateFile, WriteFile, ReadFile and set the file handle to be the comm you want. You might also want to looking into DCB, GetCommSetup, SetCommSetup, GetCommTimeouts, SetCommTimeouts, WaitEvent, CreateEvent, etc - see MSDN Library. Just ask if this sounds like what you need.
Peace
-Mel
---------------------------------------------
The greenest grass is NOT on the other side of the fence, its the grass you take care of. Have you watered your lawn lately?
|
|
|
|