|
I am writing a plugin for winamp 2.xx.
I want to register some Timer for its window.
But how can prohibit to do not conflict by existing its timer ID?
thanks.
|
|
|
|
|
Hi
Search for an old pgm. called Eureka (1998) I think.
It deals with some of these issues.
Best Wishes and Happy Turkey Day,
ez_way
|
|
|
|
|
If you own the window the only timers you can confilct with is your own, I think. A handy trick I use with timers is to use existing IDs for timer IDs, that is I associate the timer ID with wath it is related to.
Example: SetTimer(hWnd, ID_MYCLOCK_CONTROL, NULL);
Note: I have yet to see SetTimer() return any ID other than the one that was passed to it, but may be you sould verify the returned value.
INTP
|
|
|
|
|
Note: I have yet to see SetTimer() return any ID other than the one that was passed to it, but may be you sould verify the returned value.
Try passing NULL as ID...
"...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..."
Me
|
|
|
|
|
If you are subclassing window that already has some timers set: I doubt there is a way to find out what ID's has been used, except by overloading and processing WM_TIMER messages, but of course it could be too late and not reliable...
Good question to ask MSFT!
"...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..."
Me
|
|
|
|
|
I know we can do it in DLL.
I have a Static Lib project that develop some class that
they base are MFC classes. I will use this lib in a win32 application.
Some of this class need some resource for example for property page.
If my main program be MFC Base we can it by MFC extention Dll.
|
|
|
|
|
I am not sure but I would think so, since the option of staticaly linking is available. If not, just create a DLL and staticaly link it.
INTP
|
|
|
|
|
No, you can't. The LINK tool can only cope with a single RES file specified on the command line - it cannot combine RES files.
What I've done in this situation is to #include the .rc file accompanying the static library in the main executable/DLL's resource file. See View > Resource Includes in the VC 6 IDE.
|
|
|
|
|
I only need to use a command prompt for my program and want to call a couple of WMI methods.
All the examples I see on the web use MFC and Windows Forms for showing how to use WMI.
A simple example would be to just call
Win32_WindowsProductActivation.SetProductKey( myKey );
and then close the app.
I just need a start on what I need to include and do to setup a simple call without using forms.
I am not that familiar with MFC Forms, only .Net Forms, but I do not want to have to install the .Net framework so I thought i would just write this in C++. Also, do not want to use VB Script.
Well, hopefully this is easy for someone to whip up an example for me.
Much appreciated.
Thanks.
|
|
|
|
|
I write this 3D editor at
http://marius.homeunix.org:8000
I've moved the compilation process in a thread. ()
The thread has to update the progress bar of the Dialog-Bar
and the text in the static and report list box.
I'm sending WM_* messages to these windows.
Under Win2K work 100% OK but in Win 98 it hangs
in the SendMessage (dead lock). Any Ideeas
Thanks.
|
|
|
|
|
Did you try using PostMessage?...
"...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..."
Me
|
|
|
|
|
I have to send text to the static control
TCHAR someOutString;
_stprntf(someOutString,"Preogress is :%d%%",_percentage);
dlgbar.m_static.SendMessage(WM_SETTEXT,0,(LPCTSTR)someOutString);
If I do PostMessage I loose the LPARAM ... 'someOutString'.
I have installed VC 6 under 98 and I I get hang in user.dll
Thx
|
|
|
|
|
>> I have to send text to the static control <<
So what? You may have different options, e.g:
1. Put your TCHAR someOutString as global variable acessed by both threads;
2. Allocate yours someOutString on sending thread and free on receiving...
>> I get hang in user.dll <<
The reason for hang could be limited message queue on Win98...
Regards
"...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..."
Me
|
|
|
|
|
Opps... It works.
I did it and It works fine. Thank you. Anyway I have overmessage there
Now I SendMessage() 1-3/sec. and is OK.
{
static int modul = 0;
if(modul++%64 == 0)
{
UpdateProgressBars()
}
}
Thanks. Igor.
|
|
|
|
|
>> Anyway I have overmessage there <<
OK, that confirms that the reason for a deadlock is limited queue on Win98.
Hope 3 seconds is fine, but it's still not be 100% bullet prooof. I don't see any solution other then PostMessage. With PostMessage also you can check on your sending thread that only one WM_SETTEXT is travelling and Post only if nothing is in queue.
For example if your string is global and sending thread sets it and receiving empties it --> you will only PostMessage if that global string is empty...
Regards
"...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..."
Me
|
|
|
|
|
Hi,
How do I use threads in VC++?Please suggest a reference or sample program(s).
Karteek
|
|
|
|
|
Try these:
http://flounder.com/uithreads.htm
http://flounder.com/workerthreads.htm
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
I have studied the instruction setting up a C++ project to use CxImage at http://www.codeproject.com/bitmap/cximage.asp.
But I still need help to generate/find the library files. I downloaded the source files and did a build on the project. But I do not see the library files stated in the instruction, for example, jpeg.lib.
Please help.
Elizabeth
|
|
|
|
|
I just found out how to generate the lib files. I have to select a Configuration before the build.
Elizabeth
|
|
|
|
|
How can I get a DLL's version programmically?
Thanks
Tom Wright
tawright915@yahoo.com
|
|
|
|
|
Assuming it has one, try VerQueryValue() , GetFileVersionInfo() , and related functions.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
So inorder to get the version I have to use all three of those functions listed in the MSDN? There's no easier way?
By the way is the answer 2?
Thanks
Tom Wright
tawright915@yahoo.com
|
|
|
|
|
Tom Wright wrote:
So inorder to get the version I have to use all three of those functions listed in the MSDN?
Yes, you'll need to call GetFileVersionInfoSize() , GetFileVersionInfo() , and VerQueryValue() , in that order.
Tom Wright wrote:
There's no easier way?
It's easy once you've done it a few times. Now if you have no interest in how it all works, you can always skip to this class.
Tom Wright wrote:
By the way is the answer 2?
No.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
The application lost the toolbar tooltips after the SetState statement
m_wndToolBar.GetToolBarCtrl().SetState(ID_INBOX, TBSTATE_HIDDEN)
If I comment this line out, the tooltips comes back.
I tried to get the tooltips back by adding the following line
m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() | CBRS_TOOLTIPS)
But this does not work. The tooltips are not showing up at the toolbar.
Elizabeth
|
|
|
|
|
Hi!
I am building a chat application and I'd like the main chat window to scroll down (such that the last message is at the bottom of my CRichEditCtrl) when the user enters a message.
I have not been yet able to do this. I know about LineScroll, but how many lines should I scroll with it? (Because the user can move the scroll bar upwards whenever he wants.)
Thanks!
|
|
|
|