|
??????????????
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
The class is called fAbout ? What a strange name. Also a strange error, from what you've said, it should work.
Is this managed C++, or MFC ?
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
I called it fAbout because it's an about box and the f is a short for form.
and this is a managed project, but since i'm using a lot of mfc functins in it, I tought calling a form would be the same as mfc.
|
|
|
|
|
samkook wrote: f is a short for form.
Oh!! my dirty mind!
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
brahmma wrote: Oh!! my dirty mind!
mine tooo
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
Are you sure,you write correct name of class
|
|
|
|
|
OK, your naming conventions are your business
There's something else going on here - did you include the file before stdafx.h ? stdafx needs to be first in the list.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
nop, I included it after the Form1.h include.
I also discovered that if I include it in stdafx, it's working. But if feel weird putting it there since About.cpp will call it twice.
|
|
|
|
|
Ok, so I'm using Visual Studio 2005 on a Windows XP computer. I have to connect to a "blackbox" through a Linksys router. The blackbox's IP address is 192.168.145.13 and the port is 5000. This blackbox is constantly outputting using the same format of:
0x01 char integer tab integer tab integer tab...integer integer
0x01 char integer tab integer tab integer tab...integer integer
0x01 char integer tab integer tab integer tab...integer integer
...
Now, I want to use Windows Forms to create the window and inside the window,
1.) I want a table to be displayed that seperates all the integers out and puts them in their own column and adds a row per output.
2.) I would also like to write the blackbox's output to a log file so I have a record of everything it said.
Basically, how would I do either of those? I have a little understanding of windows forms and such, so any explanation might have to be a little detailed. I know how to bind sources and such, but only how to bind databases made in Access, not anything else. Any help towards this would be great. I have read the tutorials and such on this website and others, but I can't get any of them to work with Windows Forms (I don't know where to put the code).
Thanks in advance!
|
|
|
|
|
No one can help with either problem? If something is confusing, let me know!
|
|
|
|
|
I have created a form with a picturebox. How do i display a bitmap file in my system into the picturebox?
|
|
|
|
|
LoadImage will load a bmp file for you, then you'll have a HBITMAP to pass to the picture box. If you want to load other formats, you'll need GDI+ or a third party library.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
lets say i want to put the codes into class CFormView
so the codes in CFormView should be
CProjectView::CFormView()
{
strPictureName = _T("C:\\Documents and Settings\\My Documents\\Blue hills.bmp");
HBITMAP hbp = (HBITMAP)::LoadImage( NULL, strPictureName, IMAGE_BITMAP, 0, 0,
LR_CREATEDIBSECTION | LR_DEFAULTSIZE | LR_LOADFROMFILE );
m_Picture.SetBitmap(hbp);
}
am i correct? btw what is LoadImage? do i need to include a code for it?
|
|
|
|
|
Looks right - LoadImage is a windows API.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
but when i run the program, there is nothing in the picturebox..
Do i have to type anything to include LoadImage in the codes?
|
|
|
|
|
Again, no. If you couldn't see it, it wouldn't compile. If you step through, what does LoadImage return ?
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
|
|
And also you you can use of CImage class for load graphic files(bmp,jpg,...)
|
|
|
|
|
Is that in MFC ?
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
From the MSDN:
You can use CImage from either MFC or ATL.
|
|
|
|
|
When did that come in, was it 2005 or 2003 ?
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
|
how to use CImage in MFC?
|
|
|
|