NO

Author Topic: WiW  (Read 3758 times)

Grincheux

  • Guest
WiW
« on: April 25, 2021, 10:27:46 AM »
Where Is the Window?

My progran only runs when I start Degug mode with or without any break point.
I don't understand why. Is it crached ? I thing but where?

The program just enumerates the windows and store some informations into a file.
Not very difficult.

I must start my program with the debugger even for release. It stops at first line, I made "Go" and it runs...

Some help would be welcome
« Last Edit: April 26, 2021, 08:44:27 PM by Grincheux »

Offline John Z

  • Member
  • *
  • Posts: 790
Re: WiW
« Reply #1 on: April 25, 2021, 03:15:13 PM »
I'm not clear on the problem, but I downloaded the attached 7z file and just ran the exe and it showed up w/o issue, as the top window.  Not sure what I was to see but it used the whole screen.  Attached screen shot.

On your system you might see if a previous crash has left something running in the background by using the task manager or possibly Pelles Process Viewer.  I've run into that on occasion.

I'll can try to compile and run too.

John Z

Grincheux

  • Guest
Re: WiW
« Reply #2 on: April 25, 2021, 03:23:54 PM »
Thank You John, this what I try to get on my screen.
I will made search as you say.
Have a good sunny day

Offline John Z

  • Member
  • *
  • Posts: 790
Re: WiW
« Reply #3 on: April 25, 2021, 03:59:21 PM »
Just unpacked it and it compiled w/o error and appeared to run creating the same full screen black window.  It created a file "WiW - Windows.txt."  The file is not fully readable by a plain text editor although that maybe by design....

On occasion I've messed up so badly that I had to reboot the computer to clear something before PellesC would work correctly again ;(  So might try that if you haven't already.

John Z

Grincheux

  • Guest
Re: WiW
« Reply #4 on: April 25, 2021, 06:25:53 PM »
I have found.
If my spirit was so special I would append to to something good.
Just had to take some time to read my code.
Nothing was good... It was a spaghetti code...

Grincheux

  • Guest
Re: WiW
« Reply #5 on: April 26, 2021, 08:14:22 AM »
What is there on your screen, that could help you to find...
« Last Edit: April 26, 2021, 08:44:08 PM by Grincheux »

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2091
Re: WiW
« Reply #6 on: April 26, 2021, 11:41:38 AM »

Exception: Access violation in function WriteFile
May the source be with you

Grincheux

  • Guest
Re: WiW
« Reply #7 on: April 26, 2021, 01:15:03 PM »
I am sorry, I never had this problem.
Here is an updated version.
I was asking to myself if you were dead or alive?

I have updated the program, removed sqlite3, no dll needed.
Dead code removed.
No need to create a file for storing datas!
Added a fixed font for the listview.
If the hInstance stored int the class structure is not the same as the one that is stored into the window (GWLP_HINSTANCE), the two are listed.
Idem for the windowProc, if the value stored is not the same as in GWLP_WNDPROC, the two values are listed.
Why that? I would like to indicate if the window has been subclassed or no.

There is a ini file where you can overide the defaut for WindowDisplaySetting.
If the file is found into the program folder it is read.
If not found, the value WDA_EXCLUDEFROMCAPTURE is set.

Now, if you double click on a item, it researches the children and displays them into an other window.
« Last Edit: April 30, 2021, 01:29:35 PM by Grincheux »

Grincheux

  • Guest
Re: WiW
« Reply #8 on: April 30, 2021, 01:39:28 PM »
Now the program walk on many levels. He is not a walker but rather a diver.

On my machine, after the main level, I could go 6 levels down!
In the previous versions I could not do this because I used a global variable.

Sometimes, in the "hModule" column ou in the "Window Proc" you can see "xxxxx / yyyyyyy" this because the values
found into the WNDCLASSEX structure and the value got with GetWindowLongPtrA were not the same.

I told to JohnZ that I will add a hook, finaly not because it does not match my goal that is to find any subclassing.
For the beginners the program aligns all its datas and jumps.

One thing that can be misunderstood is that sometimes I replace the "CALL" with a "PUSH" and a "JMP".
As would say Frankie "The standard..." :P

By security in some functions there is a QWORD of difference if you count the parameters of the biggest function. That's normal.

An other detail: I add 2 times the first column and at the end I delete the first column!
This is because the formats is not applied on the first colum.

Info: The MSDN doc about LVM_SETSELECTEDCOLUMN is wrong.

Quote
LVM_SETSELECTEDCOLUMN message
05/31/2018
2 minutes to read

Sets the index of the selected column.

Parameters
wParam  Value of type **int** that specifies the column index.
lParam   Must be zero.

Return value The return value is not used.

Remarks
The column indices are stored in an int array. See the puColumns member of LVITEM.

In fact call this message as follow :
Code: [Select]
                     mov      rcx,_hListView
                     mov      edx,LVM_SETSELECTEDCOLUMN
                     mov      r8d,3 <------------------------------- Column to select
                     xor      r9d,r9d
                     call   SendMessageA
« Last Edit: April 30, 2021, 01:58:21 PM by Grincheux »

Offline John Z

  • Member
  • *
  • Posts: 790
Re: WiW
« Reply #9 on: May 01, 2021, 11:32:37 AM »
Can you explain a bit more for this table issue?

An other detail: I add 2 times the first column and at the end I delete the first column!
This is because the formats is not applied on the first column.

I also use this listview table, performance is poor for big tables but I've had no problem setting the first column text, font, color, etc in my C vCard program.  The only thing I can think offhand is the 1st column needs to be referred to as column 0.  Shouldn't need to do extra work  :)

John Z

Grincheux

  • Guest
Re: WiW
« Reply #10 on: May 01, 2021, 11:41:17 AM »
The first column always is aligned on the left, try to align right or center, you can't.
For doing this once the first column is inserted, send LVM_SETITEM with LVI.iSubItem = 1 for duplicating the first column. Continue inserting colums, at the end delete the first colum, the one for which you call LVM_INSERTITEM.
« Last Edit: May 01, 2021, 11:43:33 AM by Grincheux »

Offline John Z

  • Member
  • *
  • Posts: 790
Re: WiW
« Reply #11 on: May 01, 2021, 12:17:16 PM »
You are absolutely right!  Didn't need that so I hadn't tried.

Thanks!

John Z

Grincheux

  • Guest
Re: WiW
« Reply #12 on: May 01, 2021, 12:36:06 PM »
Numbers are better when aligned on right, in France... :D

Offline John Z

  • Member
  • *
  • Posts: 790
Re: WiW
« Reply #13 on: May 01, 2021, 02:15:26 PM »
Sorry to report  :( that the latest version posted above, Yesterday at 01:58:21 doesn't work on my system.
Tried as administrator too.  Not hiding in the background either.
Mod date on the file Friday, ‎April ‎30, ‎2021, ‏‎6:53:08 AM
SHA256: 153BA8F04DB11C5D376D77BA0C0C002F117A6516697FEC44BDFEBBB12F322E26


John Z

Windows 10 64 bit BTW.

Grincheux

  • Guest
Re: WiW
« Reply #14 on: May 01, 2021, 02:29:31 PM »
Ok, I will look at