|
venkatesh Madhipatla wrote:
is there any way to display text in taskbar status area just like the way MS displays the clock?
Yes, but the first question to ask is "Do you really need to?" Too many icons in the notification area is not a good thing. See here for more.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
i agree. but, i'm just curious as to how MS does that. using Shell_NotifyIcon, you can only pass a hIcon. Unless we put the text itself in the icon and change the image on the fly if we need to change the text later depending on some status.
|
|
|
|
|
See here.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
thanks. but i was trying to find out how to put a text instead of icon in the status area(just like clock). The clock seems to be plain text and the text dynamically changes.
venkat
|
|
|
|
|
venkatesh Madhipatla wrote:
thanks. but i was trying to find out how to put a text instead of icon in the status area(just like clock). The clock seems to be plain text and the text dynamically changes.
But unlike the icons, the clock is probably being drawn by the taskbar itself without any external application asking for it.
I don't know what you are trying to do, but adding your own toolbar to the taskbar might be a solution. Here's some info on that:
Using Application Desktop Toolbars[^]
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
i'm not sure about clock. when you double click on the clock, the date/time properties dialog is launched. so , i guess the clock is actually tied to date/time application.
thanks
|
|
|
|
|
Do you mean there is some "date/time" application that is running, is drawing the date and time in the taskbar, intercepts the double click on it and decides to show the date and time properties dialog? I don't think so. What application would that be?
I think the taskbar gets the date and time from the system, shows it in a predefined area, and implements the "Adjust Date/Time" context menu and double click by invoking the corresponding dialog (the same you can invoke from Control Panel). All done by the taskbar itself. In fact, if you look at the taskbar properties, you'll see a "Show the clock" property in the "Notification area" group.
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
yes. A taskbar has something called "Status area". so, you can write an application which adds an icon to the status area by calling "Shell_NotifyIcon" API call and your application also get calls back from icons in status area using call back messages.That's how yahoo messenger/msn messenger etc add their icon to the "status area" and change the icon depending on status. Windows also does the same. only thing is windows does it differently. They have clock as text and dynamically update it. In fact, there are sharewares which does the same. But those sharewares to work, you need to remove clock from the task bar and they replace their own clock in that place. Anyway, i just was curious how windows does it.
thanks for participating in this thread.
venkat
|
|
|
|
|
I've been searching for a way to implement a control like a progressbar into the taskbar (not just the icon). The only way I found to implement a control into the taskbar is to get the clock hwnd and cover it with your application. That's actually not the best way to do this.
Congratulation to IBM with their Thinkpad Battery Gauge wich is placed on the left side of the icon tray. They did a great work with it but i actually don't know how to do this like they do.
|
|
|
|
|
I'm trying to make a path to a batch file and then processing the batch file. Does anyone know how I should do this?
|
|
|
|
|
Camron wrote:
Does anyone know how I should do this?
Which part: the making of the path, or the processing of the file? For the former, use CreateDirectory() . For the latter, see here.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
make a path from what ?
have a look at _makepath
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
I have Visual C++ .net Standard, but I can't set any of the optimization options, they are all grayed out. Someone told me that they were disabled in the "standard edition", but I don't see that documented anywhere.
Is this true? What version would I need to get to have full optimization? I just need C++, I don't want VB, C#, java or anything else. Just C++, and I don't want to spend $1700 for a bunch of crap I will never use.
|
|
|
|
|
The VC++ Pro compiler itself is free. However, I don't think you can access it via the VC++ Standard IDE. MS used to produce standalone Pro versions of their languages in previous versions of VS but they dropped this. The same approach appears to apply in the new VS 2005. However, I don't know whether those Standard editions will be similarly crippled.
Only way to get Pro 2003 with an IDE is to get VS Pro 2003. In theory you could get this by spending about $400 for an upgrade version. (In the UK I spent about £375 for VS 2003 Pro last year..)
Kevin
|
|
|
|
|
I've got a function that will put any text into a list box. It's set so that it will set the horizontal scroll depending on the length of the string.
<br />
void CDataXFerDlg::OnWriteToListBox(CString pLstString, CString strError)<br />
{<br />
if (m_cSentLst.m_hWnd)<br />
{<br />
if (m_cSentLst.GetCount() > 100)<br />
{<br />
m_cSentLst.DeleteString(100);<br />
}<br />
m_cSentLst.InsertString(0, pLstString + strError);<br />
m_cSentLst.SetHorizontalExtent(pLstString.GetLength() + strError.GetLength());<br />
}<br />
<br />
}<br />
However it will not work. I can only get it to work if I put in some int like 300. Then the scroll works fine. Am I supposed to do something else?
Thanks
Tom Wright
tawright915@yahoo.com
|
|
|
|
|
This is because the SetHorizontalExtent 's input parameter is in pixels, not number of characters.
I Dream of Absolute Zero
|
|
|
|
|
but it's still asking for an int. which is what I'm passing. what should I multiply it by to equal chars......how many pixels are in a char...on average?
Tom Wright
tawright915@yahoo.com
|
|
|
|
|
You need to use the GetTextExtent function to calculate the width of the string...
<br />
CClientDC dc(this);<br />
<br />
CFont* pOldFont = dc.SelectObject(GetFont());<br />
<br />
TEXTMETRIC tm;<br />
dc.GetTextMetrics(&tm);<br />
<br />
...<br />
<br />
nHorizontalExtent = dc.GetTextExtent(strText).cx + tm.tmAveCharWidth;<br />
<br />
... <br />
<br />
dc.SelectObject(pOldFont);<br />
Pssst. You see that little light on your monitor? That's actually a government installed spy camera. Smile and wave to big brother!
Painted on the side of a dog trainer's van: SIT HAPPENS
|
|
|
|
|
hi, may i noe is there any API enable me to know the status of a thread through its handle?
HANDLE h = CreateThread(...
GetThreadStatus(h) == ALIVE || GetThreadStatus(h) == SLEEPING || GetThreadStatus(h) == DEAD
Currently, i create a thread A (with handle hA) in MAIN thread, and let the thread A run in funA. My thread A will set the hA to null at the end of funA.
This is the way for my MAIN thread to see whether thread A is alive
if(hA != NULL) ALIVE;
this method is quite cumbersome, can anyone share out better technique?
thank you very much!
cheok
|
|
|
|
|
Why would you need to know the status of the thread? The main thread should not be concerned with what any secondary threads are doing. If the secondary thread needs to communicate with the main thread, it should post a message. Once a secondary thread exists, you can use GetExitCodeThread() to get its termination status.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Hi!!
I must admit your site has been very usfull to me :p
any way I have been looking throught the MFC GDI+ articles you have, and throught them I have manged to convert a 24bit Colour bmp to a greyscale 24bit bmp.
I was wondering if there is a way to convert the bmp to a 2bit dithered bmp?
I have looked about but not found anything that I can undestand(and mainly all .NET code )
I have seen the Bitmap::ConvertFormat and the Image.SetPalette but these require a ColorPalette structure and I cant seem to find a useful article on how to create one.
any help is appriciated :->
Junior Programmer (Newbie)
From Scotland
|
|
|
|
|
Hello
You can look at my image processing library [^]. There are several dithering methods implemented. The library is on C#, but it's not hard to understand these algorithms.
You can also look at CxImage[^], which is written on C++.
Andrew
|
|
|
|
|
Thanks I'll look into those!!
Junior Programmer (Newbie)
From Scotland
|
|
|
|
|
write a c++ prog thathandles 3 types of objects.
-trucks
-cars with engine cappacity greater than 1200cc
-cars with engine cappacity less than 1200cc
the annual road tax for a truck is $3000,those with engine cappacity gretaer than 1200cc is $300 and that with less than 1200cc is $180
a text file holds the infomation on all vehicles within the company as shown
T w123mgb 5200 12(T stands for a truck object)
L k670kvc 2200 7(L stands for car with engine cappacitiy >1200cc
S y317jnb 1100 (S stands for a car with engine capacity <=1200cc)
the requirements of the program is to
a)read all records from the file and create an object for each type of vehicle
b)to provide a display method which given a registration number prints the details of that particular vehicle
c)as an additional measure, it should be able to calculate hte total ammount of road tax paid in a year.
develop a program to impleent this specification. the prog should use inheritance or polymorphism if appropriate. the number of records in the file should not exceed 100
|
|
|
|
|
START BY HELPING YOURSELF!!!!!!!
Ok. Now go and do your own homework. If you have specific questions, post them here.
By the way, a subject line describing your problem is preferred, rather than just shouting for help.
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|