View Full Version : Enable / Disable buttons?
tudou
July 17th, 2001, 12:08
Hi,
It's me again.
Sometimes a button can be enabled or disabled by the program according to the current conditions. For example, if you click the save file button, the button will be disabled after your file is saved until you modify you file again.
My question is which API controls the enable and disable operations? cause I don't know how to set the break point in SoftIce.
Thanks!
The Diver
July 17th, 2001, 13:30
This depends on the language that the program was written in. If it is Visual Basic you will find a description of how to do this on the New Visual Basic 6.0 web site anounced a few days ago. You will also find a lot more information.
BobTheRock
July 17th, 2001, 13:58
Hello tudou,
it can be done in at least to way:
1) EnableWindow
2) sending a WM_ENABLE with SendMessage to the control
Regards,
BobTheRock
neo
July 17th, 2001, 17:35
If you like enable for buttons and menus for VB read E_bliss tuts on his site very good stuff..if you like delphi or vc++ read on immortal DEscendants web(by lord) .. you will find all that you need ..
NeO'X'QuiCK
BobTheRock
July 18th, 2001, 08:26
Can anyone post the urls to such site? Thx.
Regards,
BobTheRock
Bengaly
August 11th, 2001, 04:20
whoo whoo CripleWare ;DD
if it's VC++/WIN32ASM than it sets a flag [01/00]
on the API that controls the "Enable/Disable" function.
01=Enable
00=Disable
Normaly there would be a MOV instruction ;
Mov EAX,0000001 or semilar instruction to control the di/en function...
find that and kick it! ;D
guest (WoZX)
August 29th, 2001, 03:31
try Yoda Window Manager,
i forgot where's his homepage is.
CoDe_InSiDe
August 29th, 2001, 03:45
y0da.cjb.net
Cya...
CoDe_InSiDe
pompeii
September 1st, 2001, 11:14
If this was the c++ code:
GetDlgItem(IDC_BUTTON_EXIT)->EnableWindow(FALSE);
you could set a bpx on enablewindow and find something like this:
0040164F push 0 <-- Modify this
00401651 push 3E8h
00401656 mov ecx, [ebp-4]
00401659 call j_?GetDlgItem@CWnd@@QBEPAV1@H@Z ; CWnd::GetDlgItem(int)
0040165E mov ecx, eax
00401660 call j_?EnableWindow@CWnd@@QAEHH@Z ; CWnd::EnableWindow(int)
All you have to do is change the 0 at 0040164F to a 1. The code above was disassembled in IDA, so it won't look like that in SoftIce.
Powered by vBulletin® Version 4.2.2 Copyright © 2018 vBulletin Solutions, Inc. All rights reserved.