none
Methods for three windows RRS feed

  • Question

  • I have three type window I get get it's child edit

    1G

    ptr: 1312714,ptr2: 001407CA,title: [[[1G]]], classname: [[[#32770]]]
    left: 612, top: 368, right: 987, bottom: 531
    	ptr: 1181026,ptr2: 00120562,title: [[[]]], classname: [[[Edit]]]
    	
    	ptr: 1507954,ptr2: 00170272,title: [[[01]]], classname: [[[Button]]]
    	
    	ptr: 592358,ptr2: 000909E6,title: [[[02]]], classname: [[[Button]]]
    	
    	ptr: 787840,ptr2: 000C0580,title: [[[03]]], classname: [[[Button]]]
    	
    	ptr: 461338,ptr2: 00070A1A,title: [[[04]]], classname: [[[Button]]]
    	
    	ptr: 918904,ptr2: 000E0578,title: [[[05]]], classname: [[[Button]]]
    	
    	ptr: 591760,ptr2: 00090790,title: [[[06]]], classname: [[[Button]]]
    	
    	ptr: 918896,ptr2: 000E0570,title: [[[07]]], classname: [[[Button]]]
    	
    	ptr: 526914,ptr2: 00080A42,title: [[[08]]], classname: [[[Button]]]
    	
    	ptr: 657312,ptr2: 000A07A0,title: [[[09]]], classname: [[[Button]]]
    	
    	ptr: 657226,ptr2: 000A074A,title: [[[10]]], classname: [[[Button]]]
    	
    	ptr: 853338,ptr2: 000D055A,title: [[[11]]], classname: [[[Button]]]
    	
    	ptr: 918870,ptr2: 000E0556,title: [[[12]]], classname: [[[Button]]]
    	
    	ptr: 592114,ptr2: 000908F2,title: [[[13]]], classname: [[[Button]]]
    	
    	ptr: 918914,ptr2: 000E0582,title: [[[14]]], classname: [[[Button]]]
    	
    	ptr: 592136,ptr2: 00090908,title: [[[15]]], classname: [[[Button]]]
    	
    	ptr: 918920,ptr2: 000E0588,title: [[[16]]], classname: [[[Button]]]
    	
    	ptr: 853416,ptr2: 000D05A8,title: [[[17]]], classname: [[[Button]]]
    	
    	ptr: 1115596,ptr2: 001105CC,title: [[[18]]], classname: [[[Button]]]
    	
    	ptr: 984430,ptr2: 000F056E,title: [[[19]]], classname: [[[Button]]]
    	
    	ptr: 461610,ptr2: 00070B2A,title: [[[20]]], classname: [[[Button]]]
    	
    	ptr: 657656,ptr2: 000A08F8,title: [[[21]]], classname: [[[Button]]]
    	
    	ptr: 723000,ptr2: 000B0838,title: [[[22]]], classname: [[[Button]]]
    	
    	ptr: 1640350,ptr2: 0019079E,title: [[[23]]], classname: [[[Button]]]
    	
    	ptr: 787422,ptr2: 000C03DE,title: [[[24]]], classname: [[[Button]]]
    	
    	ptr: 788394,ptr2: 000C07AA,title: [[[25]]], classname: [[[Button]]]
    	
    	ptr: 395768,ptr2: 000609F8,title: [[[26]]], classname: [[[Button]]]
    	
    	ptr: 657696,ptr2: 000A0920,title: [[[27]]], classname: [[[Button]]]
    	
    	ptr: 788770,ptr2: 000C0922,title: [[[28]]], classname: [[[Button]]]
    	
    	ptr: 853328,ptr2: 000D0550,title: [[[29]]], classname: [[[Button]]]
    	
    	ptr: 657788,ptr2: 000A097C,title: [[[30]]], classname: [[[Button]]]
    	
    	ptr: 917942,ptr2: 000E01B6,title: [[[31]]], classname: [[[Button]]]
    	
    	ptr: 395770,ptr2: 000609FA,title: [[[32]]], classname: [[[Button]]]
    	
    	ptr: 917624,ptr2: 000E0078,title: [[[33]]], classname: [[[Button]]]
    	
    	ptr: 2293796,ptr2: 00230024,title: [[[34]]], classname: [[[Button]]]
    	
    	ptr: 853336,ptr2: 000D0558,title: [[[35]]], classname: [[[Button]]]
    	
    	ptr: 132328,ptr2: 000204E8,title: [[[36]]], classname: [[[Button]]]
    	
    	ptr: 132326,ptr2: 000204E6,title: [[[37]]], classname: [[[Button]]]
    	
    	ptr: 132262,ptr2: 000204A6,title: [[[38]]], classname: [[[Button]]]
    	
    	ptr: 132264,ptr2: 000204A8,title: [[[39]]], classname: [[[Button]]]
    	
    	ptr: 197866,ptr2: 000304EA,title: [[[40]]], classname: [[[Button]]]
    	
    	ptr: 132256,ptr2: 000204A0,title: [[[41]]], classname: [[[Button]]]
    	
    	ptr: 197710,ptr2: 0003044E,title: [[[42]]], classname: [[[Button]]]
    	
    	ptr: 132258,ptr2: 000204A2,title: [[[43]]], classname: [[[Button]]]
    	
    	ptr: 132260,ptr2: 000204A4,title: [[[44]]], classname: [[[Button]]]
    	
    	ptr: 132266,ptr2: 000204AA,title: [[[45]]], classname: [[[Button]]]
    	
    	ptr: 132324,ptr2: 000204E4,title: [[[46]]], classname: [[[Button]]]
    	
    	ptr: 524422,ptr2: 00080086,title: [[[47]]], classname: [[[Button]]]
    	
    	ptr: 132696,ptr2: 00020658,title: [[[Caps Lock]]], classname: [[[Button]]]
    	
    	ptr: 132694,ptr2: 00020656,title: [[[←]]], classname: [[[Button]]]
    	
    	ptr: 132692,ptr2: 00020654,title: [[[OK]]], classname: [[[Button]]]
    	
    
    2G
    ptr: 1050516,ptr2: 00100794,title: [[[2G]]], classname: [[[#32770]]]
    
    	ptr: 787934,ptr2: 000C05DE,title: [[[]]], classname: [[[Edit]]]
    	
    	ptr: 395320,ptr2: 00060838,title: [[[O  K]]], classname: [[[Button]]]
    	
    	ptr: 919824,ptr2: 000E0910,title: [[[N  O]]], classname: [[[Button]]]
    	
    	ptr: 329976,ptr2: 000508F8,title: [[[MESSAGE]]], classname: [[[Button]]]
    	
    	ptr: 395118,ptr2: 0006076E,title: [[[]]], classname: [[[Button]]]
    	
    	ptr: 919492,ptr2: 000E07C4,title: [[[INFORM:]]], classname: [[[Static]]]
    	
    	ptr: 395490,ptr2: 000608E2,title: [[[]]], classname: [[[Edit]]]
    	
    	ptr: 919826,ptr2: 000E0912,title: [[[SAFE]]], classname: [[[Button]]]
    	
    	ptr: 853344,ptr2: 000D0560,title: [[[]]], classname: [[[Button]]]
    	
    	ptr: 329956,ptr2: 000508E4,title: [[[]]], classname: [[[Static]]]
    	
    	ptr: 525278,ptr2: 000803DE,title: [[[]]], classname: [[[Static]]]
    	
    	ptr: 525710,ptr2: 0008058E,title: [[[]]], classname: [[[Static]]]
    	
    	ptr: 525718,ptr2: 00080596,title: [[[]]], classname: [[[Static]]]
    	
    	ptr: 656770,ptr2: 000A0582,title: [[[]]], classname: [[[Static]]]
    	
    	ptr: 329992,ptr2: 00050908,title: [[[]]], classname: [[[Static]]]
    	
    
    NONE TITLE ""

    ptr: 198852,ptr2: 000308C4,title: [[[]]], classname: [[[#32770]]]
    
    	ptr: 198854,ptr2: 000308C6,title: [[[]]], classname: [[[Static]]]
    	
    	ptr: 198856,ptr2: 000308C8,title: [[[]]], classname: [[[Static]]]
    	
    ptr: 526508,ptr2: 000808AC,title: [[[]]], classname: [[[#32770]]]
    
    	ptr: 264378,ptr2: 000408BA,title: [[[]]], classname: [[[Edit]]]
    	left: 1022, top: 427, right: 1170, bottom: 447
    	ptr: 264382,ptr2: 000408BE,title: [[[Ok]]], classname: [[[Button]]]
    	left: 987, top: 468, right: 1074, bottom: 500
    	ptr: 264380,ptr2: 000408BC,title: [[[Cancel]]], classname: [[[Button]]]
    	left: 1084, top: 468, right: 1171, bottom: 500
    	ptr: 264384,ptr2: 000408C0,title: [[[]]], classname: [[[Static]]]
    	left: 863, top: 474, right: 963, bottom: 493
    	ptr: 591986,ptr2: 00090872,title: [[[]]], classname: [[[Static]]]
    	left: 1153, top: 359, right: 1194, bottom: 385
    	ptr: 198860,ptr2: 000308CC,title: [[[]]], classname: [[[ATL:69700830]]]
    	left: 839, top: 525, right: 1174, bottom: 652
    

    three windows contain different title and contain different child

    but I want to get it's class edit with title ""

    is there any method I can verify then get its class edit?

    If I only look for class 32770 it will have error because each type window contain lots of class 32770 and its title

    And I know which window I will meet this time.

    I will meet one of these window in random

    So I need method to verify each 32770 and each title also it's child

    How to do this?

    Thanks

    Sunday, May 24, 2020 4:03 AM

Answers

  • Is there any function I can use to get it's content

    If you want to get the text of an Edit control in another process, it is by sending WM_GETTEXT
    • Marked as answer by CY_Chen Sunday, May 31, 2020 1:00 PM
    Wednesday, May 27, 2020 6:03 AM

All replies

  • "#32770" is Dialog Box class

    If the "Edit" class to be found is always the first one as child of "#32770",

    you can use FindWindowEx from the parent "#32770" class window

    Otherwise, EnumChildWindows

    Sunday, May 24, 2020 6:56 AM
  • Hi Castorix31 

    I am use FindWindowEx to find 32770 then its child edit

    But sometimes it will contain other 32770 without child class edit

    Also three case 32770 with different title and different child 

    My problem is I will face one of three type class 32770 randomly

    Each 32770 with different tile also contain some 32770 class without child edit

    Is there has script or algorithm let c# know how to do for each

    Like I will check 32770 and title is 1G I will know it may first case 

    Then I will check child I know it contain edit and lots of button I will know I find first case

    If condition is not I will check is second case or third case or I find wrong to find next 32770 

    Sunday, May 24, 2020 7:19 AM
  • If the "Edit" window must be always the fist child "Edit" window of "#32770", you can use EnumChildWindows

    and stop the enumeration asa you find this first "Edit" window

    Sunday, May 24, 2020 10:57 AM
  • Hi Castorix

    But sometimes any off these case windoes will also contain some 32770 and it also has child edit but those arn't those three type class 32770 and it's child I want

    How to prevent those case?

    Sunday, May 24, 2020 1:34 PM
  • I don't understand very well the hierarchy of your controls...

    Sometimes, you can also identify the controls by their Control ID (GetDlgCtrlID), if they are not generated dynamically

    For example, with Spy++ to check the Control ID of an Edit control :

    Sunday, May 24, 2020 1:56 PM
  • Hi Castorix31

    I use FindWindowEx with class name and title

    which function can identify Control ID or use it as parameter?

    Thanks 

     
    Sunday, May 24, 2020 2:00 PM
  • When you enumerate child controls with EnumChildWindows you can get the ID with GetDlgCtrlID

    But you must check first with tools like Spy++ if they are constants (always the same ID every time you launch the application) : if they are generated dynamically, it is useless.

    Sunday, May 24, 2020 2:15 PM
  • Hi Castorix31

    Thnks 

    But I look all the window Curl ID is all 00000

    Tuesday, May 26, 2020 8:34 AM
  • But I look all the window Curl ID is all 00000

    If they are = 0, you cannot use them to identify the windows

    Use EnumChildWindows and try to find something to identify the "Edit" controls (like parent window, previous or next window in the hierarchy, ...)

    Tuesday, May 26, 2020 9:25 AM
  • Hi Catorix31         

    Thans for repling

    If I try to set value edit and get its value

    Is there any function I can use to get it's content

    Maybe it will help me to verify which one is correct one child

    Thanks 

    Wednesday, May 27, 2020 2:13 AM
  • Is there any function I can use to get it's content

    If you want to get the text of an Edit control in another process, it is by sending WM_GETTEXT
    • Marked as answer by CY_Chen Sunday, May 31, 2020 1:00 PM
    Wednesday, May 27, 2020 6:03 AM