So it's a challenge, I've hammered on ideas like using single lined text controls but there's another potential issue: other languages are supposed to populate those text controls and some of those languages are longer/shorter than english, which means these controls have to be dynamic to grow or shrink to accommodate this.
Here is what I have so far, if you fiddle for two minutes you'll see the puzzle as well. Download needed files: ...and here is my code extract:
Code: Select all
#SingleInstance, Force
DllCall("GDI32.DLL\AddFontResourceEx", Str,"XPtahoma.ttf",UInt,(FR_PRIVATE:=0x10), Int,0) ; loads XpTahoma.ttf
SysGet, MainMonitorNumber, MonitorPrimary ; gets primary monitor id
SysGet, MainMonitor, Monitor, %MainMonitorNumber% ; gets dimensions of primary monitor
Yposition := Round(MainMonitorBottom / 4 + 391) ; divides height by 4, adds 391 to get Y position
ShutdownUpdatesText = Click Turn Off to install important updates and turn off`nyour computer. Click here to turn off without installing`nupdates.
Gui, ShutdownUpdates: New
Gui, ShutdownUpdates: Margin, 0
Gui, ShutdownUpdates: Color, Black
Gui, ShutdownUpdates: Add, Picture, x1 y0 w313 h112, Bitmap20142updates.png
Gui, ShutdownUpdates: Add, Picture, x5 y12 w16 h-1 +BackgroundTrans, ShutdownUpdates.png
Gui, ShutdownUpdates: Add, Button, x225 y84 w78 h21 gCancel, Cancel
Gui, ShutdownUpdates: Font, cWhite s12 norm, fs tahoma 8px
Gui, ShutdownUpdates: Add, Text, x26 y11 w290 h100 +BackgroundTrans, %ShutdownUpdatesText%
Gui, ShutdownUpdates: +ToolWindow -Caption +AlwaysOnTop
Gui, ShutdownUpdates: Show, y%Yposition% w315 h113, ShutdownUpdates
return
Esc::
Cancel:
DllCall("GDI32.DLL\RemoveFontResourceEx",Str,"misc\XPtahoma.ttf",UInt,(FR_PRIVATE:=0x10),Int,0) ; XpTahoma.ttf
ExitApp