|
in fact, a .ico file contains several icons, varying from the size and/or the number of colors.
when you edit an icon with the icon editor within Visual Studio, you should verify that all the devices (that's how they're called) are like you want...
(search the menus for that ; i don't remember exactly where).
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20] | soon : [VisualCalc 3.0]
|
|
|
|
|
Well, you set it from the Image menu, I just found out.
Thanks.
|
|
|
|
|
Hello,
I don't know why this is proving difficult. It is obviously a very common task. I have an SDI application that is hosting an ActiveX control. The ActiveX control has some events that it fires. I want to handle these events in the host application. I cannot figure out how to hook it up.
The ActiveX control is not added at design time. It is dynamically created.
Thoughts?
Thanks!
-Ian
|
|
|
|
|
Ian Bowler wrote: The ActiveX control is not added at design time. It is dynamically created.
You still have to implement the event sink which means that you need to know how the sink interface is defined.
The easiest way is to add the control to the project at design time and use ClassWizard to generate the event sink.
When you 'hook it up' you have to use IConnectionPointContainer and IConnectionPoint interfaces and in the end call IConnectionPoint::Advise and provide an interface pointer to the sink.
--
Roger
It's supposed to be hard, otherwise anybody could do it!
|
|
|
|
|
Thanks. I'll look into this method.
still... this is extremely common right? It seems like there should be an easier way. Something through class wizard..?
|
|
|
|
|
I want to create a Window witch is always on bottom z order, in fact this window is my "desktop" with some "buttons" , and these buttons launch some other applications. But the "desktop window" can hide the launched applications
Some body could help me
Thanks a lot in advance
Christian
|
|
|
|
|
Look at the Windows MFC site for the description of the SetWindowPos() function, you can understand it from there, I am sure.
|
|
|
|
|
How do you change the little icon picture in the title bar of a CDialog window?
Heather
|
|
|
|
|
you have to change the IDR_MAINFRAME resource with the new icon (still in OnInitDialog())...
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20] | soon : [VisualCalc 3.0]
|
|
|
|
|
SetIcon()
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
True, a secondary thread might not even have a message pump.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
How do you dynamically change the caption title in .NET for a CDialog window?
Heather Heiman
|
|
|
|
|
CDialog is not a .NET class, but a MFC one.
i so consider you're using MFC.
you simply have to do this :
this->SetWindowText("new caption");
in a function of your dialog class...
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20] | soon : [VisualCalc 3.0]
|
|
|
|
|
I tried that line of code, but it doesn't seem to do anything. I even called UpdateData to see if that would work. I'm calling SetWindowText in OnInitDialog. Is there another place I should call it?
Heather
|
|
|
|
|
there's no need to call UpdateData() if you use pointer (here, this ).
you might be doing something wrong because it works fine for me (according you call it into OnInitDialog(), not into the dialog constructor)...
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20] | soon : [VisualCalc 3.0]
|
|
|
|
|
I got it to work. Thanks.
Heather
|
|
|
|
|
and what was the missing point ??
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20] | soon : [VisualCalc 3.0]
|
|
|
|
|
I had the SetWindowText call in the wrong function. I put it in OnInitDialog and it worked fine.
Heather
|
|
|
|
|
I have a windows message problem that has haunted me for a long time.
Suppose one application has two thread. Thread A "sends" and "posts" message
to a window handle in thread B.
Thread A
{
LOOP{
...
SendMessage(m_hwnd, msg1);
...
PostMessage(m_hwnd, msg2);
...
}
}
in winproc of Thread B:
Winproc
{
case (msg1): do something
...
case (msg2): do something
...
}
my question is: if Thread B is processing msg2, and Thread A are going to
send msg1 , Thread A will wait until Thread B finishes processing msg2??
|
|
|
|
|
The very definition of SendMessage() says that control does not return until the window procedure (the one in thread B) has processed the message. If this is a problem, use SendMessageTimeout() instead.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
Hi David,does that mean: Thread B will always process msg1 then msg2 ,again and again? it could not process two continous msg2?? However, I found in my project,
this situation happens, but not often!
-- modified at 11:54 Wednesday 7th December, 2005
|
|
|
|
|
No.
Thread B will process msg1 and the SendMessage call in Thread A will only return when Thread B has finished processing.
Then Thread A will Post msg2 but the PostMessage call will return immediately without waiting for Thread B to process it.
Then it may be possible for Thread A to return to the top of the loop and send another msg1 while Thread B is still processing msg2.
That is precisely the way SendMessage and PostMessage are designed: SendMessage waits for processing, PostMessage doesn't wait.
The opinions expressed in this communication do not necessarily represent those of the author (especially if you find them impolite, discourteous or inflammatory).
|
|
|
|
|
jinzhecheng wrote: my question is: if Thread B is processing msg2, and Thread A are going to
send msg1 , Thread A will wait until Thread B finishes processing msg2??
Offcourse... Thread B should finish previous Message Processing before taking new task...
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Sir
Can any help me in knowing which message is fired
when Windows is
1)about to Shutdown?
2)when we press F1;
3)when we click on Shutdown among 3 options
ie; restart,shutdown,standby.
i am waiting 4 u reply , i have this doubt form many days thank u for helping me in order to understand vc++ msgs.
bye
Satishvarma.E
|
|
|
|
|
Intercepting the Ctrl+Alt+Del sequence is not a trivial task. To do it effectively requires a good knowledge of GINA.
When Windows is being shut down or restarted, it will send a WM_QUERYENDSESSION to each top-level window. Handle that message accordingly.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|