|
a-huge wrote:
I've looked under Matlab's documentation, and this is all I could find about 'mwArray':
Dude, I googled and in 10 seconds had more info than that.
a-huge wrote:
As far as being tied to Matlab goes, we don't really have a choice. We need the Image Analysis Toolbox in order to extract the information we need from our input images.
I doubt that. What do you need to extract that only Matlab can do it ?
a-huge wrote:
At this point, we are fairly confident we can obtain an object of class 'mwArray' in which the intensity of each pixel (0->black and 255->white) is in the corresponding point in the array. All we need right now is a way to display these pixels in a MFC Visual C++ file, and how to automatically refresh the image a few times a second. We never realized how difficult it would be.
You need to create a DIBSection, which will give you access to the data in the image as a byte array. Make it a 24 bit image. Then you need to take your intensity values and stuff them into the array in threes, because you need to fill a RGB triple. Then you can just write code that keeps stuffing your data into the image, and keep showing the same image on the screen.
You may be able to get direct access to a greyscale image, which would cut the bit movements by a factor of 3, but you'd need to take care to set up the palette correctly, so that the values correspond to the right colors.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
How does one create a wizard in VC++ 6.0? Is there any wizard for a wizard?
|
|
|
|
|
You have to use a CPropertySheet and set it to Wizard Mode..
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|
|
I figured that out in the last hour. Thank you. For anyone else who is trying to achieve the same thing, here is how you do it in short:
(1) Create MFC App Wizard "dialog" project.
(2) Add property sheet using Add to Project -> Add components -> Visual C++ components -> Property Sheet.
(3) Hack the Init function of CApp and essentially call DoModal() on PropertySheet you created.
|
|
|
|
|
i got some small doubts as i am new to c++. Will u please help me to sort it out?
(1)is 'int* x' same as 'int *x'
(2)'char const* x' same as ‘const char *x’
Vendy
|
|
|
|
|
1 - yes, whitespace is irrelevant
2 - no. one makes the pointer const, one makes it's contents const, from memory. They are not the same tho.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
I think you got it wrong, char const * x and const char *x are the same and prevent you from changing the contents. For making the pointer itself const, you need to use char * const x.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
-c wrote:
(1)is 'int* x' same as 'int *x'
it works the same, but some people prefer one over the other to remind them it is a pointer to int, not int pointer.
-c wrote:
(2)'char const* x' same as ‘const char *x’
char const * x;//this is a constant pointer to a char type
const char * x;//this is a pointer to a constant char type
|
|
|
|
|
thank you guys....
one more thing..
is 'char const*' same as 'char *const'???
Vendy
|
|
|
|
|
yes. const is only an identifier, but most use it before the type.
you could verify it by yourself (and you will have too because even if you're new to VC++, this is not a "primary school forum") using sizeof() ...
another thing :
read this[^]
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
toxcct wrote:
read this[^]
Bad link, perhaps?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
(1) int* x and int *x mean the same thing.
(2) char const* x and const char *x do not mean the same thing.
char const* x may be read as 'x is a constant pointer to char'. In this case, the pointer is constant, not the character data it points to.
const char *x may be read as 'x is a pointer to characters that are constant.' For this one, the character data is constant.
Software Zen: delete this;
|
|
|
|
|
char const* x and const char *x are the same thing, and they mean "x is a pointer to characters that are constant.'".
"char * const x" means "x is a constant pointer to char"
|
|
|
|
|
-c wrote:
(2)'char const* x' same as ‘const char *x’
See here.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
For almost a year already I've been unable to do incremental builds. 4 out of 5 times I try it I get an "Internal Error during pass 2" message, and I'm forced to rebuild. Neither starting a new project, reinstalling Visual Studio .NET 2002 nor patching it seems to solve the problem. Is there anything else I can do?
|
|
|
|
|
Hi-- I've been banging my head trying to solve this problem. Of course I'm a self trained pseudo programmer who just started to use STL. I have a huge file with 10 million entries that are paired, say 1 , 8 ; 1 , 5; 1 , 3; 2 , 0; 2 , 4; 3 , 0; 3 , 8; etc... They are stored as a two dimensional array of 10 million rows and two columns... you get the idea of the data. I need to find the records in the file that have one and only one of the tags in the first entry of the pair and put the second in another vector file in the order found. For example, if I need records with the tag 2, I'll create a vector with 0 and 4. I suppose I need to use a multimap, but do not know how to read the file and then store the results in a vector. Right now I have this simple code:
typedef vector<double> DVECTOR;
DVECTOR FDV;
int tag;
double FD;
int id = 3;
int idp = id + 1;
while(tag != idp)
{
GetData >> tag >> FD;
cout << tag << " " << FD << endl ;
if(tag == id)
FDV.push_back(FD);
}
This does what I want by scaning the file from the begining until it finds the target value and reads all the entries with such value. If the number is close to the first entry, cool it's fast, but if it is near the end it will take a long time (big program repeated many times...). The question is, would the multimap work better and faster to do the same task? If so... how do I do it???
Thank you so much!
Carlos
|
|
|
|
|
Hello! I wanna develop a Http client program! I use three classes (CInternetSession, ChttpConnection, Chttpfile) for doing this! Now I can connect to my web LAN server, send request, and get the response. However, when it finished, I use functions Chttpfile::Close() ChttpConnection::Close(), and CInternetSession::Close() to disconnect to the server. But It doesn't work at all. I also "delete" theses three classes. But the connection still exists until the server disconnect this connection, or I shutdown the program. Is there any solution to disconnect it? Thank you very much!
|
|
|
|
|
I am using cryptlib.lib in my VC7.0 project. I am getting following linker error .. please help to resolve the same
cryptlib.lib(cryptlib.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) private: void __thiscall std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >::_Eos(unsigned int)" (__imp_?_Eos@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEXI@Z) referenced in function "public: __thiscall CryptoPP::BufferedTransformation::Err::Err(enum CryptoPP::BufferedTransformation::ErrorType,class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> > const &)" (??0Err@BufferedTransformation@CryptoPP@@QAE@W4ErrorType@12@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
Sandeep Naik
|
|
|
|
|
I'm having trouble integrating MySpell into my application.
I was following the example given by Steve King (Spell Edit) but i keep getting compilation errors. Any suggestions?????????/
|
|
|
|
|
rjnl wrote:
...i keep getting compilation errors
I'm having a hard time seeing those errors. Could you move your monitor a bit closer? Just kidding...
Exactly what (compiler) errors are you getting?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
my problem starts when i include the SpellEdit class into my project.
I get errors like undeclared identifiers
|
|
|
|
|
rjnl wrote:
I get errors like undeclared identifiers
Which is what happens when the compiler encounters a symbol that has not yet been defined.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/html/c2065.asp
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I'm doing a project where i'm developing a spell checker for our local language. It is to be as an add-in for MS Word. I'm Using MySpell for the spell checking.
I also want to customize the menus so that the names are in our local language.
Is it possible? Where can i get more information? I searched Microsoft's site but most of the things were too complicated for me (I'm just a beginner at the moment).
|
|
|
|
|
I have written a program using Visual C++. Are there any books guide me through creating a skin for my project so you do not see that blue exe file? Also are there any books that could guide me through having a tool bar across the top so the person will have the dropdown screen option of saving, save as, print etc. across the top? If all of this can be done using MFC is there a book that can show me how to accomplish this?
|
|
|
|
|
There are many articles about these topics here on CP.
Don't try it, just do it!
|
|
|
|