|
DavidCrow wrote: You can't seriously think this is a problem, can you?
When you've got firmware programmers as your leaders, yes its a problem 
|
|
|
|
|
Llasus wrote: would there be any other functions I can use to achieve what I am trying to do?
overide the PreTranslateMessage function in the dialog class and check for the WM_LBUTTONDOWN message.
BOOL CMyDlg::PreTranslateMessage(MSG* pMsg)<br />
{<br />
if( pMsg->message == WM_LBUTTONDOWN )<br />
{<br />
if( pMsg->hwnd != m_hWnd )
{<br />
}<br />
}<br />
return CDialog::PreTranslateMessage( pMsg );<br />
}
|
|
|
|
|
Naveen wrote: overide the PreTranslateMessage function in the dialog class and check for the WM_LBUTTONDOWN message.
Thank you! Just what I was looking for Thank you very much!
|
|
|
|
|
What about WM_MOUSEACTIVATE?
Sincerely,
Spy++
|
|
|
|
|
Within the WM_MOUSEACTIVATE handler, I guess you could call
GetDlgCtrlID(GetFocus()) to get the identity of the control.
|
|
|
|
|
//In DlgProc:
if ((msg == WM_MOUSEACTIVATE) &&
(HIWORD(lParam) == WM_LBUTTONDOWN)) {
POINT pt;
GetCursorPos(&pt);
int ctrlID = GetDlgCtrlID(WindowFromPoint(pt)));
}
|
|
|
|
|
You can write your answers at one message. 
|
|
|
|
|
Thanks for the help and sorry for the late reply (different timezone) At what event handler should I place this code? I checked OnMouseActivate but lParam and msg is not there.
|
|
|
|
|
How to check the admin/user previleges in Vista and XP
|
|
|
|
|
|
See IsUserAnAdmin()[^] method.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
I want check if a certain file is present at a certain location.
I am using the FileCreate function for this, but I have a problem in the creation of the filename parameter.
if I use the next line to create the filename everything works fine if the specified file is in the same directory as the source:
sprintf(FileName,"%s.txt",ProdBest[i]); //ProdBest is an array of strings containing the filename.
But I want a clear seperation between my Production files and the programm files, and store the Production files in a seperate directory (C:\ProdIn)
If I use the following line I always end up getting a INVALID_HANDLE_VALUE with GetLastError code = 2 (FILE_NOT_FOUND).
sprintf(FileName,"C:\ProdIn\%s.txt",ProdBest[i]);
So clearly I am making a mistake, but I don't know where or what
Can someone help me out?
|
|
|
|
|
Try using double back slash instead of single like this.
sprintf(FileName,"C:\\ProdIn\\%s.txt",ProdBest[i]);
|
|
|
|
|
|
You can use of FindFirstFile for see file exist or no.
|
|
|
|
|
I want to allow user for open my application only 1 time in one PC.
for avoid resource duplication problem.
How can I do?
|
|
|
|
|
If you are using MFC, take a look at this article[^].
BTW, searching before asking the qestion sometimes brings a lot of usefull results. There are plenty of nice articles on codeproject about a very broad range of subjects.
|
|
|
|
|
thank a lot
but that article doesn't work
|
|
|
|
|
Max++ wrote: but that article doesn't work
Which means ?
|
|
|
|
|
Cedric Moonen wrote: Which means ?
It is not giving the expected result.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
|
Hi all,
I m new in VC++, i m working on MFC-SDI document type application,
in my application i want to use MS-Acess 2007 Database,
but i dont have any knowledge about this.
please anyone can tell me at starting how an i use Access databse in my application.
thanks in advance.
|
|
|
|
|
|
There is number of article please tell me which one is suitable for me.
|
|
|
|
|