|
Thanks Iain,
My question is,
I think using in my sample,
#define GETFOO (Foo( &counter ), counter)
is the same as
#define GETFOO Foo( &counter )
So, no benefits of using , operator, right?
regards,
George
|
|
|
|
|
George,
I have to say, that some of your questions are pretty interesting, and I read the threads because I learn as well. But something that I don't understand...
If you ask how does it works, and you get a explanation...
If you ask for an example of practical use, and you get an explanation...
If you ask for... and you get an explanation...
WHY THE HELL DO YOU SAY YOU ARE NOT AGREE AND REASK ANOTHER TIME THE SAME to any other person that is writing in the thread, altough the question has been answered 2 or 3 times (but it seems that you don't like the answers)?
I guess (from the questions you made) you should be more skilled than me. But man... I can not understand it. Looking in your secondary/third questions about the same thing (or something derived) it seems that you are unable to get the contents you are answered with.
Sorry if I seem a bit rude, I have no intention to offend you.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
amen (and 5 for this !)
|
|
|
|
|
I'll refer you to my previous answer, where I spell out the use & benefit of it. Or to toxcct's.
Iain.
|
|
|
|
|
Are you confused by the comma (a.k.a., sequential-evaluation) operator?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Yes DavidCrow,
Now my question is answered. I appreciate the help from all people.
regards,
George
|
|
|
|
|
I tried to hook TB_*, but failed.
NIM_* seems wrong.
|
|
|
|
|
followait wrote: NIM_* seems wrong.
Those are messages/flags/actions that Shell_NotifyIcon() sends. You may not be able to intercept them as they probably don't map to any WM_* message.
What exactly are you wanting to do?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
NOTIFYICONDATA is hooked by hooking WM_COPYDATA
|
|
|
|
|
Hi ALL,
I have created a child process and I have handle of child process now.
After this I have called DuplicateHandle and got another copy of same handle.
Once this child process finishes execution, I have closing both the handles.Is there any problem?
|
|
|
|
|
vikrams wrote: Is there any problem?
None that I know of. Once CloseHandle() has closed the last handle to an object, the object is removed from the system.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I'm setting the check state in the treeview but after the treeview becomes visible for the 1st time, nothing is checked.
If I do the same operation after the treeview is visible, everything works fine.
How can I get the treeview to correctly display the checked states the first time around? I've even invalidated the treeview window, called UpdateWindow, and RedrawWindow with no success.
TIA
---
Yours Truly, The One and Only!
web: devmentor.org
Design, Code, Test, Debug
|
|
|
|
|
I was able to find the problem and fix it, just needed to add an image list!
---
Yours Truly, The One and Only!
web: devmentor.org
Design, Code, Test, Deploy
|
|
|
|
|
Hi all,
I have made a simple dialog based application, in which i have made a next button and on that button click i m showing a progress bar and then performing some different operations. Now what i want is that my progress bar should start running and as soon as i press next button and should stop as soon as task is fnished...But my problem is it finishes the task first and then shows the progressbar....how should i solve this
thanks in advance
|
|
|
|
|
IMHO the simplest way will be making the 'different operations' code responsible to update the bar progress.
You can also use threads but it may become a little harder.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
put timer to show progressbar in active mode!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
The problem is that your "different operations" are bogging down the primary thread thus leaving no room to update the UI. Do your work in a secondary thread, and post "update" messages back to the primary thread (i.e., the one that owns the UI).
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hello everyone,
In the following code, how GetArrayLength(arr1) is matched to template function size_t GetArrayLength(const T(&arr)[size])? My confusion is how arr1 is matched to const T(&arr)[size]? I have tried to change const T(&arr)[size] to const T(arr)[size]) but it does not work.
template<size_t size,="" typename="" t="">;
size_t GetArrayLength(const T(&arr)[size])
{
return size;
}
int main()
{
char arr1[] = "Hello World";
std::cout << GetArrayLength(arr1) << std::endl;
return 0;
}
</size_t>
thanks in advance,
George
|
|
|
|
|
|
Hi Matthew,
Could you answer from your points, how they are matched please?
BTW: I have the C++ Programming Language book at hand, but from section 13.3 (Function Template), I can not find the answer to my specific question.
regards,
George
|
|
|
|
|
George_George wrote: I have the C++ Programming Language book at hand, but from section 13.3 (Function Template), I can not find the answer to my specific question.
This in itself is a pretty good clue that what you're wanting to know is a)obscure and b)probably compiler dependent. I'm afarid I don't know enough about modern compilers, despite having written analogues of most of the parts, to even take a good guess at how template parameter matching happens. One thing is almost certain, there will be priority orders established in terms of parameter positions, and matching against type modifers. This sort of prioritization is often dived into categories like is there a strong match (exact type equivalence), if not is there a weak match (different only by type one modifier) and then there'll be a priority order, or classification, of type modifers to determine which weak matches are tried first.
Compilers are beastly complicated and facinating things. If you want to get a really good idea of how they work look for something known as The Dragon Book, it's the bible of compiler writers (I never made it more than half way through )
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
Thanks Matthew,
Your answer is general and it is appreciated if you could provide some ideas of how in my question the function prototypes and functions are matched.
regards,
George
|
|
|
|
|
Hi Experts,
What is mean by this statement ?
<br />
inline CMyClass& GetTreeCtrl()
{<br />
return m_shellTree;<br />
}<br />
|
|
|
|
|
inline means that the function is inlined (the compiler will replace a call to the function by the code of the function itself). Search for inline on google
The & means that the function returns a reference to the object instead of a copy of the object. By default, in C++ when you pass arguments to a function, you will in fact have a copy of the object, not the original object. The same with the return of the function: you will get a copy of the object. By using the reference, it means that you will get the original object, not a copy (so, if you modify it outside the class, it will be modified in the class also).
But I think your code is wrong: you forgot the class name (or is does it come from a header file ? If yes, the inline is not needed).
|
|
|
|
|
returning the variable by reference!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|