|
To figure out a percentage, take the number of items completed, multiply it by 100, then divide it by the total number of operators to complete. If you don't kmow that, you'll need to lie.
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
|
|
|
|
|
Hello,
Thanks for replying.I know the princile behind it.But i don't know how to display it in a progress Bar.
Shibu K.V.
Senior Research Associate.
VLSI ASIC Hardware Design Group
Electronics R&D Centre,Trivandrum
India
|
|
|
|
|
Shibu.V.Nair wrote:
Trivandrum
Hey, you live in the same place as Nish !!!!
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
|
|
|
|
|
Hi Jami,
You mean "National Institute of Speach & Hearing"?.
Shibu K.V.
Senior Research Associate.
VLSI ASIC Hardware Design Group
Electronics R&D Centre,Trivandrum
India
|
|
|
|
|
Shibu.V.Nair wrote:
You mean "National Institute of Speach & Hearing"?.
No, he's talking about Nishant.
Regards
Thomas
Sonork id: 100.10453 Thömmi
Disclaimer: Because of heavy processing requirements, we are currently using some of your unused brain capacity for backup processing. Please ignore any hallucinations, voices or unusual dreams you may experience. Please avoid concentration-intensive tasks until further notice. Thank you.
|
|
|
|
|
Hi all,
Is it possible for me to check whether my multimedia speakers are muted, through software?.If yes how can I remove the 'mute' using software?
With regards
Shibu K.V.
Senior Research Associate.
VLSI ASIC Hardware Design Group
Electronics R&D Centre,Trivandrum
India
|
|
|
|
|
hi all.
i have to Read the data for a Particular Portion of a wave file, as an Integer array or a Byte array.
how i can i use the "mmioRead" function for above.
Please help me very urgent
thanks in advance.
|
|
|
|
|
I see you need the answer enough to ask three times, but not enough to create an account......
Anyhow, I do not know the answer, but if it's in a wav FILE then surely you can read the data using iostreams ?
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
|
|
|
|
|
I'm writing a slide show screen saver, and I want the images to fade in every 5 seconds. I got the fading part working, it's just that as soon as it finishes drawing it seems to be throwing a WM_ERASEBKGND message(or so i'm guessing), rather than waiting the 5 seconds it is supposed to. Any ideas on how to make this work or another method of getting the desired effect? I am a beginner so I would rather not have to use mfc because that would mean having to do a workaround for it to work with scrnsave.lib.
here is what my onPaint function looks like:
PAINTSTRUCT ps;
HDC hdc;
float alphas[] = {0.2f,0.4f,0.6f,0.8f,1.0f};
hdc = BeginPaint(hwnd, &ps);
Graphics graphics(hdc);
...code that gets "filename" is irrelevant so i didnt include it...
Image image(filename);
int x = (GetSystemMetrics(SM_CXSCREEN) / 2) - (image.GetWidth() / 2);
int y = (GetSystemMetrics(SM_CYSCREEN) / 2) - (image.GetHeight() / 2);
ImageAttributes imageAtt;
int iWidth = image.GetWidth();
int iHeight = image.GetHeight();
for(int i=0;i
|
|
|
|
|
this is what the for loop looks like:
for(int i=0;i<sizeof(alphas);i++){
ColorMatrix colorMatrix = {1.0f, 0.0f, 0.0f, 0.0f, 0.0f,
0.0f, 1.0f, 0.0f, 0.0f, 0.0f,
0.0f, 0.0f, 1.0f, 0.0f, 0.0f,
0.0f, 0.0f, 0.0f, alphas[i], 0.0f,
0.0f, 0.0f, 0.0f, 0.0f, 1.0f};
imageAtt.SetColorMatrix(&colorMatrix, ColorMatrixFlagsDefault, ColorAdjustTypeBitmap);
graphics.DrawImage(&image,Rect(x,y,iWidth,iHeight),0,0,iWidth,iHeight,UnitPixel,&imageAtt);
}
|
|
|
|
|
Hi All,
I have a problem regarding SOAP & ISAPI_Filter.
Now, I'm trying to write an ISAPI Filter(Dll), I'd like to call the function of Soap_Server(DLL) via ---.WDSL.
But my ISAPI Filter can't CONNECT to Soap_Server. My Soap_Server is for some data manipulation, using MS SOAP Toolkit 2.0 & VC++ 6 . I can call it's functions from other Soap_Client programs(MFC/VB exe). But my ISAPI Filter can't call.
So, How can ISAPI_Filter call the functions of Soap_Server?
Anyone have the sample code for that?
Any article about that?
The following Connect() function of ISAPI Filter can't CONNECT to my Soap_Server
bool CPlugIn_IIS5Filter::Connect()
{
HRESULT hr;
CString NewWSDL="http://MyWebServer/SoapSvr/MyDBSOAP.WSDL";
if(m_WSDLConnected != NewWSDL)
{
if (m_pSoapClient != NULL) m_pSoapClient.Release();
hr = m_pSoapClient.CreateInstance(__uuidof(SoapClient));
if(FAILED(hr))
{
// DisplayHResult(_T("Cannot create SoapClient."), hr);
return false;
}
try
{
m_pSoapClient->mssoapinit((LPCTSTR)NewWSDL, _T(""), _T(""), _T(""));
}
catch(_com_error err)
{
// DisplayFault(_T("Cannot initialize SoapClient. "));
return false;
}
m_WSDLConnected = NewWSDL;
}
return true;
}
If you have any info, pls forward to me.
Any other way to connect Soap_Server?
Thanks and best regards
Aung
aungns@sensecurity.com
|
|
|
|
|
Is there a way to find out in VC6 how much memory is being used by the application at any given point of execution, and what variables are using this memory?
A reasonable man adapts himself to the world. An unreasonable one persists, trying to adapt the world to himself. That is why all the progress in the world depends on the unreasonable men.
|
|
|
|
|
I keep getting an error message telling me that the file cannot be found UNLESS I hard-code the name of the file to work on (in this case delete).
Here's the code:
SHFILEOPSTRUCT fileOp;
CString sSrc;
fileOp.hwnd = this->m_hWnd;
sSrc = pItem->sCol4;
fileOp.pFrom = (LPCSTR)sSrc;
fileOp.pTo = "\0";
fileOp.fFlags = FOF_NOCONFIRMATION | FOF_SILENT;
fileOp.wFunc = FO_DELETE;
int iRes = SHFileOperation(&fileOp);
It seems apparent that the problem is in the conversion from the CString to LPCSTR for fileOp.pFrom. It works fine if I replace the line "fileOp.pFrom...." with
fileOp.pFrom = "C:\\Dummy.txt";
The strings look correct in the debugger window, so I'm at a loss here.
I've tried various different castings and even tried using sSrc.GetBuffer(n) where n is various different values. None of those things seems to make a difference.
So what's the snag? Any suggestions?
|
|
|
|
|
pFrom must be a double-null-terminated string. It is actually the Win32 version of a string list - one null-terminated string after the other, with two nulls to mark the end. The version where you set pFrom to a string literal just happens to work, even though the correct literal is "c:\\dummy.txt\0".
You'll need to set up a character buffer (not a CString because CString does not handle embedded nulls) and use that for pTo.
--Mike--
Just released - RightClick-Encrypt v1.3 - Adds fast & easy file encryption to Explorer
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
I had noticed in the documentation that .pFrom (and .pTo) had to be double-null terminated, but I did not realize that CStrings would not handle the nulls. Thanks.
Oh, BTW, it worked with "c:\\Dummy.txt", "c:\\Dummy.txt\0", and "c:\\Dummy.txt\0\0".
However, I confess that I'm lame where string manipulation is concerned. I've fiddled with it and still can't get it to work. Here's what I've got:
fileOp.hwnd = this->m_hWnd;
sSrc = pItem->sCol4;
char szSrc[255];
strcpy(szSrc, (LPCTSTR)sSrc);
int iSize = strlen(szSrc);
strcat(szSrc, "\0\0");
iSize = strlen(szSrc);
fileOp.pFrom = szSrc;
fileOp.pTo = "\0\0";
fileOp.fFlags = FOF_NOCONFIRMATION | FOF_SILENT;
fileOp.wFunc = FO_DELETE;
SHFileOperation(&fileOp);
Ugh! I'm clearly missing something rather fundamental.
Thanks.
|
|
|
|
|
strcat(szSrc, "\0\0"); has no effect. Watch the szSrc array in the memory watch window and you'll see. None of the C string functions work with embedded nulls, because the first null ends the string. What I do is zero-fill the array so no matter how long the actual file name is, there will be zeros after it.
char szSrc[MAX_PATH+1] = {0};
--Mike--
Just released - RightClick-Encrypt v1.3 - Adds fast & easy file encryption to Explorer
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Yeah, I noticed that the strcat(szSrc, "\0\0") did nothing.
Thanks for the suggestion (zero filling the array) -- it worked like a charm.
I just don't think I would have ever thought of it.
BTW, I've enjoyed your articles. Keep up the excellent work and thanks a bunch.
|
|
|
|
|
I want to transform a expression to a binary tree but I face some problems. So I need some examples. Where can I find such sources?
|
|
|
|
|
What kind of expression ?
~RaGE();
|
|
|
|
|
|
Ok, if i remember right, someonehas already asked for such a thing. I remember having programed such a thing a long time ago. If u let me 2 days, i´ll find that code back.
Background is simple : you have to parse the expression backwards (i think this was because i´ve used functions such as cos(), so if you are not you may parse it forwards), watch for the parenthesis level (each time a ( is opened, par. level increases an decreases when a ) is found)). Once you get the max level (so you´ll get the first thing to compute regarding operation priority), you look for *+-/ or ^ which are always nodes in the binary tree. Numbers (4, 5647, etc) are always leaves. These operators have two children. Functions like sin() and the - have only one child.
bla bla ... i guess the code will be more explicit Just mail me back in 2 days if i forgot you
Mmmh ... i smell an article ...
~RaGE();
|
|
|
|
|
a google search turned up plenty of them.
-c
To explain Donald Knuth's relevance to computing is like explaining Paul's relevance to the Catholic Church. He isn't God, he isn't the Son of God, but he was sent by God to explain God to the masses. /. #3848917
|
|
|
|
|
Hi,
I have 2 dialog boxes. Dialog box 'A' will call dialog box 'B'. Both have same list control. If I update list control of dialog box 'B' after it is been called by using dialog box 'A', list control of dialog box 'A' must also update. How do I do it?..Please anybody
|
|
|
|
|
This is bound to be in the FAQ. You need to store a pointer to the other dialog box, so you can interact with the controls. They cannot be synched automatically, you'll need to do it yourself.
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
|
|
|
|
|
Another solution (but i warn you the real one is the one with pointer which Christian told you about), is to simply post a user defined message with PostMessage, intercept it with a OnMyMessage function in which you update the list.
~RaGE();
|
|
|
|
|