|
Thanks for your answer.
the bitmap is a "standard" .bmp file, same goes for the icon its a normal .ico file.
I just spent about 40 minutes triple-checking everything, and i have no clue as to what im i doing wrong, ibe imported bitmaps, icons, .wav files, and even custom resources tons of times before and i never had any trouble.
|
|
|
|
|
It's starting to soudn interesting
The next thing I'd try if I were you was to create a New Blank MFC App and throw the resources in there, see what happens.
If it works it means something is messed up with your current-project, so you can start comparing project settings.
If it doesn't work, well then either the bitmaps end up being corrupt or your VC is malfunctioning
|
|
|
|
|
This is weird!, i just created a new project, imported the exact same icon & bitmap and got no warnings at all, i compared every project setting (twice) and they are excacly the same!, yet i still get the same warnings on the original app!
as a side note, the original app works just fine (even with the warnings)
weird isnt it??
|
|
|
|
|
I used ODBC "dBase files" to access a file GSTAT.DBF, my code is the following :
DBName = GlobalDSN + "Gstat;UID=;PWD:";
ErrMsg = "";
res = "SELECT DATUM,CASHT,MCASHT,NETROOM,MNETROOM from GSTAT WHERE (DATUM = #08/01/2004#)";
gDB.OpenEx(DBName,CDatabase::noOdbcDialog);
TRY
{
rs.Open( CRecordset::forwardOnly, res );
NbRecord = rs.GetRecordCount();
}
CATCH(CDBException, e)
....
The problem is that it works perfecly on the 1061 first records, but it refuses to find me the records 1062-1068 (1068 being the last record in file)... and I wonder why ?
I thought that it could be due to a problem with MSjet 4.0 dll because mine is quite "old" (as far as I can see, my version 4.0.4431.3 is from SP5.
I downloaded the SP8 from MS, but when I was to install it, I receive a message from the installation program saying that my version is too old and that I should have at least the SP3 ... Once again, I don't know why
Any idea on 1st or 2nd of my problem will be appreciated
DD
|
|
|
|
|
ok, i have found my 1st problem ... it is due to the wrong date format I passed in the WHERE clause, it must me in the US format (MM/DD/YYYY) and I was giving it in french format (DD/MM/YYYY) ...
So, I don't need to upgrade the MSJet stuff
Nevertheless, I would like to know if anyone has an idea on the strange message displayed by the prog supposed to upgrade MSJet ...
Regards
DD
|
|
|
|
|
who knows a good way to compile .asm files (like microsoft did with files like "memset.asm")?
thx for your answers,
Alexander M.
Don't try it, just do it!
|
|
|
|
|
|
I've recently joined a project where the #includes are a little out of control. Changes in header files trigger compilation of unrelated source files. I've done a little reduction by hand, but it is only a drop in the proverbial bucket. Is there a utility out there that identifies redundant #includes in C++ projects?
|
|
|
|
|
|
please tell me, i want to know it very much... thanks!~
|
|
|
|
|
c++ is a programming language that uses object oriented paradigms.
Maximilien Lincourt
"Never underestimate the bandwidth of a station wagon filled with backup tapes." ("Computer Networks" by Andrew S Tannenbaum )
|
|
|
|
|
Hey now. You can use object oriented paradigms with C++, as well as procedural and functional paradigms. It isn't necessarily OO, which is exactly what makes C++ great.
--
If there was a problem, Yo, I'll solve it!
Check out the hook while my DJ revolves it.
|
|
|
|
|
|
For a simple and nice intorduction to CPP, please refer the following link. Dont worry. its too simple. And you can find many simple tutorials about CPP for beginners in this site.
http://cprogramming.com/begin.html[^]
Regards,
Jijo.
________________________________
Yesterday is history,
Tomorrow is a mystery,
But today is a present.
|
|
|
|
|
I'm trying to write a program that will retrieve a list of file names (under windows) from a folder (e.g - Atually tell me (or the program) what the folder contains).
When it has the list of names, I want the program to copy the respective files to a different folder and then rename them systematically (e.g - 1, 2, 3, 4, 5...etc).
Later on, I want the program to give the copied files the same names as their original files.
(The files will either be (.doc) or (.html))
I've pretty new to programming, and have read about file streams, but have only managed to find out how to work with them when I know the filename beforehand (e.g - "File.open ("Doc1.txt", ios::out); ").
I'd be grateful if anyone could help me out with this, or at least give me the title of a book that might explain things.
Hope you can help.
Thanks!
|
|
|
|
|
First, the file enumeration. You can use the MFC class CFileFind to enumerate a directory for files. You can extract each filename in question seperately from the object, there is a member function available that will return the filename of a matching file.
Using this filename, you open the file into a CFile object. Then, you construct and create a new CFile object to the target directory. After that, it is just reading from the first CFile stream and writing into the second one.
Alternatively, if you are not bound to platform-independency (that is, you can use system console commands), then you should consider using the system to copy files directly. For example, commanding system("copy *.* <target dir> ) would copy all files to the target directory on a Windows platform.
See the documentation for CFile and CFileFind. These MFC classes encapsulate the Win32 API concepts File and FileFind. Both MFC documentations have links to the respective Win32 ones if you are unable to use MFC.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
I suggest taking a look at this API functions in your MSDN documentation
CopyFile()
MoveFile()
FindFirstFile()
FindNextFile()
FindClose()
you can go thru an entire directory (or even drive)with the Find functions, writte your own file-renaming alogarithm via CString manipulation routines (or just the good old strcat, strcpy, etc), and use MoveFile() and CopyFile() to rename / copy the files.
As a tip, i suggest using a recursive function to do the file ennumeration.
HTH.
|
|
|
|
|
I want to detect if an application on the desktop (other than my application) has fired up a file open or file save dialog?
In other words I want my application to receive an event when any application on the desktop causes a file open/save dialog to pop up.
Is this possible using hooks? If so then how?
Any suggestion would be greatly appreciated.
Thanks in Advance.
Regards,
Zahid
|
|
|
|
|
Install a WH_CBT hook and check the classname of every window created , if it matches the FileOpen Dialog's classname do ur stuff
Hope it helps
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
hy there,i would like to make a software, who can learn if a .jpg of a human is male or female. the software should use a neuronal network. the idea is, that first i view some hundret pictures of people, and always click male or female, then, the network tryes to learn, and should be able to decide if a picture is male or female. does anybody can give me tips, how i can do this?
is there code available for the neuronal network things?
i would be very happy for input!
thanx a lot!
|
|
|
|
|
1. You are probably searching for the wrong words, that's why you didn't find a lot of articles here. The common English term is 'neural networks', not neuronal. Here on Codeproject there is a great series about AI algorithms, including neural networks, made on C#, but it should be clear enough for anyone who knows C++.
2. A neural network (NN) is usually not the full solution. In an OCR, as an example, you can't feed the NN with a bitmap and have all the chars on the other side. The NN only takes place when it is needed to 'find something similar'. There are lots of other things involved in an OCR, like identifying lines of text, separating chars, decomposing chars on vectors for font independance, and then, the last step is the NN. I did an OCR for damaged images in the past and I know that the NN is the easiest part.
In your case, you won't be able to feed a NN with a image and train it to detect if it's a male jpg or a female jpg, unless the samples are really limited. The solution is much more complex, and involves separating the image in its components, like hair, eyes, nose, mouth, etc, vectorizing them in some form and only then feeding the NN with those vectors and classifying them as male or female.
Again, it's not an easy task to do, and it would certainly not be the first NN I would do. You should start with simpler examples first.
Trying to make bits uncopyable is like trying to make water not wet.
-- Bruce Schneier
By the way, dog_spawn isn't a nickname - it is my name with an underscore instead of a space. -- dog_spawn
|
|
|
|
|
I am working on project of Map vectorization as my senior design project in university.As part of project. I want to extract labels out of map (OCR) one big benfefit i have is that i know color of text so i can seperate text from other image.. Can u please elaborate more how u did OCR???
in my case i dont need to seperate text from image, i will get it through color.. i have studied Artificial Neural Networks course in my univ... Which ANN did u used?? Back propagation?? counter propagation or radial basis? what features u fed as input vector to NN??
I am already doing image vectorization.. till now i am finding closed colour contours, intersection points etc and my final output is vertices and edges ( vectors).. So please tell me in this perspective
can i get copy of ur project to see how it works ( IF possible???)
ANY HELP IN THIS REGARD WILL BE HIIIIIIIIIIIIIIIIIIIIIIIGHHHHHLLLLLLLLYYYYYYY
APPRECIATED... OFFCOURSE I WILL MENTION UR NAME IN MY PROJECT REPORT ..
THANKS IN ADVANCE
Muhammad Shoaib Khan
http://geocities.com/lansolution
|
|
|
|
|
M.Shoaib Khan wrote:
Can u please elaborate more how u did OCR???
Geez, this deserves an article series, but I'll try
M.Shoaib Khan wrote:
one big benfefit i have is that i know color of text so i can seperate text from other image..
This is great. Don't forget to allow some small variations on the color to get the full char. To separate chars, a simple scan for an empty vertical space is enough. If they are 'glued' together, the algorithm is a bit more complicated, and you'll need to add vertical lines to the char until the network can recognize something.
M.Shoaib Khan wrote:
Which ANN did u used?? Back propagation?? counter propagation or radial basis?
This was the scariest part, I was afraid that I would need a very good NN, but in the end, it was just a simple perceptron, with some hidden layers and had a very good performance (it was both fast and accurate). I noticed that the first steps were much more determinant on the OCR's performance than the NN itself.
For the feature extraction, I don't remember the algorithm name right now. It was not invented by me, and seems to be used by several omnifont OCRs. The algorithms I used both reduced the resolution and the size of the chars (all of them need to be the same, normally). So, I created a grid like this:
...|...|...|... ...|...|...|...
..1|..2|..3|... ...|.xxXxx.|...
...|...|...|... ...X...|.xx|...
---+---+---+--- --x+---+---X---
...|...|...|... ..x....|...X...
..4|..5|..6|... ...XxxxxxxxX...
...|...|...|... ...Xxxx|.xxX...
---+---+---+--- ---XX--+---X---
...|...|...|... ...X...|...X...
..7|..8|..9|... ...XX..|..XX...
...|...|...|... ...|...|...|...
The numbers are IDs of the segments, and you can do this on the horizontal segments too (I just didn't to make the text more clear). Basically, you get the image and draw those imaginary segments. You then mark if (or how many times) those segments have been crossed, so you can detect horizontal, vertical and diagonal line features and each feature is an input node of the NN. Add some hidden layers (this will need tweaking, but I had success with sizes x, x/2, x/4) and the output layer is just a sequential ID for the char (0 for 'A', 1 for 'B'...)
Unfortunately, this code is part of my product now, so I can't give you a copy.
I didn't need to do image vectorization, so I don't have any experience with it.
Trying to make bits uncopyable is like trying to make water not wet.
-- Bruce Schneier
By the way, dog_spawn isn't a nickname - it is my name with an underscore instead of a space. -- dog_spawn
|
|
|
|
|
hy, i have written an exe and a dll. the exe uses a class in the dll.
in this dll- class i have some CString members. now, when i debug i see the
following: in the constructor, everything is fine, all strings got initialized and have valid adresses. now in a subsequent functioncall, every
CString Member has the adress 0x000000 except the one who was first declared in the class. i have no idea, what the problem could be!
has it something todo with the dll?
please help me!!
thanx
|
|
|
|
|
Sounds like it is an IDE feature, not C++ design.
Kuphryn
|
|
|
|
|