|
CDC::SetTextColor ... that should be a VERY good start ...
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
how to receive non client area events using system wide mouse hook?
i am able to receive the event.But sometimes it won't works.
when i move mouse the sometimes occurs but sometimes not why?
can anyone help me?
see following Mouse hook Procedure i'm using it in dll file.
LRESULT CALLBACK
SpyGetMsgProc(
INT hc,
WPARAM wParam,
LPARAM lParam
)
{
PMSG pmsg;
PCWPSTRUCT pcwps;
pmsg = (PMSG)lParam;
if(pmsg->wParam ==WM_NCLBUTTONDOWN)
MessageBox(0,"ncl wp","",0);//this shows only somtiomes
if(pmsg->message==WM_NCMOUSEMOVE){
if(pmsg->wParam ==HTCAPTION)
MessageBox(0,"ncl message","",0);//this shows only somtiomes
return CallNextHookEx(NULL, hc, wParam, lParam);
}
|
|
|
|
|
Is SetCapture() of any help?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
If 'hc' is less than zero, the hook procedure must pass the message to the CallNextHookEx function without further processing and should return the value returned by CallNextHookEx. You should not even try to interpret the incoming data if 'hc' is less than 0.
Did you hook WH_MOUSE_LL or WH_MOUSE ?
|
|
|
|
|
I want to rename a file to have a Unicode name using Windows Base Services. I thought MoveFileW(wSrc,wDst) would do this, but since the source file name is not Unicode, I can't get MoveFileW to recognize it. I have tried converting the source name to Unicode. MoveFileW() reports no error.
|
|
|
|
|
OK, MoveFileW() really DOES work.
When copying UTF8 characters to a wchar_t array, be sure to call them unsigned. Otherwise the UTF8 characters >127 will sign-extend to the high byte of the wchar_t.
|
|
|
|
|
I've been trying to figure out how to Programatically shutdown AIM. I need to do it safely without just terminating the proccess. I've been trying to snoop out what messages it's sending an stuff when the exit command is clicked, but I can't get anything to work. Any help would be appreciatied.
|
|
|
|
|
Have you tried sending the window a WM_CLOSE or WM_QUIT message?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
WM_CLOSE minimizes to the sys tray. I tried WM_QUIT and it made AIM crash.
|
|
|
|
|
There also may or may not be a confirmation dialog to contend with depending on the 'show me again' check box.
|
|
|
|
|
Hello,
Why don't you try "FindWindowEx()" in order to handle AIM window? You can do whatever you want, if you have window handle of AIM.
Regards,
Orkun Gedik
SAP R/3 System & Software Support Specialist
ASTRON
Orkun GEDiK
SAP R/3 Software & System Support Specialist
ASTRON
|
|
|
|
|
I don't have a problem getting the handle to the AIM window. The problem is know what commands/messages AIM is looking for to shutdown.
|
|
|
|
|
can you tel me how can i implement my project as i want to make a program which will respond the caller .wav file or a desired song instead of ordinary ring tone
|
|
|
|
|
|
hi,
i guess here u meant that after establishing a connection to the caller u want some special .wav to play.
that is quite possible. I have done it.
but if u say that u want to replace the existing the ringing tone which noramlly a caller hears when he places a call may not be possible.
|
|
|
|
|
thanks for replying to my querry... can you tell me how to reply a caller with a .wav file which you have already implemented.. i will be highly thankful
|
|
|
|
|
i assume that u jst want to play a wave file. i.e u r clear with establishing connection with the incoming line.
It can be done in 3 ways.
1) the hardcore way is to use the AT command set to establish the connection and then use the Waveform API to play the file.
2) Use TAPI. Once the connection is established, u can configure the waveform audio output to modem and play as soon as connection done. Configuring the waveform o/p to modem can also be done prior to the call.
3) Use SAPI. This might come handy if u seeing this project for some extended features like TTS or speech recognition. Here, also u dont need to use waveform api. SAPI already provides with some wrappers which can be used directly. Also they r pretty easy to use.
Best resource is MSDN.
|
|
|
|
|
Hai,
I'm working on win32 vc++...In my app I have to ignore all the mouse events at specific times..say like there are two buttons and when I click button1 after that I should ignore all mouse events and only my keyboard should work till I click button2.
How should I do this??
thanks in advance..
|
|
|
|
|
you should use mouse hook filter function in a dll.
write filter function in a dll file and load it.
set global shared memory flag variables for checking and filter.
|
|
|
|
|
A simple dirty way is this:
declare a global varibale:
<br />
bool bIgnoreMouse = false;
in the message handler for your mouse disabling button:
<br />
bIgnoreMouse = true;<code><br />
<br />
in your mousehandlers:<code><br />
if( bIgnoreMouse )<br />
return;<br />
Hope this helps
Multiply it by infinity and take it beyond eternity and you'll still have no idea about what I'm talking about.
|
|
|
|
|
All,
My VC7 debugger is catching memory leaks (I inherited a project with a lot of "new" and not a lot of "delete"...) which I am in the process of cleaning up. Several of the "caught" leaks take me to the IMPLEMENT_DYNACREATE macro in a few classes, most notably the MainFrm.cpp, the view class.cpp and the doc class.cpp files when I click on them in the debug window. I don't know where to go from there. Any suggestions?
Thanks in advance,
John
|
|
|
|
|
You need to look for things like...
RUNTIME_CLASS (CLeakingObject)
and
CRuntimeClass->CreateObject ();
and so on.
If you look at the definition of the macro,
you can see the Create functions it hides.
Iain.
|
|
|
|
|
Thanks - not sure I understand...
Clicking on one of the memory leak messages in the debug window takes me to:
IMPLEMENT_DYNCREATE(CPalsView, CScrollView)
The next is:
IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
and the last is:
IMPLEMENT_DYNCREATE(CPalsDoc, CDocument)
does this mean that it thinks I (or maybe MFC) has a memory leak in one of these classes?
The only place I see the RUNTIME_CLASS macro is here in the App.InitInstance function:
CSingleDocTemplate* pDocTemplate;
pDocTemplate = new CSingleDocTemplate(
IDR_MAINFRAME,
RUNTIME_CLASS(CPalsDoc),
RUNTIME_CLASS(CMainFrame), // main SDI frame window
RUNTIME_CLASS(CPalsView));
AddDocTemplate(pDocTemplate);
which is of course a memory leak since I can't seem to find a cooresponding delete (unless MFC is handling that in some hidden way) ????
Any comments?
|
|
|
|
|
Need your advertisment on the following subject.
Does anybody know how to obtain the text from the statusbar?
Simple call of the GetWindowText retrieve only the text in first cell if is.
How to get the text from the others areas, is a question for me...
Any ideas?
4apai
There're no impossible tasks. There're tasks that required infinite period of execution time.
|
|
|
|
|
Have look at CStatusBar::GetPaneText (...).
Iain.
|
|
|
|