|
1) HANDLE represents an instance of the thread. WaitForSingleObject function is waiting on this thread handle until the thread execution is finished.
2) Looks like a semicolon(;)is missing after the declaration of ThreadProc(). Moreover, the #include statements are not complete.
|
|
|
|
|
hi, guys
I am newer to MFC and have a question here
----------------
| |
| |
| A |
|_______________|
| |
| B |
|_______________|
Area A and B is two zones, I have a Button in A, and if i click the button, B disappears, showing below, only A; if i click the button again, B shows like above pic
----------------
| |
| |
| A |
|_______________|
my question is how to implenment this function? could you guys give me some idea? thank you very much
|
|
|
|
|
When you design the dialog, make it with area A and B showing.
In the OnInitDialog function of the dialog use SetWindowPos method and set the new height in its cy parameter.
On button click use SetWindowPos again with the full height in the cy parameter.
You can get the current window position using GetWindowRect function.
|
|
|
|
|
You can handle the button click and in the handler, resize the window to appropriate sizes.
|
|
|
|
|
|
thank you, Good Garth, that's exactly what i need
|
|
|
|
|
might be these functions useful for u.
MoveWindow() or SetWindowPos().
Regards,
Srinivas
|
|
|
|
|
thanks, the problem has been solved
|
|
|
|
|
I need a simple HTML parser that can read text from a html file (bold or italic) and tables. I work with Borland Builder C++ 6.
Could you please direct me to some articles/code?
THANKS!
|
|
|
|
|
This[^] article may help.
/ravi
|
|
|
|
|
thanks!
I forgot to mention that the file is from the local hard drive, not from a web server.
modified on Monday, November 30, 2009 5:01 PM
|
|
|
|
|
justme89 wrote: I forgot to mention that the file is from the local hard drive, not from a web server.
Not a problem - just have constructUrl() return a file:// URL.
/ravi
|
|
|
|
|
What about creating your own simple parser using regular expression??
|
|
|
|
|
hello friends
I have to finish an assignment tht says do unlimited number times an undo redo operation in console application.
I wrote an application but in my application I m adding and removing a number from the list and after that i m performimg undo and redo on that.but that is not sufficient.
I need some operation on that I can perform Undo redo but in console application.
Thanks & Regards
Yogesh sikri
|
|
|
|
|
I am not sure about what you are trying to do. What types of operations do you want to undo/redo? You have to give details about your project.
|
|
|
|
|
undo/redo is pretty simple. you need:
1. a data structure that can hold all of the information about any operation the user can perform which can be undone.
2. two stacks
every time the user performs an operation, fill out a structure with all of the information needed to undo that operation, and push it onto the undo stack. clear the redo stack.
to undo, pop the top item off the undo stack, and reverse everything in that item. then push that item onto the redo stack.
to redo, pop the top item off the redo stack, reverse everything in that item. push it onto the undo stack.
|
|
|
|
|
hello
thanks for ur reply,but i m doing some oeration like adding number to vector and removing.i want to know tht can i do any more operations.?
Regards
Yogesh
|
|
|
|
|
In addition to the replies above,
Check here[^]
Starting to think people post kid pics in their profiles because that was the last time they were cute - Jeremy.
|
|
|
|
|
Guys,
what is wrong in here?
i am trying to make a small util to execute commands on linux with source in c
the problem is with the parameters array
http://91.199.99.120/temp/ex1.c[^]
Thanks
|
|
|
|
|
Please read the guidelines on posting above. Then, post the section of your code that is failing and include a proper description of what is not working.
|
|
|
|
|
alonchap wrote: what is wrong in here?
Numerous things. For starters:
You need to check the value of prompt before trying to print it.
You are using command incorrectly (hint: it points to nothing valid).
The first argument to strtok() must be modifiable.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
hi i noe this may sound simple but im having problem in converting char to string.
string get_currenttime(){
time_t rawtime;
string s1,
stringstream ss;
struct tm * timeinfo;
char buffer [80];
time ( &rawtime );
timeinfo = localtime ( &rawtime );
strftime (buffer,80,"%c",timeinfo);
ss << buffer;
ss >> s1;
}
From the above code which i found online, i need to convert the data in buffer to string. i tried using stringstream but results are not complete. See above for example
|
|
|
|
|
You don't need the stringstream variable. Just use
s1 = buffer;
and it will create a string from the contents of buffer .
|
|
|
|
|
The difference in result that you see is because the >> operator will get characters only till a newline or space character. You could use the getline function to get the entire result. But the solution suggested by Richard MacCutchan is simple and the best.
|
|
|
|
|
We are using visual studio to build our applications. Our biggest concern is link time especially for debug target. I list bellow what we tried to minimized link time and what were the gain. If you have others suggestions, reply to my post.
Note that I post a suggestion on “Microsoft Connect” titled “Optimize link time in real developers environment”, feel free to vote for it at : https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=511300&wa=wsignin1.0
1 - Convert many statics libraries to DLLs. Important gain.
2 - Remove debug information for libraries who are rarely debugged (good gain).
3 - Delete PDB file in « Pre-Build Event » (strangely it give interesting gain ex: 2min44 instead of 3min34).
4 - Working with computer equiped with lot of RAM in order to maximize disk cache. The biggest gain. Same computer can link 20 times faster with 16GB instead of 2GB. More than 16GB change nothing.
5 - Big obj versus small obj. No difference.
6 - Use secret linker switch /expectedoutputsize:120000000. Small gain.
7 - Maximize Internal linkage vs External linkage. It's a good programming practice.
8 - IncrediLink (IncrediBuild give interesting gain for compilation but almost no gain for link).
9 - Explicit template instantiation to reduce code bloat. Small gain.
10 - Partial template specialization to decrease the number of symbols. Small gain.
11 - Change project options (/Ob1, /INCREMENTAL, Enable COMDAT folding, Embedding manifest, etc.). Some give interesting gain other not. We try to continuously maximize our settings.
12 - Separate software component as much as we can afford to minimize dependencies. You can then work in unit test that link fast. But we still have to integrate things together, we have legacy code and we worked with third party components.
Note that for all our experimentations, we meticulously measured link time to ensure repeatability.
Thanks
|
|
|
|