|
Are you trying to pull the contents of a web site into a file or are you going to do more with the internet session? If you're just pulling the file from the website I can post some code that I have been using..
Rob
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|
|
just pulling the conents...
|
|
|
|
|
Well just incase your trying to pull files from websites.. here's some code..
CInternetSession mysession;
CStdioFile* remotefile;
CString strError,
strBuffer;
strError = _T("SUCCESS");
TRY
{
char httpbuff[4096];
int numbytes;
remotefile = mysession.OpenURL(_T("http://www.google.com/index.html"), 1, INTERNET_FLAG_TRANSFER_BINARY | INTERNET_FLAG_RELOAD);
while (numbytes = remotefile->Read(httpbuff, sizeof(httpbuff)-1))
{
httpbuff[NULL];
strBuffer += (CString)httpbuff;
}
mysession.Close();
remotefile->Close();
delete remotefile;
}
CATCH_ALL(error)
{
TCHAR szCause[4096];
error->GetErrorMessage(szCause,4096,NULL);
strError.Format("%s",szCause);
}
END_CATCH_ALL;
if(!strError.CompareNoCase(_T("SUCCESS")))
{
....
}
else
{
AfxMessageBox(strError);
}
Rob
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|
|
Dear All
i have a software in VC that changes the pitch of the voice input from microphone and them plays it back to the speaker..if the speaker and the mic are connected to my sound card
i have a separate module for which implements basic call connecting and disconnecting facility of TAPI..all i want is to send my changed voice through my modem and start conversation ..means i shud be able to hear the other person talking and he/she should be able to hear my changed voice ..for that i have joined my sound card and my voice modem through a TAD connection(wire) but it seems it is not going to work..can anybody give me some idea of how i can conversate ..is do i need to make changes to my simple TAPI class or do i have to make changes to my program which is giving voice output on speakers.
regards
jenny
|
|
|
|
|
I have a large VC++ 6.0 program that has around a hundred droplist combo boxes on different dialogs. I have a random issue with random items in the droplist that cannot be cliked on with the mouse to select them. The ones that don't work change from compile to compile and OS to OS (98/2000/XP).
|
|
|
|
|
its a long shot but maybe check to see if u have duplicated resource id's ... theres a way cool add-in here on cp called resource organizer (or something) that does a good job of that stuff for u
"there is no spoon" biz stuff about me
|
|
|
|
|
Hi,
I have compiler error in using ::SQLConnect() method:
SQLRETURN SQLConnect(
SQLHDBC ConnectionHandle,
SQLCHAR * ServerName,
SQLSMALLINT NameLength1,
SQLCHAR * UserName,
SQLSMALLINT NameLength2,
SQLCHAR * Authentication,
SQLSMALLINT NameLength3);
It's OK if I hardcode the "MyDBSource" directly in the SQLConnect():
iReturnCode = ::SQLConnect(hDbc, (SQLCHAR*) "MyDBSource", SQL_NTS, (SQLCHAR*) "", SQL_NTS, (SQLCHAR*) "", SQL_NTS);
However, if my DBSource name is a CString, how I convert/cast to (SQLCHAR*)
in order to use it in the method?
Please help! Thanks
TQD
TQD
|
|
|
|
|
off the top of my head try:
(SQLCHAR*)(LPCTSTR)myString
"there is no spoon" biz stuff about me
|
|
|
|
|
Hi. I just installed VS2003 and started converting my programs from VS2002. All was woking fine till i reached a solution that, despite all my efforts, keeps poping this message:
"The dynamic link library MFC70D.DLL could not be found in the specified path..."
What is going wrong? Shouldnt VS detect that MFC70D.DLL is no longer used and that it should use MFC71D.DLL instead?
Thanks in advance.
|
|
|
|
|
Hi. I have write a simple c++ code that generates a digital sphere, which i will use next as a domain in a simulation algorithm. I create a text file that represents the sphere. To do this i'm writing in the text file z-layers cuts of the sphere. In the file suppose that 1 represents the solid sphere and 0 the outer.The code:
#include <stdio.h>
#include <iostream>
#include <math.h>
using namespace std;
int main(){
FILE *domainFile;
if((domainFile=fopen("sphere.txt","w"))==NULL){
cout<<"Cannot open file "<<endl;
system("pause");
="" exit(0);
="" }
="" int="" xmax="50;
" x0="xmax/2.0;"
="" ymax="50;
" y0="ymax/2.0;
" zmax="50;
" z0="zmax/2.0;
" radius="6;
" if(radius="">xmax || radius>ymax || radius>zmax){
cout<<"Error: define smaller radius"<
|
|
|
|
|
Hi all,
I've installed Visual C++ .net standard edition version 2002. I have some code done using the 2003 version.
Is it possible to build it using my version?. How can I do this?
Thanks,
Marcos
|
|
|
|
|
You might be able to step it back using this tool, then re-open it in VS2002.
|
|
|
|
|
Hi,
Thanks for the answer. But this program you suggest is to convert from visual 7 to visual 6.
I already have visual 7 (version 2002), but I need convert from visual 7.10 to visual 7.0... When I open the *.vcproj the error is: "Your project file version is 7.10. Visual Studio .NET can only load version 7.0 project files"
Any other idea?
Thanks,
Marcos
|
|
|
|
|
I didn't try, but that conversion program doesn't handle version 7.10 files? If it does, you could convert from v7.10 to v6.0, then re-open the v6.0 file in VS2002 and allow it to do the conversion for you.
If not ... I can't help you. Just figured it was worth a shot. Good luck.
|
|
|
|
|
If I have a Static label in MFC. I have a line of text in that I want different color(or different font size, bold etc) in each peice of text. How could I do that?
Anyone know?
Please help me
Love
|
|
|
|
|
Owner draw.
onwards and upwards...
|
|
|
|
|
Can you be more specific please......
thanks
Love
|
|
|
|
|
|
thanks. I will take a look
|
|
|
|
|
I've a program that calls other dialogs.
However, it appears that I can only call one dialog at any one time.
The main dialog is disabled until I exit the second dialog.
I want to be able to call many dialogs without the main dialog being disabled.
Suggestions much appreciated
Kind Regards
Caoimh
|
|
|
|
|
CMydialog *pDlg;
pDlg = new CMydialog;
pDlg->Create(CMydialog::IDD);
pDlg->ShowWindow(SW_SHOW);
Do this for other dialogs also.
For futher reference you can checkout what modeless dialogs are.
"When death smiles at you, only thing you can do is smile back at it" - Russel Crowe (Gladiator)
|
|
|
|
|
I did a bit more research on modeless dialogs.
At the moment this code allows one to call a new dialog every time the button is pressed.
Would you by chance know of a routine which would solve this problem, i.e. I only want the dialog once, not many times.
|
|
|
|
|
Well you want many dialog box open and want only one of each dialog box to be open, its just a matter of programming logic.
CMyDialog *pDlg = NULL; //Some where global or in the theApp
if(pDlg == NULL)
{
pDlg = new CMyDialog;
pDlg->Create.....
...
}
When you destroy the window, i.e in OnDestroy
set pDlg = NULL;
hope this helps.
"When death smiles at you, only thing you can do is smile back at it" - Russel Crowe (Gladiator)
|
|
|
|
|
You'll need to use modeless dialogs instead of modal.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
THANKS FOR ALL THE SUGGESTIOS. MUCH APPRECIATED
|
|
|
|