|
IS the result of an MD5 hash Case Sensitive
i.e. are these two md5's can be of same string
4839ab3fbb97ad803801df29502b814b
4839AB3FBB97AD803801DF29502B814B
thanks
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
|
see this link first : http://www.codeproject.com/audio/twaintest.asp
I used CTwain from there.
I included CTwain with my ActiveX control. When i call selectSource it worked. When i call Acquire , the source's user interface is displayed. But the following condition in ProcessMessage(MSG msg) is not become true when clicking on Close(Cancel or Exit) , Ok (or Scan).
if(GetRC() != TWRC_NOTDSEVENT)
{
AfxMessageBox(_T("In TWRC_NOTDSEVENT in ProcessMessage" )); // it not executed always
TranslateMessage(twEvent);
}
Thus TranslateMessage is not called.
I subclassed my control class from CTwain. and in OnCreate i included the following line.
InitTwain(m_hWnd);
if(!IsValidDriver())
{
AfxMessageBox("Unable to load Twain Driver.");
}
and in PreTranslateMessage (BOOL CImgAnnCtrl::PreTranslateMessage(MSG* pMsg))
i included the following line.
ProcessMessage(*pMsg);
Plese help me. What is the problem.
I followed the same procedure in a stand alone(exe (mfc)) application it worked well.
|
|
|
|
|
How can mouse access windows desktop explorer programmatically
using vc++?I want to implement mouse gesture into windows explorer.
How can i recognize mouse co-ordinate in OS's window .
This is my college project .So please help me.
|
|
|
|
|
Try searching something on implementing Windows Hooks. You will find a lot of material here in CodeProject.
"Aerodynamically, the bumble bee shouldn't be able to fly, but the
bumble bee doesn't know it so it goes on flying anyway." - Mary Kay Ash
My Articles
|
|
|
|
|
Can someone give me the begining function to draw multiple lines using MFC? I am having trouble understanding process, I cannot seem to figure out the correct starting point. I am trying to draw (8) different continuous lines using the (sin and cosine) functions based on user input. I only need a starting poin, not the whole thing. Any help appreciated Thank
|
|
|
|
|
Ok... are you trying to do a plot of a cosine and sin function here? If you are then you first need to calculate a list of points, then plot that list. For example:
CClientDC dc(this);
POINT points[100];
for(int i = 0; i<100; i++)
{
points[i].x = i * 5;
points[i].y = sin(i * 0.06283185) * 100 + 100;
}
dc.Polyline(&points, 100); Do a similar process for different functions, and hey presto - 8 functions.
Joel Holdsworth
Wanna give me a job this summer?
Check out my online CV and project history[^]
|
|
|
|
|
Hi all,
I need to disable directx from my display driver.
I need the API that does it.
Please reply if you know anithing about it.
Thanks
|
|
|
|
|
Hello, Does Any one know how to create a movie file AVI or MPEG from JPEG or BMP file. I need to create an app that can read images from a directory and create a movie file from that? Please.... any help or pointers in the right directions
|
|
|
|
|
This[^] article might help.
Steve
|
|
|
|
|
I have a windows cluster with 2 servers running Windows Server 2003. Initially, my client-server application was crashing so I was fixing bugs with my code. Now, periodically one the two cluster servers will just restart itself (it's like a hard system crash to where the server just reboots).
The only thing I've noticed that looks a bit odd is that the memory that SQL Server 2000 (Enterprise Edition) uses climbs rapidly until it reaches about half the server's physical memory (~1.5 GB). According to the guy that setup the cluster, this is normal. I think that when a cluster server crashes, it is the one that is currently running the SQL Server.
My application uses ADO (VC++ 6.0) to access data in SQL Server (which is cluster aware). I've setup a program to simulate alot of network traffic (which means alot of database access; opening and closing connections the database constantly). When this stress test is run is when I notice SQL Server's memory climb constantly.
The server crash (restart) is random; think it has happened even without the stresss test going.
I'm desparate for any ideas or thoughts on this matter. Anyone ever experience something simular (i.e. a clustered server restarting itself)?
|
|
|
|
|
I have been having trouble with this program lately and could use a little help.
The program deals with drawing a diamond with a width specified by the user. So that, the widest part of the diamond is 13 *'s long. The diamond is supposed to be drawn with *'s. If anyone can add any input, feel free. Thanks.
|
|
|
|
|
int size,x,y,temp;
size=13;<br />
y=1;<br />
x=size/2;
for(i=0;i<=size-1;i+=2)<br />
{<br />
temp=x;<br />
for(j=0;j<=i;j++)<br />
{<br />
draw at x,y<br />
x++; <br />
}<br />
x=temp--;<br />
y++;<br />
}
I haven't tried the code yet.
<italic>Work hard, Work effectively and a bit of luck is the key to success.
|
|
|
|
|
|
This is the code i have so far:
for(int i=0;i<=width;i+=2)
{
cout<<"\n";
for(int j1=0;j1<=(tempwidth/2)-1;j1++)
cout<<" ";
for(int j2=0;j2<=i;j2++)
cout<<"*";
tempwidth--;
}
For an example i am using a width of 13. Through each line of the triangle the amount of spaces before and after the asterisk's are 1 less than the line before it. So by taking the width and dividing it by 2, that chops off the decimal and subtracts one which gives me the right amount of spaces. In my head this code makes sense. But, I am obviously missing something and I just can't seem to figure out what else is needed. Any advice is appreciated.
|
|
|
|
|
Hi...
I'm trying to make a progress bar of this type: http://www.airwebreathe.org.uk/progress.png[^]. The type you get when you start a process of some kind which will take an unknown amount of time. To show activitty the progress bar just swooshes. Does anyone know how to get the CProgressCtrl to do this snake motion?
Joel Holdsworth
Wanna give me a job this summer?
Check out my online CV and project history[^]
|
|
|
|
|
How about something like this[^]
Steve
|
|
|
|
|
Yes that would probably do it, but I was wondering if Microsoft had some undocumented way of getting the standard control to do the job. Thus ensuring that the control always looks correct in future versions of windows, and that I don't incur added mass to my exe.
Joel Holdsworth
Wanna give me a job this summer?
Check out my online CV and project history[^]
|
|
|
|
|
Joel Holdsworth wrote:
I'm trying to make a progress bar of this type: http://www.airwebreathe.org.uk/progress.png[^]. The type you get when you start a process of some kind which will take an unknown amount of time.
This can be achieved by setting the correct style (PBS_MARQUEE) when creating the ProgressCtrl. The documentaition says:
PBS_MARQUEE
Version 6.0 or later. The progress bar moves like a marquee.
Greetings, Ralph
Wanna give me a job this summer?
Well ... if you'd better read the docu ...
|
|
|
|
|
Ralph Wetzel wrote:
Well ... if you'd better read the docu ...
ok ok... fair play. My copy of MSDN is out out of date. I should have looked online I guess.
Thanks for your help anyway.
Joel Holdsworth
Wanna give me a job this summer?
Check out my online CV and project history[^]
|
|
|
|
|
Note that you'll need v6 of Comctl32.dll and Shell32.dll for this style to work.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Why does the following print out 2 twice (instead of 1, 2)?
#include <stdio.h>
template < int i >
void foo()
{
printf("%i\n", i);
}
int main(int argc, char* argv[])
{
foo<1>();
foo<2>();
return 0;
}
- thanks
|
|
|
|
|
This is a well known bug in VC++ 6.0: the compiler is blind to template parameters that do not somehow appear as actual arguments of a template function. Hence, foo<1> and foo<2> are treated as the same instantiation.
The following workaround can be applied:
template<int i>
struct int_type
{
};
template<int i>
void foo(int_type<i>* dummy=0)
{
printf("%i\n", i);
}
int main(int argc, char* argv[])
{
foo<1>();
foo<2>();
return 0;
} the dummy argument pulls the i template parameter into the list of arguments of foo , so circumventing the compiler bug. Moreover, as dummy has a default value, you don't need to explicitly mention it when calling foo . Sneaky, isn't it?
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
Want a Boost forum in Code Project? Vote here[^]!
|
|
|
|
|
Joaquín M López Muñoz wrote:
This is a well known bug in VC++ 6.0
grrr... ok, thanks!
|
|
|
|
|
I should know how to do this but I keep on coming up with compile errors. I want to create a dynamic-length array of pointers to a custom class I made. I tried using the following malloc commands:
CClass * list[] = (CClass *) malloc(sizeof(CClass) * AmountOfPointers);
The compile error tells me I can't equate a pointer to an array of pointers. Should I be using reinterpret_cast to do this? I tried changing the cast from (CClass *) malloc... to (CClass *[]) malloc... but I got another error, cannot recast a pointer to void to an array of CClass pointers. I tried looking for help on the site but I couldn't find into on dynamically-sized arrays of pointers. Elsewhere in my program I have an array of pointers to something else but that array length is static.
|
|
|
|