|
How to handle click event on icon which is placed on status bar?
Answers are appreciated.
|
|
|
|
|
You can respond to the message you indicated in NOTIFYICONDATA.uCallbackMessage when you
added the icon with Shell_NotifyIcon().
NOTIFYICONDATA.hWnd needs to be valid and NOTIFYICONDATA.uFlags needs to have the NIF_MESSAGE
flag as well.
Or were you referring to a status bar in an application window...
Mark
Mark Salsbery
Microsoft MVP - Visual C++
"Great job team! Head back to base for debriefing and cocktails."
|
|
|
|
|
yes i am referring to a status bar in an application window.
|
|
|
|
|
Sorry
Looks like Hans has got it!
Cheers,
Mark
Mark Salsbery
Microsoft MVP - Visual C++
"Great job team! Head back to base for debriefing and cocktails."
|
|
|
|
|
It's rare that I can beat you, Mark!
|
|
|
|
|
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
|
|
|
|