|
C++ ?
I am writing a virus scanner and all is working fine but, the UI freezes up when it is moved.
I recursivly call the same function over and over again until all files have been read.
I put in a timer function, and even tried sleep(1000) but alas no good.
Any idea's?
Best Wishes,
ez_way
|
|
|
|
|
U need to put your loop or recursive call in a separate thread
Check AfxBeginThread
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Example pls. Thanks
Best Wishes,
ez_way
|
|
|
|
|
UINT doLongTimeConsumingWorkHere ( LPVOID pParam )
{
while (recursing)
BlaBlaBla ( ) ;
return 0 ;
}
AfxBeginThread ( doLongTimeConsumingWorkHere , pParam ) ;
the pParam u pass here is the argument of the doLongTimeConsumingWorkHere
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
OK Thanks,
Great answer1
Best Wishes,
ez_way
|
|
|
|
|
Hi,
I don't know how to say it in a good way in english, but i need to know how to setup the path that i go through wenn i press Tab in a dialog. Is there a Standart function for it in VC6? or do i have to edit the Resource Template file?
greetz willem
|
|
|
|
|
You might want to check out the "Tab Order" item in the Layout menu that becomes visible when you select a dialog in the resource view.
Cheers,
Fredrik
"Felix qui potuit rerum cognoscere causas."
|
|
|
|
|
the answer was right there, just couln't find it,... thank you...
|
|
|
|
|
Press Control +D
Best Wishes,
ez_way
|
|
|
|
|
HI All
How to gray checkbox in tree control.
Thanks
Shiv
|
|
|
|
|
I hope my program can display check boxes by reading configuration files.
But how to add the check box control dynamically?
|
|
|
|
|
|
Is there any valid reason in 2003 to use unions in C++?
thanks
|
|
|
|
|
'Cause there is union keyword.
|
|
|
|
|
I was going to say no reason but as I think of it I wrote my own Variant like object with extended functionality that was a union of 10 different types without a union the code would have been more complicated.
John
|
|
|
|
|
In many cases, it's a bad idea (including some cases in which it's used in the Windows API), but it has its uses. One such use would be if you wanted to have a color as a 32-bit integer, but wanted to easily be able to extract the red, green, and blue out of that integer. (Well, maybe that use isn't the best example, but there are good uses that are similar to that.)
"I do not feel obliged to believe that the same God who has endowed us with sense, reason, and intellect has intended us to forgo their use." -- Galileo Galilei
FLUID UI Toolkit | FloodFill in C# & GDI+
|
|
|
|
|
what's wrong with a little bit-bashing?
UINT col = 0xFFCC00;
int red = (col & 0xFF0000) >> 16;
int green = (col & 0x00FF00) >> 8;
int blue = col & 0x0000FF;
cout << "r: " << red << " g: " << green << " b: " << blue;
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
yep!!
there are valid reasons !!
but as 2003 is about to end....
so answer will not give u much benifit....
u will again ask this ques..in 2004
so lets wait for new Year.
Happy new year in Advance
take care
Abhishek Srivastava
Software Engg (VC++)
India ,Noida
Mobile no 9891492921
|
|
|
|
|
Examples (pls anyone correct me if I used union unnecessarily):
1. GetDlgItem returns a handle to a control. See the description:
The pointer returned is usually cast to the type of control identified by nID
It's great, but this handle can be that of a button, a static text, etc. You need to redefine (in this case "refine") the definitions.
2. You have a string and want to analyze parts of it (old-timers: think of the concept "record").
3. You want to read or write data to the registry; the buffer has to be defined as BYTE or char, but your actual data is not compatible with that.
I think the union is an indispensable feature.
|
|
|
|
|
Hi,all.
I'm a Chinese college student.I'm studying Computer Sciene in a school in China.
The problem is almost all school use Turbo C 2.0 as the main compiler when they teach C language course. And thus, almost all beginners think the Turbo C is the essence of learning C language,and they start by using it.Still a lot of people think that Turbo C is the main developement tool.And for C++ beginners , they also think that they should beginner with Turbo C.
So,What do you think of this problem?Does this create problems? What do use when you a beginner? And What compiler do you think is suitable for a beginner?
|
|
|
|
|
There is no real reason to use Turbo C. I used it 10 years ago. Compared to Visual Studio or Borland Builder it is quite primitive with just the basic stuff and does not have any RAD at all. I don’t even believe you can make a 32 bit windows program with that version so it's use is limited. But I bet you can get it very cheap.
John
|
|
|
|
|
yndfcd wrote:
almost all school use Turbo C 2.0 as the main compiler when they teach C language course
Why don't the use GCC? Its modern, and is crossplatform, and its *free*.
<political statement>Oh well, this is China. Officials might not like things that are free</political statement>
Who is 'General Failure'? And why is he reading my harddisk?!?
|
|
|
|
|
What is GCC ?
is it available for download ?
|
|
|
|
|
GCC is the 'GNU compiler collection', a series of compiler frontends for different languages in combinations with backends for a real lot of processors.
For all major systems (like Win32) are ready made distributions using the frontend (e.g C and C++) and backend (intel/amd processors) available.
Look here[^] and go to 'GNU projects'.
Hope this helps.
Who is 'General Failure'? And why is he reading my harddisk?!?
|
|
|
|
|
Thank you alot..
but what about the IDE ?
I realized (from the web site) that GCC is a command line only utility..
any alternatives ?
|
|
|
|