|
I pretty much have a handle on the basics. An I kinda do wanna do somesort of GUI but Idk were to start on that.....
Thanks,
JD
|
|
|
|
|
He was telling you that you're in the wrong forum. C++/CLI is not plain C++. You want the Visual c++ forum. If you want to write GUI code in C++, you need to learn MFC, probably. You can use C++/CLI and Winforms, but it's not pretty, and not many people use it.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Ok.........that doesnt really help, an I chose this 1 I dont want Visual C++ ether I guess this site isnt a good place 4 what Im lookin 4...Reg C++....thats all I wanted.......If ur gunna say this post is n the wrong spot or flame me n any way leave it......but if there is any 1 here that can answer my question......I would like that......well thats all I have to say :\
|
|
|
|
|
Frogboy181 wrote: an I chose this 1
This forum is for C++/CLI questions. Lots of people make the mistake, despite the notices on the subject in the header of the forum. I guess they gloss over what they don't know
Frogboy181 wrote: I dont want Visual C++ ether
Why not ? It's the forum for 'standard' C++ questions, although the focus is on the Microsoft compiler, and GUI related questions tend to be MFC. The C++ standard has no provisions for any sort of GUI. So, you need to choose a vendor specific library if you want a GUI. MFC is the most popular/common one, if you're coding for windows. If you're coding for Linux then yes, there are probably better places to ask. MFC is sort of on it's last legs, however, C++/CLI/Winforms development is pretty rare, and not a good path to go down.
Frogboy181 wrote: If ur gunna say this post is n the wrong spot or flame me n any way leave it..
Why do you think I'm telling you it's in the wrong spot ? It's because you're in the wrong place. Look around you. 50% or more of replies in this forum say 'you're in the wrong place'. Look at the dates, then look at the Visual C++ forum. This forum is a bit of a ghost town. I am trying to tell you that if you ask in the right forum, you'll get more help.
Although your question is super vague. I'd recommend considering C# if you are hoping to write GUI apps for windows, it's just easier to find resources, and easier to use/more powerful.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
The place for regular C++ questions at The Code Project is here[^].
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Hiya
I would like to know 2 different methods of image resizing. One simple and one complex.
And then i have to implement those methods via programming in C++.NET.
And it would be great if some one could refer me some source code to understand it in detail. I am newbie to Image Processing.
Thanks a lot....
|
|
|
|
|
#using <System.Drawing.dll>
using namespace System;
using namespace System::Drawing;
using namespace System::Drawing::Drawing2D;
using namespace System::Drawing::Imaging;
...
Bitmap ^pSrcBitmap = gcnew Bitmap("C:\\test.bmp");
Int32 DestImageWidth = pSrcBitmap->Width * 2;
Int32 DestImageHeight = pSrcBitmap->Height * 2;
Bitmap ^pDestBitmap = gcnew Bitmap(DestImageWidth, DestImageHeight, pSrcBitmap->PixelFormat);
Graphics ^pDestGraphics = Graphics::FromImage(pDestBitmap);
pDestGraphics->InterpolationMode = InterpolationMode::HighQualityBicubic;
pDestGraphics->CompositingMode = CompositingMode::SourceCopy;
pDestGraphics->DrawImage(pSrcBitmap, 0, 0, DestImageWidth, DestImageHeight);
pDestBitmap->Save("C:\\testresized.bmp");
#using <System.Drawing.dll>
using namespace System;
using namespace System::Drawing;
using namespace System::Drawing::Drawing2D;
using namespace System::Drawing::Imaging;
...
Bitmap ^pSrcBitmap = gcnew Bitmap("C:\\test.bmp");
Int32 DestImageWidth = pSrcBitmap->Width * 2;
Int32 DestImageHeight = pSrcBitmap->Height * 2;
Bitmap ^pDestBitmap = gcnew Bitmap(DestImageWidth, DestImageHeight, pSrcBitmap->PixelFormat);
BitmapData ^pSrcBitmapData = pSrcBitmap->LockBits(Rectangle(0,0,pSrcBitmap->Width,pSrcBitmap->Height),
ImageLockMode::ReadOnly, pSrcBitmap->PixelFormat);
BitmapData ^pDestBitmapData = pDestBitmap->LockBits(Rectangle(0,0,DestImageWidth,DestImageHeight),
ImageLockMode::WriteOnly, pSrcBitmap->PixelFormat);
<code>
pSrcBitmap->UnlockBits(pSrcBitmapData);
pDestBitmap->UnlockBits(pDestBitmapData);
pDestBitmap->Save("C:\\testresized.bmp");
-- modified at 12:56 Tuesday 5th June, 2007
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
What methods are these. Well is the complex one bilinear interpolation method.
If its not then is it possible for you to tell me with bilinear interpolation one. And yeh it would be great if you could provide me with few good links aswell to underrstand the theory behind it...
As i have to compare the both methods...and point out advantages n disadvantages of both...
Thnaks
|
|
|
|
|
|
My image processing articles cover bilinear interpolation. You'd have to convert the code from C#, which should be easy.
I cover the theory, also. There are on this site.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Sorry Christian!
I forgot about this article[^]. I'll try and remember to post the link in the future
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
OK great...Thanks ....Ill go through it and would try to figure out advantages n disadvantages of 2 different approach...a simple and a bilinear one....
Thanks a lot..
|
|
|
|
|
Software_Specialist wrote: a simple and a bilinear one
I didn't mention, a simple solution is to duplicate pixels when increasing size and remove pixels
when reducing size, not taking into consideration nearest neighbor or anything.
This is the easiest to code but the resulting image, especially when increasing size, is the
poorest (pixelated, "blocky").
Good luck!
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Are you using C++/CLI, or vanilla C++ in VS2005 ? You also seem to be asking people to do an assignment for you, why can't you find this info for yourself ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
what...?
I never asked any one to do my assignment....???? It could be a part of assignment but not the whole assignment...??????? But it is not any assignment...i am just startin teaching myself IP...so its a step1. Yeh but to get started i read this question somewhere...
I did find this info myself aswell...d only reason i put this up was bcos i was not sure of the different methods ...later i found out that bilinear interpolation is one of d complex method...so to make sure i ws right i put up a question here......And its always better to take some pre info before you start working over any new area and thats wt i did.. I am starting up with Image processing , speech processing and stuff...And i guess its right to ask some one experienced like urself....who could push me to the right direction....I mostly work over C#.net and recently only i started with MFC n all...
Anyway from next time i would mention what all info my google friend gave me and in what area i am confused...
Thanks for replying to my post...Problem solved.....
SS
|
|
|
|
|
does anyone know how to copy data from one listbox(several columns) to another one?
Thanks In Advance;
|
|
|
|
|
If this is .NET, then the listboxes have an Items property. If it's not .NET, you'r in the wrong forum
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hello every body ..
If you can I need a cod to search in a text file ....
I need it to search of word which contin of 3 word ..
can you help me I try but I cant write it ...
plase help me as soon as you can ...
non light
|
|
|
|
|
This is the C++/CLI forum. Try the Visual C++ forum, but first try doing a little research. You should ask a question which explains what you've tried. The fstream class is the best way to read a file, and you can read a file word by word with it.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
#include<iostream>
#include<string>
#include<cmath>
using namespace std;
class Complex{
public:
Complex();
Complex(double);
Complex(double,double);
void write() const ;
bool operator==(const Complex& ) const ;
bool operator!=(const Complex& ) const ;
Complex operator-();
friend ostream& operator<<(ostream& out,Complex& c);
private:
double real;
double imag;
};
Complex::Complex(){
real=imag=0.0;
}
Complex::Complex(double re){
real=re;
imag=0.0;
}
Complex::Complex(double re,double im){
real=re;
imag=im;
}
void Complex::write() const {
cout<<real<<"+"<<imag<<'i'<<endl;
}
bool Complex::operator==(const Complex& u ) const {
if(real==u.real&&imag==u.imag)
return true;
else return false;
}
bool Complex::operator!=(const Complex& u ) const {
if(real!=u.real||imag!=u.imag)
return true;
else return false;
}
Complex Complex::operator-(){
real=-real;
imag=-imag;
}
ostream& operator<<(ostream& out,const Complex& c)
{
return out<<c.real<<"+"<<c.imag<<'i'<<endl;
}
int main(){
Complex c1(2.3,5.6);
Complex c2(1.4,2.5);
if(c1==c2) {
c1.write();
c2.write();
cout<<c1<<endl;
cout<<c2<<endl;
}
return 0;
}
I have declared :friend ostream& operator<<(ostream& out,Complex& c);
but why the error says:
cannot access private member declared in class 'Complex'?
|
|
|
|
|
This is a well asked question, but this is the C++/CLI forum, try the Visual C++ forum.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Isn't it C++ forum?
|
|
|
|
|
"The C++ / CLI is for managed and mixed-mode C++ programming only " says the sticky post at the top of the forum. If you read that post, you'll see that it's for exactly what the name says - managed C++ and C++/CLI. This is C++ that uses the .NET framework. The visual C++ forum is for straight C++ questions.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
in C# it's possible to get a handle to a process by doing:
Process[] p = Process.GetProcesses();
and checking each process in 'p' to find a specific one by its using 'ProcessName' property.
Does someone now how to that in C++ to search for a specific process ?
Thanks a lot !
Pat.
p.f. Goudjo-Ako
Bringing our energy together !
|
|
|
|
|
In managed C++ you do it the same - it's the same .NET Process class.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|