|
I wanted to use the Multimedia timers and have implemented based on reference in the MSDN site
I Included mmsytem.h
still i get the following linker errors
Linking...<br />
error LNK2001: unresolved external symbol __imp__timeSetEvent@20<br />
error LNK2001: unresolved external symbol __imp__timeBeginPeriod@4 error LNK2001: unresolved external symbol __imp__timeGetDevCaps@8
I was unable to figure out the problem !
|
|
|
|
|
Did you add winmm.lib to the library your are linking to ?
~RaGE();
|
|
|
|
|
|
Hi guys
I'm trying to implement a solution to communicate 2 app through a global system message
In the app1 I do in InitInstance
msgApp=RegisterWindowMessage("DATABASE_UPDATED");
and then when is necessary I do
PostMessage(theApp.msgApp,1,1) wParam and lParam it doesn't matter.
What I have to write to manage DATABASE_UPDATE message in app2 and where?
Both app are SDI app.
Best Regards
Dr. Pi
|
|
|
|
|
With MFC :
With a simple message (#define MYMESSAGE WM_USER+1 ) :
Go into the your MainFrame.cpp, and add :
BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
ON_WM_CREATE()
ON_WM_SIZE()
ON_MESSAGE(MYMESSAGE,memberFxn)
END_MESSAGE_MAP()
Prototype , in MainFrame.cpp :
protected:
afx_msg LRESULT memberFxn(WPARAM, LPARAM);
DECLARE_MESSAGE_MAP()
With registered message :
Same with :
ON_REGISTERED_MESSAGE( msgApp, memberFxn )
and
afx_msg LRESULT memberFxn(WPARAM, LPARAM);
~RaGE();
|
|
|
|
|
I had a case of my previous system with VC++ 6.0 where I tried something like this, only to discover that WM_USER wasn't defined in the header given, had to alter the header file. Seems ok on this system though
Elaine
The tigress is here
|
|
|
|
|
And I forgot to add that you have to do
msgApp=RegisterWindowMessage("DATABASE_UPDATED");
with exactly the same string "DATABASE_UPDATED" in both application, otherwise, it won't work ... (I also suggest to add your application name in the string, because database_updated is pretty common).
~RaGE();
|
|
|
|
|
I need the advice of a storage expert.
Does anyone have experience with timing array performance?
For example, if I have a data structure like the following:
For an array called Array, I know that Array[0] to Array[5] holds
a collection of like objects and Array[6] to Array[8] holds another collection of like objects. I keep track of the new object indices, for example I store 0 and 6 and iterate through the list based on these numbers. So I can skip to the next element right away by jumping from 0 to 6. Now compare this to a CMap object.
Can anyone tell me which will provide the faster access times and which will use the least memory? How is a CMap object structured and how does it allocate its memory? (Does it use an iterator to do a search?)
OR, if anyone knows a better way of doing this, all suggestions are welcome.
|
|
|
|
|
One solution is a map container with, for example, a vector as its value. Each key corresponds to a value of a collection of like objects.
Kuphryn
|
|
|
|
|
How can I put a imagem in the background of a ListControl ??
The CListCtrl::SetBkImagen() function really doesn't work ??
[]'s
Cris.
|
|
|
|
|
Have you read this note ? :
Note Because CListCtrl::SetBkImage makes use of OLE COM functionality, the OLE libraries must be initialized before using SetBkImage. It is best to initialize the COM libraries when the application is initialized and uninitialize the libraries when the application terminates. This is automatically done in MFC applications that make use of ActiveX technology, OLE Automation, OLE Linking/Embedding, or ODBC/DAO operations.
~RaGE();
|
|
|
|
|
Ok, it work well with OLE Automation support.
But, I have a application. How can I "SET" this support with MS Visual Studio 6 ??
Thanks a lot ...
CRIS.
|
|
|
|
|
In your CApplicationApp::InitInstance()
put
if (!AfxOleInit())
return FALSE;
|
|
|
|
|
Ok, thanks ...
Another thing: I did put the imagem in the list background, but the list have text itens. How can I make the text be transparen too ??
[]'s
CRIS.
|
|
|
|
|
|
Message: "The page cannot be displayed"
Any other idea ??
I need to make a COLORREF object transparent. So, I can use in the SetBkColor() function. It's possible ??
[]'s
|
|
|
|
|
I haven't had any experience of that myself.
But a quick google on 'msdn SetBkColor() transparent' gave many results..
Try checking them out.
|
|
|
|
|
Hi,
I'm starting to develop a plugin for Outlook Express and I need to learn about windows hooks (CBT hooks?). I did get the PGP source code and tried to work with that, but I could probably use some documentation along with easy/clear samples since I don't really know exactly which part of the code to use and all.
I did find a few articles on CP about hooks, but do you guys know about a good one to start, on CP or any other place on the web???
Thanks!
---------------
Tired of Spam? Introducing InboxShield 2.0 for Microsoft® Outlook® 2K/2K2/2K3
http://www.edovia.com
|
|
|
|
|
Here you are :
http://www.codeproject.com/dll/#Hooks[^]
[edit] just did the clickety police myself [/edit]
my favorite being J.M Newcomer 's article, which is complete.
Also, the Keyboard hooks from Hirosh Joseph has very good code.
Hooking is really easy : capture windows messages, get your app informed about you catching these messages (usually using user defined messages), and handle these messages in your app.
~RaGE();
|
|
|
|
|
How Do we create new fonts from a Bitmap the size of the font is given. plz do mail me to sreeram_gsr@rediffmail.com
Sreeram
|
|
|
|
|
I am trying to use a Timer in a non MFC framework . I have been able to use this timer in the past. Suddenly I am faced with problems which I am failing to comprehend .
The timer is called as :
timerID=::SetTimer(NULL,NULL,1000,this->TimerCallback1);
that confirms to the syntax
UINT_PTR SetTimer( HWND hWnd,
UINT_PTR nIDEvent,
UINT uElapse,
TIMERPROC lpTimerFunc
);
My Call back is defined as
static VOID CALLBACK TimerCallback1(HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime);
Still My Timer Function is not getting called !!!
The strange part is that The timer does get called when the interval is less than 400 msec !!!!
|
|
|
|
|
You have to dispatch the messages, otehrwise WM_TIMER gets stuck in the queue.
act_x wrote:
The strange part is that The timer does get called when the interval is less than 400 msec
That's because you have no messages coming before 400ms, and WM_TIMER is the first one which gets handled by your function.
~RaGE();
|
|
|
|
|
So do i have to keep polling the message queuue by doing
GetMessage() and check to see if it is a WM_TIMER message ?
|
|
|
|
|
No you do not have to check it, but I think you must have a DispatchMessage() somewhere.
~RaGE();
|
|
|
|
|
Does anybody know how to change the caption of the main dialog window dynamicly?
|
|
|
|