|
hello,im interested to know if there is a way to capture the output from a program like telnet or something and save it to a text file?
i see no reason why this isnt possible,so if any 1 has any info regarding this,id like to know...
thanks 4 ya time
chris
|
|
|
|
|
You may use pipes.
at the prompt type
dir *.* > directory.txt
you may also send the output to 2 devices.
Make a file with all the commands you want to carry out in telnet seperated by a newline.
Don't forget to include q a the end.
then save the file as telnet.cmd or something you will remember.
at the command prompt enter
telnet < telnet.cmd > telnet.res
That will work just fine.
The other way is to echo to a file but that is noit good practice any more because window may not support the src device anymore.
Best Wishes and Happy Holiday's,
ez_way
|
|
|
|
|
thank's this will work just fine;)
|
|
|
|
|
Hello
Has the registry changed at anytime from win 95 to win XP concerning the following keys?
HKEY_CURRENT_USER\Identities\{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx}\
HKEY_CURRENT_USER\Identities\{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx}\Software\Microsoft
HKEY_CURRENT_USER\Identities\{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx}\Software\Microsoft\Outlook
Express
HKEY_CURRENT_USER\Identities\{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx}\Software\Microsoft\Outlook
Thanks Marty
Best Wishes and Happy Holiday's,
ez_way
|
|
|
|
|
Yes it work fine, I think you are on to a better way.
Best Wishes and Happy Holiday's,
ez_way
|
|
|
|
|
Well, I looked around, and everyone seems to think this is hard to do, but here's what I came up with:
BOOL CD3PlayRecsDlg::OnInitDialog()
{
CDialog::OnInitDialog();
CRect frameRect;
GetDlgItem(IDC_STATIC_VIEWFRAME)->GetWindowRect(&frameRect);
m_pView = new CDialogView(NULL);
ScreenToClient(&frameRect);
DWORD winStyle = WS_CHILD | WS_HSCROLL | WS_VSCROLL | WS_VISIBLE | WS_BORDER;
m_pView->Create(NULL, NULL, winStyle, frameRect, this, AFX_IDW_PANE_FIRST+1, NULL);
m_pView->SetScrollSizes(MM_TEXT, CSize(100,100));
m_pView->MoveWindow(&frameRect, TRUE);
return TRUE;
}
In the dialog tempate, I created a static frame to use as an anchor (where and how large I wanted the view window to be), and then created a CScrollView object and moved it into position. The tricky bit was getting it not to crash when the dialog box tried to display itself, but calling SetScrollSizes fixed that.
Am I missing something? Should this be hard to do than it appears to be?
------- 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
"You won't like me when I'm angry..." - Dr. Bruce Banner
Please review the Legal Disclaimer in my bio.
------- signature ends
|
|
|
|
|
Hi Jason
Try some ASSERTS
like
CHttpMyDlg* pDlg = ( CHttpMyDlg*) pParam;
ASSERT(pDlg);
ASSERT(pDlg->IsKindOf(RUNTIME_CLASS( CHttpMyDlg)));
Then take pDlg-> and set your rect and view.
When you get the error you may see your mistake. I looks good to me so I am just trying to give you another way to look at it.
Best Wishes and Happy Holiday's,
ez_way
|
|
|
|
|
I don't understand what you're trying to do/say.
This is a dialog-based app, and the code I posted is in the OnInitDialog() function of the main dialog.
It works, and even under debug, there are no memory leaks or anything...
Why would I care what kind of dialog it is?
------- 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
"You won't like me when I'm angry..." - Dr. Bruce Banner
Please review the Legal Disclaimer in my bio.
------- signature ends
|
|
|
|
|
Do you know?
Best Wishes and Happy Holiday's,
ez_way
|
|
|
|
|
Do I know what?
It's a CDialog with a CScrollView embedded in it.
It doesn't crash. It doesn't leak. I can update the view object (drawing in it) without any problems.
What's to know?
If you're gonna make a point, then make it, but don't draw this out. I don't have the time to banter back and forth with pointless discussion. If I screwed something up, then by all means tell me what I did wrong. The whole reason I even posted this is because it was easier to do than the impressions I was getting by reading the articles.
------- 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
"You won't like me when I'm angry..." - Dr. Bruce Banner
Please review the Legal Disclaimer in my bio.
------- signature ends
|
|
|
|
|
Ride Outlaw Programmer, Ride into the lonely night, ride cowboy ride.
Best Wishes and Happy Holiday's,
ez_way
|
|
|
|
|
What is the var is it CDialogView* m_pView; ?
Best Wishes and Happy Holiday's,
ez_way
|
|
|
|
|
class CDialogView : public CScrollView...
------- 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
"You won't like me when I'm angry..." - Dr. Bruce Banner
Please review the Legal Disclaimer in my bio.
------- signature ends
|
|
|
|
|
It's only hard to do because it's not the recommended/documented way to use MFC. The designers intended a view to be inside either a frame window or a splitter window. If you can devise your own window code to properly contain a view, and it sounds like you have, then party on.
--Mike--
Ericahist | CP SearchBar v2.0.2 | Homepage | RightClick-Encrypt | 1ClickPicGrabber
"Just because the box has 2 gigabytes of memory doesn't mean you get to use it all!"
-- Rico Mariani, CLR perf guy
|
|
|
|
|
Yes it works fine, I think you are on to a better way.
Best Wishes and Happy Holiday's,
ez_way
|
|
|
|
|
good work. keep it up.;)
I think dialog box is basically a window. as I recall the MFC hierarchy. so, thats why what you thought has worked.
|
|
|
|
|
Hi..Everybody..
:|My problem is:
I want to save my drawing in Tiff format (in painbrush like application)..
Now as I draw any shape or Image(BitBlt)..then I want all my matter in CDC is saved in Tiff format...
Can any body guide me to convert memory DC to Tiff file using MFC.
I hope u help me..;)
Thanks...sumit;)
Sumit Kapoor
|
|
|
|
|
u need to get a tiff library (cximage on cp does the trick nicely) or figure out the format urself
best get cximage
"there is no spoon" biz stuff about me
|
|
|
|
|
Hi..
Thanks for reply...
I'm using LibTiff library for tiff.
The problem is how to provide data to tiff file..
As I draw in CDC & all drawing want to transfer to tiff..
Issue is how to pick that drawing & place in tiff...
Plz help me if u know in this side..
Thanks
Sumit
Sumit Kapoor
|
|
|
|
|
Hello
i have been trying to get RGB values from a 24bit BITMAP following is the code :
bitmap = (HBITMAP)LoadImage(NULL,path,IMAGE_BITMAP,0,0,
LR_LOADFROMFILE | LR_CREATEDIBSECTION);
::GetObject(bitmap,sizeof(bm),&bm);
BYTE *pix = (BYTE*) bm.bmBits; //bm is of type BITMAP
pixels pixel[216][331]; //file opened is 216 * 331
CClientDC dc(this);
int k = 0;
for(int j = 0; j <= height-1 ; j ++)
{
for(int i = 0; i <= width-1; i ++)
{
pixel[j][i].blue = pix[k++];
pixel[j][i].green = pix[k++];
pixel[j][i].red = pix[k++];
dc.SetPixel(i,j,RGB(pixel[j][i].red,pixel[j][i].green,pixel[j] [i].blue));
}
}
I am trying to figure out the problem i cant find it help me please the result that is displayed is not the correct image i mean its all inverted and rotated i dont understand the pixels values are there how to ARRANGE them please help me out
|
|
|
|
|
arent dc's inverted?
try drawing from the bottom up
"there is no spoon" biz stuff about me
|
|
|
|
|
In VC6.0,I can't open the CDex project.The following is the content of the project's helpful file:
"CDex can be compiled with the MICROSFT VISUAL C compiler, version 6.0. The project
files are included. Make sure though, when you've downloaded the cdex_src.tgz file
that you unzip the files as DOS text files and not as UNIX text files (MSVC does
not like DSW project file that are in UNIX text file format). In addition you need
to download the lame source code (or you can delete the LameMp3EncDll and libmp3lame files
from the project workspace).
Once you have installed everything, open the cdex.dsw project file (double click on
on it), and select the proper configuration (either 'CDex - Win32 Debug' or
'CDex - Win32 Release' and select Build/Rebuild All menu option.
In order to run CDex from MSVC, set the working directory (project settings/debug) to
the root of the cdexos project, e.g. c:\CVS\cdexos)
"
Please tell me how to do to open it!
Rap off for you,for me,for our human.
|
|
|
|
|
What is the error?
- Mike
|
|
|
|
|
The VC6.0 does not make response!
Rap off for you,for me,for our human.
|
|
|
|
|
In the forum,I haven't found the funcion to only list own posted messages?
Please help!
Rap off for you,for me,for our human.
|
|
|
|