|
You can try SetWindowText API.
|
|
|
|
|
I tried that But that is not solving my problem.setWindowtext is just changing name in toolbar when i minimize it and i want to change the title.
Any Ideas??
modified on Thursday, December 3, 2009 12:40 AM
|
|
|
|
|
Can you please describe your problem a little more ? Little bit of code may help.
|
|
|
|
|
I am using third party main window whose handle is am having and I want to change the title for that.Si i tried setwindowtext but that is not changing title.
But i am not able to use setwindowtitle. I thought that it will solve my prob.
Now any Ideas?
|
|
|
|
|
let me clea you the Picture Once again.
I am having a dll whose output is one window with some title.
Now in my application I am having the handle of that window,now how do i can change the title?
|
|
|
|
|
yogeshs wrote: Now in my application I am having the handle of that window
How do you confirm that the given window handle is that of the main window, or the parent window ? If it is sure that the handle is of the main window, just call the SetWindowText API with the given window handle to change the window title.
Make sure that you are having the right window handle using the SPY[^] tool which you can find along with your Visual Studio installation.
|
|
|
|
|
I am confirm that the given handle is of main window and as I told alrady that I use setWindoText but it is setting only as a tooltip in toolbar when i minimize.It is not setting as a title to that window .
Thats the problem.
Thanks for ur reply.
|
|
|
|
|
yogeshs wrote: ...I use setWindoText but it is setting only as a tooltip in toolbar when i minimize.
Do you mean the Taskbar?
"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
|
|
|
|
|
|
yogeshs wrote: I want to use setWindowTitle in my win32 based application.
Are you referring to the CTaskDialog::SetWindowTitle() method?
"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
|
|
|
|
|
I am not using MFC.only win32 functions.
|
|
|
|
|
So then which SetWindowTitle() are you referring to?
"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
|
|
|
|
|
I need write code to set up password use for security my computer.But I don't set up where?how?
Thank you for every idea.
|
|
|
|
|
hoangha052 wrote: I need write code to set up password use for security my computer.
Is this supposed to make sense to anyone but you?
"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
|
|
|
|
|
|
Please read the guidelines[^] and include relevant information in your post.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
I am a newhand ,I am learning to programming c++ to connect PC with microcontroler with modbus protocol.so I need a sample to study.I hope you can give me some clues to get such codes or articles.thanks a lot.
|
|
|
|
|
There is some articles about serial communication here[^].
|
|
|
|
|
hi,
i understand how to use the std::map class
and can access a value in a map by using
map[key]
what i'm trying to do is optimize my program
so that that i can very quickly access a value
in an array by it's key. i'm only interested in
using integer values as key's.
i was wondering how the map class is implemented to
find element value's from keys instead of zero based indices ?
is it possible to make a custom implementation of a key (integer), value array and does anyone know how to do it ?
thanks
|
|
|
|
|
doug25 wrote: what i'm trying to do is optimize my program
so that that i can very quickly access a value
in an array by it's key. i'm only interested in
using integer values as key's.
And why don't you want to use a std::map for the purpose?
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
well, i'm not sure how a map uses the key to get a value, i thought since it's a std container it might be faster to make a custom implementation using a dynamic array. i've heard that dynamic arrays are faster than vector's for example, though i've not tested this myself. i'm also eager to know how the map uses an integer value as a key to get an element's value. hope i'm making sense
|
|
|
|
|
std::map::find will do this for you.
This will be the fastest, trust me.
|
|
|
|
|
doug25 wrote: it might be faster to make a custom implementation
You are talking in terms of pico/atto seconds. Unless you are trying to do billions of accesses per second this will not be a problem.
|
|
|
|
|
i don't think i'm doing that many accesses i'll take your word for it
thanks for helping
|
|
|
|
|
Firstly, measure the performance to see if the std::map lookups are causing a problem.
If it is, then you'll find lookup performance can be improved using a std::vector of (key, value) pairs which has been sorted by key value and then using std::lower_bound to do the lookups.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|