|
Check this[^]
Bye
Cool Ju
Vote for Cool Ju
|
|
|
|
|
thank you all very much, I find that it was because my project was compiled in release mode.
Thank you very much!!!
-------------------
I am learning C++ and English
|
|
|
|
|
I use a software (coreftp) which can read unix file permissions (such as drwxrwxrwx) by ftp connection.
but I don't know how to do that myself, please help.
thx
includeh10
|
|
|
|
|
Hello.
If I remember it right, the operating system at the ftp server returns a "dir" listing in it's native format.
A Unix FTP-server will (normally) return a ll-listing as a response on a FTP LIST-command.
Just find the correct positions in the returned ll-strings, and you will get the file permissions.
(As far as I remember, that's the only reason why you have to set what host type you are communicating with. The ftp client program has to know where to find the different pieces of information in the returned directory listing).
This isn't the sample you wanted, but if you find a source code of a FTP-client, then you will know where to look.
|
|
|
|
|
This seems a little strange. I created a CPen object using
LOGBRUSH logbrush;
logbrush.lbStyle = BS_SOLID;
logbrush.lbColor = RGB(0, 0, 0);
myPen.CreatePen(PS_SOLID | PS_GEOMETRIC, 1, &logbrush);
pDC->SelectObject(&myPen);
I have also tried it without the LOGBRUSH structure, but in either case, if I use a pen width of 1 I get a very fine line when I draw an arc(). If I use a pen width of 2 I get a line width of more than 1/16th of an inch (far more than 2 pixels). Any Ideas on why this is and, more importantly, how to change the pen width so it is more than 1 pixel but far less than 1/16th of an inch?
Buck
|
|
|
|
|
Hi,
I am trying to put BSTR variable in buffer, using sprintf however it is showing only first charactor.Can you please let me know how to store it in buffer.I am trying
fun (BSRT name,...)
sprint(buff,L"Name =%s", name);
Thanks
|
|
|
|
|
itkid wrote: ...however it is showing only first charactor.
What is it? How are you verifying this?
This works fine for me:
void main( void )
{
BSTR name(_T("David"));
TCHAR buff[32];
_stprintf(buff, _T("%s"), name);
}
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
DavidCrow wrote: BSTR name(_T("David"));
This is dodgy. A BSTR is not just a wide string - It has a length prefixed before the first character (before where the pointer points). Code like this means that this length prefix is not initialized. This is a serious error and bloody hard to track down. Here are a few examples which show some of the problems:
BSTR name(L"David");
UINT Len = SysStringLen(name);
SysFreeString(name);
Steve
|
|
|
|
|
That will happen if you try to treat a wide (UNICODE/BSTR) string as an narrow (ANSI) string.
If using the ANSI version of sprintf(...) , %s means ANSI string and %S (uppercase 'S') means UNICODE string. For the UNICODE version, the meaning of the format specifiers is reversed.
Additionally, if you pass a wide version of a string as the format specification to the (ANSI version of) sprintf(...) , only the first character will be formatted into the buffer ('N' in your example above).
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Tip for new SUV drivers: Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
itkid wrote: I am trying to put BSTR variable in buffer, using sprintf however it is showing only first charactor.Can you please let me know how to store it in buffer.I am trying
fun (BSRT name,...)
sprint(buff,L"Name =%s", name);
What about this
CString str;
str.Format("Name =%s", name);
BSTR buff= str.AllocSysString()
"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
|
|
|
|
|
Hello. I'm looking to display some html in a dialog/PropertyPage. Ideally I would like to be able to just send an html string to ClassX and have that displayed as it would in a browser in my PropertyPage.
I've looked into HtmlView, but it appears that it requires using an actual html file (url or local) to be specified. I would rather not have to create a temporary html file if I can get away with it.
Any thoughts, link, or comments on this would be greatly appreciated.
Thanks.
|
|
|
|
|
|
CodeGoose wrote: I've looked into HtmlView, but it appears that it requires using an actual html file (url or local) to be specified. I would rather not have to create a temporary html file if I can get away with it.
Any thoughts, link, or comments on this would be greatly appreciated.
Try WebBrowser control...it's in Registered ActiveX directory
"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
|
|
|
|
|
|
Sir,Can u please tell me the answer within 5 minutes please?
Thanks & regards,
V.Natarajan
V.Natarajan
|
|
|
|
|
bad habit to ask so...
generally, it already takes about 5 to 10 minutes to make a good answer, regarding the difficulty of the subject, and moreover, if you feel hurry, you may not ask your question on a forum, especially when it is your first (ok, 2nd with this one) post on the site...
TOXCCT >>> GEII power [toxcct][VisualCalc]
-- modified at 11:37 Wednesday 16th November, 2005
|
|
|
|
|
Sir,In dialog-based application in VC++(MFC),i have one dialog with a button called "Failure conditions".If i click it i will get another dialog box with check-box as control.If i check the option in dialog-box2 & uncheck it the message transmission in dialog-box1 should be stopped.How can i do it & can u
give me tips about the code please?
V.Natarajan
|
|
|
|
|
you have to make into you dialogBox2 a reference to the parent dialog... this way, you can interract with it.
to get the check event on your checkbox, just overload the event with the resource editor wizzard...
and please please, be patient at least 10min until instead of asking for a quick answer ! peaople are not obliged to answer, they do it as a pleasure, nothing more
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Hello All
I have developed an application to convert .WAV files to .MP3 using DirectX 9.0 SDK in VC++ on Visual Studio .NET 2003. My target systems are Windows 2000 and Windows XP. Can any one tell me what all the DLLs and other files (codecs) needs to be shipped along with the application?
Unfortunately we have installed DirectX 9.0 SDK in all our PCs and could not identify the dependency files to be shipped.
Thanks for your time
Ravi
|
|
|
|
|
If your app depends on DX9 then install the redist of DX9 with your install.
|
|
|
|
|
Hi,
Check the redist or MsiRedist folder. It contain the redistributables. Also read the redist.txt to find exactly which file to be redistributed.
Bye
Cool Ju
Vote for Cool Ju
|
|
|
|
|
I'm creating a stream object stored in global memory.
GetImage() function
IStream *pStream;
::CreateStreamOnHGlobal(NULL,TRUE,&pStream);
image->Save(pStream,&encoderClsid,&encoderParameters);
..// bit operations no memory allocations just math calcuations
//then
delete image;
pStream->Release();
the problem i have when application is run ,and begin executing the GetImage Function, the memory is keep increase after each call and nothing is freed, what should i do to free memory after each call the two statements :
delete image;
pStream->Release(); as they have to effects
I also tried to use GlobalFree(pStream), and GlobalFree(&pStream) with no avail. memory keep rasing after each call
|
|
|
|
|
raed wrote: I also tried to use GlobalFree(pStream), and GlobalFree(&pStream) with no avail. memory keep rasing after each call
You will need to call GetHGlobalFromStream(...) to get the correct handle to pass to the GlobalFree function.
However, the way you created the stream object, it should clean itself up...?
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Tip for new SUV drivers: Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
Hello dear friends,
I've a problem in showing video captured from webcam
First I wanted to learn to do this by using the CAvicap, but it didn't work and I couldn't find anybody who can tell me what I did wrong.
So I was a bit desperate and searched another method and that was using the DirectShow of DirectX SDK. Well, I've still not coded, because I want to know how Directx and COM work.
But the main problem is still that I don't know how to display the video from the webcam on the screen.
The part to show the video using webcam with the Avicap class is here:
<br />
void CCamSampDlg::OnStart()
{
CRect rectangular;<br />
GetClientRect(&rectangular);<br />
<br />
<br />
WebCam.Create(WS_CHILD|WS_VISIBLE,rectangular,this,TRUE);<br />
WebCam.ConnectWithDriver(-1);<br />
WebCam.SetPreviewRate(15);<br />
WebCam.StartPreview(TRUE);<br />
<br />
}<br />
The only thing wat happens when I execute, is the Led blinking of my webcam, wich means that there is some activity going on. But I see not a window opening to show the captured video.
So I hope you smart guys can help this dumb boy, so I can give my wife more attention :->
If you want the whole project, I can send it to you by email
If my application works, I forget all my problems.
|
|
|
|
|
I have created a dll in vc7 and called by a c# form using dllimport. But this dll seems can't be load symbol when I try to debug. So I can't trace into the cpp code. Even I set dll project as start project and set the c# application as debug command.
Is there a solution to this situation?
|
|
|
|