Click here to Skip to main content
15,889,808 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: strcmp for NULL character Pin
Anu_Bala7-Jan-10 19:42
Anu_Bala7-Jan-10 19:42 
GeneralRe: strcmp for NULL character Pin
Naveen7-Jan-10 21:10
Naveen7-Jan-10 21:10 
AnswerRe: strcmp for NULL character Pin
KingsGambit7-Jan-10 19:43
KingsGambit7-Jan-10 19:43 
QuestionRe: strcmp for NULL character Pin
CPallini7-Jan-10 20:35
mveCPallini7-Jan-10 20:35 
AnswerRe: strcmp for NULL character Pin
Anu_Bala7-Jan-10 21:17
Anu_Bala7-Jan-10 21:17 
QuestionRe: strcmp for NULL character Pin
CPallini7-Jan-10 21:59
mveCPallini7-Jan-10 21:59 
AnswerRe: strcmp for NULL character Pin
Hamid_RT7-Jan-10 20:53
Hamid_RT7-Jan-10 20:53 
Questionsending click message to child button of a window. Pin
_T("No name")7-Jan-10 18:28
_T("No name")7-Jan-10 18:28 
hi,

i want to send a click message to a window button. i am able to enumerate the window and also find the handle of button as well but not able to send the click message. Actually the default focus is set on some another message if i send BM_CLICK message that call goes to other button not the one i am sending..... attached code is below


CWnd* pWnd = NULL;
CWnd* pWndBtn = NULL;
DWORD dwErr = 0;
while(true)
{
     CWnd* WindowHandle = NULL;
     CWnd* ButtonHandle = NULL;

     WindowHandle = FindWindow(NULL, L"Microsoft Office Outlook");

     if(WindowHandle)
     {
         ButtonHandle = FindWindowEx(WindowHandle->GetSafeHwnd(), 0, L"Button", L"Allow");

     //send a message to the button that you are "clicking" it. Surprisingly C++ understands what BM_CLICK is without having to set it. Different than VB
         if(ButtonHandle)
         {
             CString strWnd ;
             ButtonHandle->GetWindowText(strWnd);
             WindowHandle->SetActiveWindow();
             ButtonHandle->SendMessage(BM_CLICK ,0,0);
         }
     }
}


plz help.. i tried even setting window active also but dint work
QuestionRe: sending click message to child button of a window. Pin
Nelek7-Jan-10 20:38
protectorNelek7-Jan-10 20:38 
AnswerRe: sending click message to child button of a window. Pin
_T("No name")11-Jan-10 21:52
_T("No name")11-Jan-10 21:52 
AnswerRe: sending click message to child button of a window. Pin
Roger Allen13-Jan-10 5:12
Roger Allen13-Jan-10 5:12 
GeneralRe: sending click message to child button of a window. Pin
_T("No name")13-Jan-10 5:55
_T("No name")13-Jan-10 5:55 
GeneralRe: sending click message to child button of a window. Pin
Roger Allen13-Jan-10 6:09
Roger Allen13-Jan-10 6:09 
GeneralRe: sending click message to child button of a window. Pin
_T("No name")13-Jan-10 6:20
_T("No name")13-Jan-10 6:20 
QuestionWhy does it print junk characters ? Pin
krish_kumar7-Jan-10 17:50
krish_kumar7-Jan-10 17:50 
AnswerRe: Why does it print junk characters ? Pin
oggenok647-Jan-10 18:34
oggenok647-Jan-10 18:34 
QuestionDifferent (Wrong) answers when not debugging Pin
Brien Smith-Martinez7-Jan-10 17:50
Brien Smith-Martinez7-Jan-10 17:50 
AnswerRe: Different (Wrong) answers when not debugging Pin
Garth J Lancaster7-Jan-10 18:16
professionalGarth J Lancaster7-Jan-10 18:16 
GeneralRe: Different (Wrong) answers when not debugging Pin
Brien Smith-Martinez7-Jan-10 23:08
Brien Smith-Martinez7-Jan-10 23:08 
GeneralRe: Different (Wrong) answers when not debugging Pin
Garth J Lancaster9-Jan-10 14:01
professionalGarth J Lancaster9-Jan-10 14:01 
QuestionRe: Different (Wrong) answers when not debugging Pin
CPallini7-Jan-10 22:09
mveCPallini7-Jan-10 22:09 
AnswerRe: Different (Wrong) answers when not debugging Pin
Brien Smith-Martinez7-Jan-10 23:06
Brien Smith-Martinez7-Jan-10 23:06 
AnswerRe: Different (Wrong) answers when not debugging Pin
KarstenK7-Jan-10 23:20
mveKarstenK7-Jan-10 23:20 
QuestionHow to save content in IPicture to JPG format? Pin
Jingcheng7-Jan-10 9:04
Jingcheng7-Jan-10 9:04 
QuestionRe: How to save content in IPicture to JPG format? Pin
David Crow7-Jan-10 11:02
David Crow7-Jan-10 11:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.