2

CyLog’s WildRename is a good program for performing batch-renames on files. The problem with it is that while the main window is resizable, it does not have the maximize box which makes it a little frustrating to size and use. Moreover, they have not made any updates in a long time, so the program is essentially discontinued.

I ran WildRename and used WinSpy++ to modify the style of its window to manually include the WS_MINIMIZEBOX style and bam!, it was now functioning as expected.

The question now is how to make this permanent.

My first instinct was to fire up ResHacker, but the problem is that the style that needs to be modified is that of the main window of a non-dialog application, so ResHacker has no way of doing this.

The next thing I tried was to open it in a hex-editor, to find the address(es) of the string corresponding to the titlebar. I then opened the file in W32Dasm and located the address of the code that references the address of the titlebar string. I did all this in an attempt to find the location of where the main dialog is created so that I can modify the style passed to CreateWindow(). Unfortunately, I cannot find a call to CreateWindow anywhere near the reference to the titelbar string and none of the calls to CreateWindowEx that I can find seem to be (obviously) the ones used to create the main window.

Is there an easy/automated way of modifying the style of the main window (assuming a non-dialog application)?

AstroCB
  • 12,337
  • 20
  • 57
  • 73
Synetech
  • 9,643
  • 9
  • 64
  • 96

2 Answers2

0

You could use a debugger like OllyDBG to dump the exe memory after the edit with WinSpy++, then use that exe or compare the files to see where the change is if you want to see what you've missed

MitziMeow
  • 635
  • 4
  • 13
0

There has to be a call to CreateWindow/Ex(), especially if it not a dialog from a resource. You just need to look harder. I would use IDA instead of WinDasm. It will decompile the assembly into more understandable code, and it has a built-in debugger. You can put a breakpoint on the title string and see in real-time which code actually touches it, and then follow it back to the accessing code.

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770