Enable HIBERNATE Button in Shutdown Dialog Box ! (Tutorial Contest)

chiragchirag MemberNAT Warrior
Hi guys!

Today a question came into my mind that why Hibernate button is not visible in Shutdown dialog box and why it appears when we press <SHIFT> key?

So I opened [msgina.dll file into Resource Hacker and started R&D with it.

I checked in 20100 dialog that there was an entry for Hibernate button, still it was not visible in shutdown dialog box. But when I checked its properties, I was surprised. Its Left distance and Top distance were set to 30093, 30049 respectively. It means it was there but was set to not appear in dialog box coz the dialog box size was lesser than the hibernate button.

So I set its distance from LEFT & TOP to 5 and VOILLA, it started to show in the dialog box.

Then I did some more R&D with it and added a string saying "Hibernate" and changed other items places so that all 4 items "Hibernate, Stand by, Shut down, restart" can be shown in dialog box.

So the FINAL thing is that, u hv to just change the LEFT & TOP distances of Hibernate button and it'll be visible in shutdown dialog box!

Also I'm posting the contents of the dialog box, so that u can easily just copy-paste them in the required place!

So here is the step-by-step tutorial:

1.) Open %windir%\system32\msgina.dll file into Resource Hacker.
2.) Goto Dialog -> 20100 -> 1033.
3.) If u want the following look (Hibernate button at bottom-center) :

hibernatebuttonts2.jpg

Paste following code:
0100 DIALOGEX 0, 0, 208, 122
STYLE DS_SYSMODAL | DS_SETFOREGROUND | WS_POPUP | WS_BORDER
CAPTION ""
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
FONT 8, "MS Shell Dlg"
{
CONTROL "Flag", 20101, STATIC, SS_OWNERDRAW | WS_CHILD | WS_VISIBLE, 176, 0, 32, 26
CONTROL "Good Bye", 20102, STATIC, SS_OWNERDRAW | WS_CHILD | WS_VISIBLE, 7, 0, 162, 26
CONTROL "&Stand By", 20104, BUTTON, BS_OWNERDRAW | BS_NOTIFY | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 45, 47, 22, 20
CONTROL "Switch &Off", 20103, BUTTON, BS_OWNERDRAW | BS_NOTIFY | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 91, 47, 22, 20
CONTROL "&Reboot", 20105, BUTTON, BS_OWNERDRAW | BS_NOTIFY | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 140, 47, 22, 20
CONTROL "&Hibernate", 20106, BUTTON, BS_PUSHBUTTON | BS_NOTIFY | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 79, 94, 48, 20
CONTROL "", 20108, STATIC, SS_OWNERDRAW | WS_CHILD | WS_VISIBLE | WS_DISABLED, 22, 73, 50, 8
CONTROL "", 20107, STATIC, SS_OWNERDRAW | WS_CHILD | WS_VISIBLE | WS_DISABLED, 79, 73, 50, 8
CONTROL "", 20109, STATIC, SS_OWNERDRAW | WS_CHILD | WS_VISIBLE | WS_DISABLED, 136, 73, 50, 8
}

4.) OR if u want following look (Hibernate button at the same place as of other items with added string) :

hibernateenablels4.jpg

Then paste following code:
20100 DIALOGEX 0, 0, 208, 122
STYLE DS_SYSMODAL | DS_SETFOREGROUND | WS_POPUP | WS_BORDER
CAPTION ""
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
FONT 8, "MS Shell Dlg"
{
CONTROL "Flag", 20101, STATIC, SS_OWNERDRAW | WS_CHILD | WS_VISIBLE, 176, 0, 32, 26
CONTROL "Good Bye", 20102, STATIC, SS_OWNERDRAW | WS_CHILD | WS_VISIBLE, 7, 0, 162, 26
CONTROL "&Stand By", 20104, BUTTON, BS_OWNERDRAW | BS_NOTIFY | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 68, 49, 22, 20
CONTROL "Switch &Off", 20103, BUTTON, BS_OWNERDRAW | BS_NOTIFY | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 117, 49, 22, 20
CONTROL "&Reboot", 20105, BUTTON, BS_OWNERDRAW | BS_NOTIFY | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 169, 49, 22, 20
CONTROL "&Hibernate", 20106, BUTTON, BS_PUSHBUTTON | BS_NOTIFY | WS_CHILD | WS_VISIBLE, 9, 49, 39, 20
CONTROL "", 20108, STATIC, SS_OWNERDRAW | WS_CHILD | WS_VISIBLE | WS_DISABLED, 55, 73, 50, 8
CONTROL "", 20107, STATIC, SS_OWNERDRAW | WS_CHILD | WS_VISIBLE | WS_DISABLED, 105, 73, 50, 8
CONTROL "", 20109, STATIC, SS_OWNERDRAW | WS_CHILD | WS_VISIBLE | WS_DISABLED, 155, 73, 50, 8
CONTROL "Hibernate", 0, STATIC, SS_CENTER | WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS, 14, 73, 32, 8
}

PS: Pressing <SHIFT> key will still work...
Sign In or Register to comment.