Archive: Conversion between pixels/dialog units/percents


Conversion between pixels/dialog units/percents
Is here exists any way to convert percents to pixels, dialog units to pixels, e.t.c. ?


For nsDialogs or something else? nsDialogs allows you to specify measurements in dialog units by using the "u" suffix. For example:

${NSD_CreateLabel} 0 0 100% 12u "Hello, welcome to nsDialogs!"
Pop $Label

for nsdialogs, let me explain, i have completely dynamic data with values in percents, i need to make link in check/radio box text label, i trying to use multiple label/link control for this, i have found gettextextent function macros, but it giving pixels, so i need to convert percents which i have in data to pixels for properly assign positions to windows, i have already asked about link in checkbox label here http://forums.winamp.com/showthread.php?t=350860


You can call user32::GetClientRect on the inner dialog hwnd, then calculate the percent based on that


thx for info.