|
Yup I fixed that and everything is running more smoothly!
|
|
|
|
|
I have a C++ application that i am looking to provide a button that will have the functionality of hitting an ftp server and playing a video clip. I have some understanding of how to do this with ShellExecute in C++ if i have a clip on a web server but not sure about an ftp server. Cannot use ShellExecute for an ftp server can i?
Any ideas anyone?
|
|
|
|
|
depends
in this example, easiest now look at ftp clients relevant features
Kuphryn
|
|
|
|
|
|
LCI wrote: do this with ShellExecute in C++ if i have a clip on a web server
That is not an application it's a script. You could do that from a Javascript file. HTTP is a stateless protocol Ftp is a stateful protocol. I don't recommend trying to script a stateful protocol, but that's just me.
See if this[^] helps.
|
|
|
|
|
I am open to suggestions cause the fact is that i do not know how to do this. Whatever i use must be in C++, or if you know of a better way i will be open. Just need to be able to play a video clip on an ftp server from a C++ application.
|
|
|
|
|
The requirements you give are not specific enough to help you. It would be like asking an Architect to design you a Red House. He doesn't even know where to start. For example one way I could interpret your post would be to suggest that you write a C++ NT Service that would transfer the file from the FTP Server to the Web Server so that you could use your existing knowledge that you gave as follows:
LCI wrote: I have some understanding of how to do this with ShellExecute in C++ if i have a clip on a web server
But I have no way of knowing if this meets your requirements.
|
|
|
|
|
Unfortunately, these files are located on an ftp server alone. I am not able to put them on a web server. I have no C++ NT service. Just a C++ application that i am placing a button on that says, "play video". I will figure out how to associate the file name of the video clip that i need. All i need to know is how to access that video clip and have it play in a default player.
Now, the questions that i have are :
1. Is this possible given what i said.
2. If so, what api's etc. would i use.
Thanks again,
|
|
|
|
|
LCI wrote: Just a C++ application that i am placing a button on that says, "play video".
Strange requirements and stranger application, is it a school project?
A brute force method would be to transfer the file to the local machine then launch it in the default player.
There are Windows APIs called WinInet that provide FTP client functionality. MFC has Wrapper classes for the API like CFtpConnection, CFtpFindFile, etc. There is a CodeProject article that might help you Article[^]
good luck.
|
|
|
|
|
Say i have two network cards in my system . How do i programatically get the IP address of the the second network card ?
Engineering is the effort !
|
|
|
|
|
See if this article is of any help.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi
I am creating SDI MFC sample App. I followed the steps given in "http://www.codeproject.com/dialog/mdisdiapps.asp". I have not yet added any of my code.
I am getting these 2 errors while compiling:
Test_SDI\MainFrm.cpp(55) :error C2065: 'CBRS_GRIPPER' : undeclared identifier
Test_SDI\MainFrm.cpp(55) :error C2660: 'CreateEx' : function does not take 3 parameters
Any suggestions?
Thanks,
Harsha
|
|
|
|
|
harsha1305 wrote: Test_SDI\MainFrm.cpp(55) :error C2065: 'CBRS_GRIPPER' : undeclared identifier
This style comes from afxres.h , which is included automatically if you used MFC's AppWizard.
What does your project's stdafx.h file look like?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi it looks like this:
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#if !defined(AFX_STDAFX_H__D535EB41_66D7_43B5_8D02_0D7D90278354__INCLUDED_)
#define AFX_STDAFX_H__D535EB41_66D7_43B5_8D02_0D7D90278354__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#include <afxdisp.h> // MFC Automation classes
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_STDAFX_H__D535EB41_66D7_43B5_8D02_0D7D90278354__INCLUDED_)
Thanks,
Harsha
|
|
|
|
|
Modify your post by surrounding the code with <pre> tags.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
What do you mean by it?
Thanks,
Harsha
|
|
|
|
|
Look at your post and see. Notice the #include directives are not showing up. I can see them if I view the HTML source, but that's unnecessary if the post was corrected.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi David,
I will correct it, but then do you think that I should include afxres.h explicitly in StdAfx.h file?
Thank you.
Harsha
|
|
|
|
|
harsha1305 wrote: do you think that I should include afxres.h explicitly in StdAfx.h file?
No. It has already been included by afxwin.h .
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
hi all,
I set a COledateTime object:
// DateRec
COleDateTime oleDateRec;
oleDateRec.SetDateTime(anno,
mese,
giorno,
pMonitor->ore,
pMonitor->minuti,
pMonitor->secondi);
with current datetime Ex.(2006,6,20,16,50,23)
When i save oleDateRec.m_dt in a db table field with this insruction:
// Comando SQL
sSqlCommand.Format(_T("INSERT INTO STOPS_MONITOR (StopCode,DateRec,PlantCode,RoomCode,GroupCode,MachCode,CyclePos,OrderCode,StyleCode,StSize,StColor,StLot,Shift)")
_T(" VALUES(%ld,%f,'%s','%s','%s',%ld,%ld,'%s','%s','%s','%s','%s',%d)"),
lStopCode,
---> oleDateRec.m_dt,
sAffiliationPlant,
sAffiliationRoom,
sAffiliationGroup,
DbTfr.addr,
pMonitor->step,
sOrderCode,
sStyleCode,
sStSize,
sStColor,
sStLot,
atoi(tmp_Turno));
in the table STOPS_MONITOR in the field DateRec I see this: 2006, 6, 22
the day is change from 20 to 22!!!! (
Database is a MSSQL Server
the field DateRec is a datetime type. lenght 8
Any idea??
thanks in advanced!!
Too many plans make the health badly!!
|
|
|
|
|
Have you tested the SQL Statement in your DB environment? Does it work?
|
|
|
|
|
Hi again
Excuse me for asking what I am sure is a dum question, but here goes:
I have a Win32 "Typical Hello World" project VC6.0(written by others), which I am adapting to what I want to do. In my application I wish to have coloured buttons. I have previously made use of a ClrButton class in dialog boxes (which I believe I obtained from Code Guru).
If I simply include the files CClrButton.cpp & .h in my Win32 app, I come up with errors:
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex
Can someone point me in the right direction to working out how to do this. I havnt really got a grasp of the differences in creating a dialog and a win32 app - is there a tutorial that I can look at?
Sorry for asking what I am sure are simple questions, but if you dont ask...
Cheers
Mike
|
|
|
|
|
69 Bay wrote: is there a tutorial that I can look at?
Of course, tons of them. However they may not result in you understanding things any more than the sample you worked with did. Don't get fooled into believing one can "learn C++ in 21 days". For starter books on Win32 development try Petzold and Richter. There are others as well but I liked both of them.
Programming Windows 5th Edition[^]
|
|
|
|
|
The linking errors have to do with the libraries you are linking with. Go to your Project->Settings dialog in the C/C++ tab and select the Code Generation category. You will have a combo box with choices like "DLL Singlethreaded", "DLL Multithreaded", "Singlethreaded", "Multithreaded", etc. Try selecting the Multithreaded version. If that works, look at the code and figure out why it is creating a thread ... GUI components rarely need them.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
hi all,
i need to set the entire rich edit text to white....
i know there is a SetBackgroundColor method and to set the text i need to do SetDefaultCharFormat
but this doesn't work for me....
here is what i do:
CHARFORMAT2 cf;
m_edtMsg.GetDefaultCharFormat(cf);
cf.cbSize = sizeof(CHARFORMAT2);
cf.dwMask = CFM_COLOR;
cf.crTextColor = RGB(255,255,255);
m_edtMsg.SetDefaultCharFormat(cf);
when i start typing on the rich edit, i see the color hasn't been changed???
any help?
thanks in advanced
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|