News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Need larger window

Started by Magnum, June 30, 2013, 05:21:37 AM

Previous topic - Next topic

Magnum

I have a very old program that has a fixed size window.

Because of declining vision, I need a larger window.

It doesn't use CreateWindow, what would it use instead ?

Thanks.



Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

dedndave

there are a few CreateDialog functions
possibly the dialog is in resource - try res hacker

Magnum

I found this.

extrn CreateDialogIndirectParamA:dword ; Create   a modeless dialog box from
         ; a dialog box template   in memory
Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

Zen

This is kind of silly,...but, you can invoke GetDesktopWindow. Then, with that handle you can obtain the Device Context: GetDC.
Then,...and this is the fun part,...you can display some data using a huge font.
Here is a link to MSDN GDI Functions: Windows GDI. Microsoft tells you that these functions are obsolete and, not to use them in new programs,...but, they work great,...and, are especially annoying if your legacy app was written in MFC.

Magnum

I don't call your posts silly.  :biggrin:

Is this the right thing that needs some larger sizes and if so which one do I need to change.

Andy


CONTROL "1", -1, STATIC, SS_RIGHT | WS_CHILD | WS_VISIBLE | WS_GROUP, 0, 9, 8, 9
   CONTROL "00:00:00", 1018, STATIC, SS_CENTER | SS_NOTIFY | SS_CENTERIMAGE | WS_CHILD | WS_VISIBLE | WS_GROUP, 11, 7, 42, 12 , 0x00020000
   CONTROL "START", 1019, BUTTON, BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 53, 7, 33, 13
   CONTROL "2", -1, STATIC, SS_RIGHT | WS_CHILD | WS_VISIBLE | WS_GROUP, 0, 25, 8, 9
   CONTROL "00:00:00", 1020, STATIC, SS_CENTER | SS_NOTIFY | SS_CENTERIMAGE | WS_CHILD | WS_VISIBLE | WS_GROUP, 11, 23, 42, 12 , 0x00020000
   CONTROL "START", 1021, BUTTON, BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 53, 23, 33, 13
   CONTROL "3", -1, STATIC, SS_RIGHT | WS_CHILD | WS_VISIBLE | WS_GROUP, 0, 41, 8, 9
   CONTROL "00:00:00", 1022, STATIC, SS_CENTER | SS_NOTIFY | SS_CENTERIMAGE | WS_CHILD | WS_VISIBLE | WS_GROUP, 11, 39, 42, 12 , 0x00020000
   CONTROL "START", 1023, BUTTON, BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 53, 39, 33, 13
   CONTROL "4", -1, STATIC, SS_RIGHT | WS_CHILD | WS_VISIBLE | WS_GROUP, 0, 57, 8, 9
   CONTROL "00:00:00", 1024, STATIC, SS_CENTER | SS_NOTIFY | SS_CENTERIMAGE | WS_CHILD | WS_VISIBLE | WS_GROUP, 11, 55, 42, 12 , 0x00020000
   CONTROL "START", 1025, BUTTON, BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 53, 55, 33, 13
   CONTROL "5", -1, STATIC, SS_RIGHT | WS_CHILD | WS_VISIBLE | WS_GROUP, 0, 74, 8, 9
   CONTROL "00:00:00", 1026, STATIC, SS_CENTER | SS_NOTIFY | SS_CENTERIMAGE | WS_CHILD | WS_VISIBLE | WS_GROUP, 11, 72, 42, 12 , 0x00020000
   CONTROL "START", 1027, BUTTON, BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 53, 72, 33, 13
   CONTROL "6", -1, STATIC, SS_RIGHT | WS_CHILD | WS_VISIBLE | WS_GROUP, 93, 9, 8, 9
   CONTROL "00:00:00", 1028, STATIC, SS_CENTER | SS_NOTIFY | SS_CENTERIMAGE | WS_CHILD | WS_VISIBLE | WS_GROUP, 104, 7, 42, 12 , 0x00020000
   CONTROL "START", 1029, BUTTON, BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 146, 7, 33, 13
   CONTROL "7", -1, STATIC, SS_RIGHT | WS_CHILD | WS_VISIBLE | WS_GROUP, 93, 25, 8, 9
   CONTROL "00:00:00", 1030, STATIC, SS_CENTER | SS_NOTIFY | SS_CENTERIMAGE | WS_CHILD | WS_VISIBLE | WS_GROUP, 104, 23, 42, 12 , 0x00020000
   CONTROL "START", 1031, BUTTON, BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 146, 23, 33, 13
   CONTROL "8", -1, STATIC, SS_RIGHT | WS_CHILD | WS_VISIBLE | WS_GROUP, 93, 41, 8, 9
   CONTROL "00:00:00", 1032, STATIC, SS_CENTER | SS_NOTIFY | SS_CENTERIMAGE | WS_CHILD | WS_VISIBLE | WS_GROUP, 104, 39, 42, 12 , 0x00020000
   CONTROL "START", 1033, BUTTON, BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 146, 39, 33, 13
   CONTROL "9", -1, STATIC, SS_RIGHT | WS_CHILD | WS_VISIBLE | WS_GROUP, 93, 57, 8, 9
   CONTROL "00:00:00", 1034, STATIC, SS_CENTER | SS_NOTIFY | SS_CENTERIMAGE | WS_CHILD | WS_VISIBLE | WS_GROUP, 104, 55, 42, 12 , 0x00020000
   CONTROL "START", 1035, BUTTON, BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 146, 55, 33, 13
   CONTROL "10", -1, STATIC, SS_RIGHT | WS_CHILD | WS_VISIBLE | WS_GROUP, 93, 74, 8, 9
   CONTROL "00:00:00", 1036, STATIC, SS_CENTER | SS_NOTIFY | SS_CENTERIMAGE | WS_CHILD | WS_VISIBLE | WS_GROUP, 104, 72, 42, 12 , 0x00020000
   CONTROL "START", 1037, BUTTON, BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 146, 72, 33, 13

Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

Zen

MAGNUM,
I didn't mean that your question was silly,...I mean't that my suggestion was silly (because. normally you wouldn't want to overwrite the display on the Desktop).
It will, however, work. And, it will work with any available window.
Probably the best solution would be to invoke: CreateWindowEx, and then display data in a HUGE font. This can then be destroyed immediately

Magnum

I don't have the source, so that's why I am looking to change some instructions in the .exe to have it display a larger window.

The program displays a set of 10 timers that I use a lot for brewing tea, conspiracy theories, etc.  :t

The window is 286 pixels wide but I can't find that to make it larger.

I read up DIALOGEX and WM_INITDIALOG and how they use CreateWindowEx.

Andy
Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

sinsi

Doesn't Windows have a zoom/magnifier tool?

Magnum

It does but it's a little cumbersome.

I found another timer that's larger.



Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

TWell

If you mean to modify old exe, just use ResourceHacker or another dialog editor to change dialog font size bigger.
With poide.exe it's possible too.

Magnum

I need the window larger, not a larger font.

Andy

Unless making the font larger would make the window larger.

Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

japheth

Quote from: Magnum on July 01, 2013, 08:49:26 AM
Unless making the font larger would make the window larger.

It will. However, there's no guarantee that you can change the font size in the dialog template - the font parameters are an optional part of the dialog resource ( DS_SETFONT flag must be set ).


xandaz

  Maybe if you were to step into a CreateWindowEx call, you'd realise there's a more manual way of doing it. Just a thought of course. I never did it.

Magnum

I found the CreateWindowEx call using IDA but I can't find out how to get to it using Ollydbg.

If I can get to it, it should be simple to give it larger width and height values.

Andy
Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

Magnum

I found this, but no where can I find where any of the parameters are passed.

??



CPU Disasm
Address   Hex dump          Command                                  Comments
7E42E4A9  /$  8BFF          MOV EDI,EDI                              ; HWND USER32.CreateWindowExA(ExtStyle,ClassName,WindowName,Style,X,Y,Width,Height,hParent,hMenu,hInst,lParam)
7E42E4AB  |.  55            PUSH EBP
7E42E4AC  |.  8BEC          MOV EBP,ESP
7E42E4AE  |.  68 01000040   PUSH 40000001                            ; /Arg13 = 40000001
7E42E4B3  |.  FF75 34       PUSH DWORD PTR SS:[ARG.12]               ; |Arg12 => [ARG.12]
7E42E4B6  |.  FF75 30       PUSH DWORD PTR SS:[ARG.11]               ; |Arg11 => [ARG.11]
7E42E4B9  |.  FF75 2C       PUSH DWORD PTR SS:[ARG.10]               ; |Arg10 => [ARG.10]
7E42E4BC  |.  FF75 28       PUSH DWORD PTR SS:[ARG.9]                ; |Arg9 => [ARG.9]
7E42E4BF  |.  FF75 24       PUSH DWORD PTR SS:[ARG.8]                ; |Arg8 => [ARG.8]
7E42E4C2  |.  FF75 20       PUSH DWORD PTR SS:[ARG.7]                ; |Arg7 => [ARG.7]
7E42E4C5  |.  FF75 1C       PUSH DWORD PTR SS:[ARG.6]                ; |Arg6 => [ARG.6]
7E42E4C8  |.  FF75 18       PUSH DWORD PTR SS:[ARG.5]                ; |Arg5 => [ARG.5]
7E42E4CB  |.  FF75 14       PUSH DWORD PTR SS:[ARG.4]                ; |Arg4 => [ARG.4]
7E42E4CE  |.  FF75 10       PUSH DWORD PTR SS:[ARG.3]                ; |Arg3 => [ARG.3]
7E42E4D1  |.  FF75 0C       PUSH DWORD PTR SS:[ARG.2]                ; |Arg2 => [ARG.2]
7E42E4D4  |.  FF75 08       PUSH DWORD PTR SS:[ARG.1]                ; |Arg1 => [ARG.1]
7E42E4D7  |.  E8 B5FEFFFF   CALL 7E42E391                            ; \USER32.7E42E391
Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org