|
Hans Dietrich wrote: It's rare that I can beat you
Maybe in assumptions and/or jumping to conclusions, or not reading posts thoroughly
Cheers!
Mark
Mark Salsbery
Microsoft MVP - Visual C++
"Great job team! Head back to base for debriefing and cocktails."
|
|
|
|
|
I hope that post came across the way I meant it to
Mark
Mark Salsbery
Microsoft MVP - Visual C++
"Great job team! Head back to base for debriefing and cocktails."
|
|
|
|
|
No prob.
Where in LA are you located?
|
|
|
|
|
North Orange County - Fullerton. You're in LA? For some reason I was under the impression you were in Europe...I figured you just never slept since you were around here the same hours as me.
Mark Salsbery
Microsoft MVP - Visual C++
"Great job team! Head back to base for debriefing and cocktails."
|
|
|
|
|
Derive a new class from CStatusBar. Add WM_LBUTTONUP handler, and in this function loop through all panes of status bar -
- use GetStatusBarCtrl() to get ptr to control
- use CStatusBarCtrl::GetRect() to get rect of pane
- use rect.PtInRect() to see if click was in pane's rect
(I assume you mean app's status bar.)
|
|
|
|
|
Thank you Hans.
Yes its an application's status bar.
I'll try ur solution. Is there any other better solution?
|
|
|
|
|
Super Hornet wrote: Is there any other better solution?
Probably, there always is. If you find it let me know.
P.S. Please stop using SMS spelling.
|
|
|
|
|
Hi everybody.
I encountered a problem while using the Video Mixing Renderer 9 to display video file and camera.
In fact, each time I change the video file to play, I destroy the graph by that I mean I remove all the filters in the graph. Then, I build a new graph again including the Video Mixing Renderer in it.
The problem is that it works fine for a moment but while using about 10 times this method, my video is not shown and there is an Active Movie Window which appear and displays nothing in it.
I haven't find out what was the problem.
Could somebody help please?
Thanks in advance
|
|
|
|
|
Hi all,
How can I catch/handle a double-click (left mouse button) on the header control of a CListCtrl.
TIA
|
|
|
|
|
Handle the HDN_ITEMDBLCLICK message that will be sent from the header.
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
Hai evryone,
I have a problem with internet file download i.e.,synchronous download.this is how it is..
1. I have an internet file which is to be downloaded using multiple threads
(single file/same file).I'm using UserInterfaceThreads where in i pass
parameters such as starting position of a file, temp name of the file
etc.. problem is i'm unable to download to diff files(threads)
synchronously.i.e., files are downloaded one thread after the other.
code is given below...
parameter fPos: the start position of the file to be downloaded which
is initilized when thread is created.
m_hHttpFile = HttpOpenRequest(m_hHttpConnection, "GET", ServerFile,
NULL, NULL, ppszAcceptTypes, INTERNET_FLAG_RELOAD
|INTERNET_FLAG_KEEP_CONNECTION, NULL);
::InternetSetFilePointer (m_hHttpFile,fPos,0, FILE_BEGIN, 0);
do
{
::InternetReadFile(m_hHttpFile, szReadBuf, TRANSFER_SIZE,
&dwBytesRead))
...... write in to my temp files..
}
while(sum
|
|
|
|
|
Maximum connection per server for Wininet library is 2 by default for HTTP 1.1, and 4 for HTTP 1.0. Please refer to the article:
http://support.microsoft.com/kb/183110
I also had encountered the same problem before. Because I did it for my own usage, I just increased the values in the registry. However, according to RFC2616, it is not recommended to maintain more than 2 concurrent connections from the single client to the same server.
BTW, for that small program, I make sure that each worker thread keeps its own internet session and internet connection. Maybe you could try it.
One more thing, if I am not wrong, INTERNET_FLAG_KEEP_CONNECTION flag enforces the client to reuse the existing connection. To verify that multiple connections are opened, in the command prompt, type "netstat -a".
Good luck!
|
|
|
|
|
_AFXWIN_INLINE LRESULT CWnd::SendMessage(UINT message, WPARAM wParam, LPARAM lParam)
{ ASSERT(::IsWindow(m_hWnd)); return ::SendMessage(m_hWnd, message, wParam, lParam); }
getting a debug assertion falied error in this line......
can anybody tell me the cause of this problem....
|
|
|
|
|
neha.agarwal27 wrote: can anybody tell me the cause of this problem....
Yes, you are trying to send a message to a non-existent window.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
but the window is existing.......can you tell me the way to resolve it.....
|
|
|
|
|
neha.agarwal27 wrote: but the window is existing.......
Apparently not. The CWnd object might exist, but not the underling window.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Are you sure CWnd of that window is valid?
|
|
|
|
|
Hi All
I have been puzzelled, actually problem is that I run a code in C# project and in Console based project of Visual Stdio 2005.
code is as follows:
int i = 1;
int j = (++i) + (++i) + (++i);
Now I found different values for j in C# project( j = 9) and console based project( j= 12).
So please suggest me the answer behind this different values of j in both projects.
Thansk & Regards
|
|
|
|
|
C++ does not guarantee an evaluation order for operations within an expression. The compiler is free to, as in this case, perform all three preincrement operations first and then sum the results. Sometimes this gives the compiler greater opportunity for optimization. The solution is not to preincrement or postincrement a variable multiple times in the same expression.
C# guarantees left-to-right evaluation order, so the result is always 2 + 3 + 4 = 9.
|
|
|
|
|
True, but the answer should still be 9 whether left to right or right to left or any other order.
Where is that 12 coming from? Hmmm…
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
It was just explained. The compiler can evaluate all 3 ++ operations before performing the rest of the arithmetic. Thus you end up with i++, i++, i++ so i = 4. Now j = 4 + 4 + 4 = 12. I'm not that familiar with C# and its compiler so I can't speak for why Console apps in C# do it. But it certainly makes sense in a C++ context.
|
|
|
|
|
Actually it makes no sense in a C++ context, unless the compiler is flawed. But I do see what the problem is now. I do not write code in the form presented for reasons like that, but a compiler should know how to handle it correctly (even with optimization). I suspect that the standard leaves this possibility open, but logic should prevail where the standard fails.
By the way there is a major difference between i++ and ++i (in code) in C++; C is more forgiving, but not with integral types.
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
Presumably getting such a thing working is just extra work to enable horribly confusing code. I'm pretty content to let the compiler discourage people from writing statements filled with pre and post increments nested in other operations.
|
|
|
|
|
I agree; it is just that the code presented was not ‘horribly confusing’. I have seen ‘horribly confusing code’ and that did not even come close. Now take away the parenthesis and the compiler will interpret it the same, but the viewer would have to stop and think about it.
Oh well, its does not matter to me because I don’t do that. Thanks for you explanation of how the 12 came about.
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
John R. Shaw wrote: By the way there is a major difference between i++ and ++i...
How so?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|