|
Anonymous wrote:
i've never tried that before...
You still have a chance then. You should use the iostream framework instead of these ugly, C style, file handling routines. I have articles here on CP that show how to use ifstream and ofstream.
Christian
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Cats, and most other animals apart from mad cows can write fully functional vb code. - Simon Walton - 6-Aug-2002
|
|
|
|
|
I want my program to see if a file of a certain name is trying to or is being downloaded to my computer. Is there a way to do this?
There's always one more bug.
|
|
|
|
|
There are a number of things that you can do, it just depends on how complicated you want to get, and where you think this file will be downloaded from.
If this file is downloaded through IE it would be very simple to write an IE extension.
However if you are afraid that some rogue program may try to download this file you may want to implement the catch all for network communication and implement a Layered Service Provider (LSP). This basically adds another layer on top of your network communication stack. There is not a lot of documentation to implement one of these and it is a lot of work, so good luck if you go this route.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Thanks, I'll look into that.
|
|
|
|
|
Is it possible to get the hWnd of edit controls in a IE document?
Its very frustating, I have been trying to search for more info on this without any success
|
|
|
|
|
You can't.
IHTMLTextElement is a DOM interface made to provide access to the features of an edit box as an HTML programmer.
MS quote (http://www.microsoft.com/ddk) : As of September 30, 2002, the Microsoft® Windows® 2000 DDK, the Microsoft Windows 98 DDK, and the Microsoft Windows NT® 4.0 DDK will no longer be available for purchase or download on this site. Support for development will ship at the same time as the Windows XP Service Pack 1 (SP1) release.
|
|
|
|
|
I have a function that has the argument list:
bool AddField(LPCTSTR lpstrFieldName, enum DataType Type, int nLength = 0);
The lpstrFieldName value I will get from a CEditbox - edit1.GetWindowText(fldName)
where fldName is a CString. What do I have to do to fldName to make
it an LPCTSTR ?
Thanks,
ns
|
|
|
|
|
|
GetBuffer() member function of the CString
or cast (LPSTR)(LPCSTR)CString Member
it will work.......
WUSIWUG
|
|
|
|
|
why don't you post this under the article that the code came from? if you do, a copy of your post will go to the person who wrote the class, which means you'll have a better chance of getting a good answer.
-c
"Kate said / The flowers of intolerance and hatred / Are blooimg kind of early this year / Someone's been watering them.
-- Robyn Hitchcock, Devil's Radio
|
|
|
|
|
OOps. Thanks, didnt know that....
|
|
|
|
|
hi friends
i've a strange problem..
m_pFtp = oInternet.GetFtpConnection(m_szServerName,m_szUserName,m_szPassword,(unsigned short)m_dwPort,TRUE);
CString csCurrentDir ;
m_pFtp ->GetCurrentDirectory(csCurrentDir) ;
m_pFtp->SetCurrentDirectory("Renjith") ;
m_pFtp ->GetCurrentDirectory(csCurrentDir) ;
CFtpFileFind ofinder(m_pFtp) ;
BOOL bWorking = ofinder.FindFile("*.*",INTERNET_FLAG_RAW_DATA);
DWORD dwErr = GetLastError() ;
m_pFtp is a CFtpConnection class member pointer ..i can connect and change the directory of the particular FTP..but when i excecute the ofinder.FindFile,which retuurns 0(false),even if there are some files..the error is
12029 ie.the atemptto connect the server failed...what may the reason ..??
pls help........
WUSIWUG
|
|
|
|
|
Try adding the flag INTERNET_FLAG_EXISTING_CONNECT to the call to FindFile .
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Nopes..i found the problem..!!!
i try to connect in passive mode.....
it doesnot work.....instead of that i connect in ACTIVE mode,ie setthe flag FALSE in GetFtpConnection()...
now it working....
WUSIWUG
|
|
|
|
|
Dear all,
I was wondering if I can perform DDV and DDX for dialog bars. If yes, could someone please help me out...
Many Thanks
Chun Te
|
|
|
|
|
|
Thanks
|
|
|
|
|
Dear All,
i want to display menu text and other text on the buttons etc
in languages like urdu, arabic etc. how can i do this i will use
VC++ as language for development.
waiting for reply.
lodhi
dfdf dfd
|
|
|
|
|
You want to develop application VC++. Plz clarify what is your expected target of development platform i.e whether .NET or traditional manner ??
If you are interested in Arabic only then Unicode can be a good solution. Unicode supports almost all the Arabic characters. You can find some Unicode related articles here at Codeproject or at Codeguru.
As far as Urdu is concerned, then Unicode is not a good solution. Many Urdu characters are missing. However, since your requirements are low as you only want to display text on menus e.t.c, then you can use Unicode. But if you want to develop full fledge urdu text application, then you have to design fonts yourself.
Imran Farooqui
World first Urdu Instant Messenger[^]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Java is a tool for creating applications that torture users with its awful speed and its ugly interfaces.
Daniel Turini commenting on this article
|
|
|
|
|
|
I have an app where I want to convert audio from one format (PCM WAVE) to another. I've looked at the MSDN and I found out that you should first call acmStreamOpen . I've made a dialog that enumerates all the avaiable drivers, so you can select which driver you want to use for converting. But when acmStreamOpen is called, it returns MSYSERR_INVALPARAM which means "At least one parameter is invalid.". Here's my code:
void OnConvert()
{
ACMFORMATDETAILS formatdetails;
ACMDRIVERDETAILS driverdetails;
HACMSTREAM hConvert;
HACMDRIVER hAcm;
WAVEFORMATEX wSource;
WAVEFORMATEX wTarget;
int res;
DWORD cbwfx;
acmDriverOpen(&hAcm, hCurrentDriver, 0);
memset(&wSource, 0, sizeof wSource);
memset(&wTarget, 0, sizeof wTarget);
acmMetrics((HACMOBJ)hAcm, ACM_METRIC_MAX_SIZE_FORMAT, &cbwfx);
wSource.wFormatTag = WAVE_FORMAT_PCM;
wSource.nChannels = 2;
wSource.nSamplesPerSec = 44100;
wSource.nAvgBytesPerSec = 176400;
wSource.nBlockAlign = 4;
wSource.wBitsPerSample = 16;
wSource.cbSize = 0;
wTarget.wFormatTag = 85;
wTarget.nChannels = 2;
wTarget.nSamplesPerSec = 44100;
wTarget.nAvgBytesPerSec = 176400;
wTarget.nBlockAlign = 4;
wTarget.wBitsPerSample = 16;
wTarget.cbSize = cbwfx - sizeof(WAVEFORMATEX);
res = acmStreamOpen(&hConvert, hAcm, &wSource, &wTarget, NULL, 0L, 0L, ACM_STREAMOPENF_NONREALTIME | CALLBACK_FUNCTION);
}
The hCurrentDriver variable is a HACMDRIVERID which contains the desired driver to be used for conversion. The acmDriverOpen returns 0 so nothing should be wrong there. Anyone know what could be wrong? I've been troubling with this for quite some time now.
All help appreciated.
-Rune Svendsen
|
|
|
|
|
I made a sample 1 byte long file into a zipped SelfExtracting one; the resulting .exe file was less than 12 KB. It means that Decompression unit plus Exe header occupied 12KB.
When I use messy ZLib library I cannot get same result even by optimization techniques such as:
#pragma optimize("gsy",on)<br />
#pragma comment(linker,"RELEASE")<br />
#pragma comment(linker,"merge:.text=.data")<br />
#pragma comment(linker,"/merge:.reloc=.data")<br />
#pragma comment(linker,"/FILEALIGN:0x200")<br />
#pragma comment(lib, "msvcrt.lib") !!!! (link Dynamically to msvcrt.dll)
I've used VC6.0 and ZLib1.1.4 .
The size I gain is always more than 27KB plus GUI resources.
As another way if you build a tiny dll and export "compress2" and "uncompress" functions, the minimum Dll size will be 35.5KB (the minimum possible dll size is 2.5 KB).
I know that some venial difference rise from compilers and systems, but this gap is something else (as I guess.)
How can I extract a tiny simple compression/decompression unit from such libraries (Zlib or Rar)?
Is there any source code available who present a simple and tiny Comp./Decomp. method?
What's wrong with my Dll?
Amir Zamani
|
|
|
|
|
maybe you could try the ZipArchive library which presents a wrapper around the zlib as far as I know and gives great power easily. It can make self-extracting archives and is easy to use, and I'm not advertising it, I just found it good and easy when I used it.
If you search through the articles here at code project you can find an article about it and a link.
Hope it helps and makes your life easier
|
|
|
|
|
Howto remove taskbar icon of CWnd derived (Not CDialog!), created by <font color = blue>CWnd</font>::CreateEx(WS_EX_TOPMOST,...,WS_POPUP) .
Plizzz do help!
--BlackSmith--
/*The roof is on fire, we don't need no water, let the MF burn*/. BHG.
|
|
|
|
|
Have you tried removing the WS_EX_APPWINDOW style from your window. Otherwise you can add the WS_EX_TOOLWINDOW to your window. The only drawback to making your window a tool window is that you will get the mini-caption bar instead of the regular caption bar.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|