Update: UltraVNC 1.4.3.6 and UltraVNC SC 1.4.3.6: https://forum.uvnc.com/viewtopic.php?t=37885
Important: Please update to latest version before to create a reply, a topic or an issue: https://forum.uvnc.com/viewtopic.php?t=37864

Join us on social networks and share our announcements:
- Website: https://uvnc.com/
- GitHub: https://github.com/ultravnc
- Mastodon: https://mastodon.social/@ultravnc
- Facebook: https://www.facebook.com/ultravnc1
- X/Twitter: https://x.com/ultravnc1
- Reddit community: https://www.reddit.com/r/ultravnc
- OpenHub: https://openhub.net/p/ultravnc

File Transfer Window Size

Any features you would like to see in UltraVNC? Propose it here
Post Reply
Valle3k
Posts: 2
Joined: 2006-03-30 09:07

File Transfer Window Size

Post by Valle3k »

Hi!

What I'd like to see in a future version is a sizeable file transfer window.
This actual one ist pretty small and unhandy when browsing through directories with many files.

The window should also remember it's size so you don't have to resize it every time you start a new connection and a file transfer.

Hope to see these features in an upcoming version.

Thanks and bye!
Valle
Terriff
20
20
Posts: 51
Joined: 2005-01-28 19:28

Post by Terriff »

I agree. I don't see why it's so hard to make this window sizeable.
UltraSam
Admin & Developer
Admin & Developer
Posts: 462
Joined: 2004-04-26 20:55
Contact:

Post by UltraSam »

FT Windows is written using SDK only, so making it sizable is not that quick to do...

In the upcoming v1.0.2, the window has been enlarged (height and width) making it more comfortable to use.

It will be put online on the web site as soon as we have validated the setup.

For now you can already download it here:

[topic=6376][/topic]

Thanks for your feedback :)
UltraSam
Valle3k
Posts: 2
Joined: 2006-03-30 09:07

Post by Valle3k »

Hi Sam,

thanks for the link to the 1.02 version. I'm using the new vncviewer version now. The bigger FT window is great and helps me alot. 8)

But I'm still hoping to see the resizable window in one of the next version.

Greetings,
Valle3k
roytam1
20
20
Posts: 47
Joined: 2006-05-16 08:49
Contact:

Post by roytam1 »

UltraSam wrote:FT Windows is written using SDK only, so making it sizable is not that quick to do...

In the upcoming v1.0.2, the window has been enlarged (height and width) making it more comfortable to use.

It will be put online on the web site as soon as we have validated the setup.

For now you can already download it here:

[topic=6376][/topic]

Thanks for your feedback :)
I did it.
And my ICL build include this patch. Please check it out.

a Dirty Patch:

Code: Select all

Index: FileTransfer.cpp
===================================================================
RCS file: /cvsroot/ultravnc/ultravnc/vncviewer/FileTransfer.cpp,v
retrieving revision 1.56
diff -u -8 -p -r1.56 FileTransfer.cpp
--- FileTransfer.cpp	18 Apr 2006 19:08:49 -0000	1.56
+++ FileTransfer.cpp	1 Jun 2006 14:47:07 -0000
@@ -2813,16 +2820,53 @@ bool FileTransfer::IsDirectoryGetIt(char
 
 int FileTransfer::DoDialog()
 {
  	return DialogBoxParam(pApp->m_instance, DIALOG_MAKEINTRESOURCE(IDD_FILETRANSFER_DLG), 
 		NULL, (DLGPROC) FileTransferDlgProc, (LONG) this);
 }
 
 
+void FTAdjustLeft(LPRECT lprc)
+{
+	int cx = lprc->right - lprc->left - GetSystemMetrics(SM_CXSIZEFRAME) * 2;
+
+	if(cx < 611){
+		lprc->left = lprc->right - 611 - GetSystemMetrics(SM_CXSIZEFRAME) * 2;
+	}
+}
+
+void FTAdjustTop(LPRECT lprc)
+{
+	int cy = lprc->bottom - lprc->top - GetSystemMetrics(SM_CYSIZEFRAME) * 2;
+
+	if(cy < 429){
+		lprc->top = lprc->bottom - 429 - GetSystemMetrics(SM_CYSIZEFRAME) * 2;
+	}
+}
+
+void FTAdjustRight(LPRECT lprc)
+{
+	int cx = lprc->right - lprc->left - GetSystemMetrics(SM_CXSIZEFRAME) * 2;
+
+	if(cx < 611){
+		lprc->right = lprc->left + 611 + GetSystemMetrics(SM_CXSIZEFRAME) * 2;
+	}
+}
+
+void FTAdjustBottom(LPRECT lprc)
+{
+	int cy = lprc->bottom - lprc->top - GetSystemMetrics(SM_CYSIZEFRAME) * 2;
+
+	if(cy < 429){
+		lprc->bottom = lprc->top + 429 + GetSystemMetrics(SM_CYSIZEFRAME) * 2;
+	}
+}
+
 //
 //
 //
 BOOL CALLBACK FileTransfer::FileTransferDlgProc(  HWND hWnd,  UINT uMsg,  WPARAM wParam, LPARAM lParam ) {
 	// This is a static method, so we don't know which instantiation we're 
 	// dealing with. But we can get a pseudo-this from the parameter to 
 	// WM_INITDIALOG, which we therafter store with the window and retrieve
 	// as follows:
@@ -3576,18 +3620,110 @@ BOOL CALLBACK FileTransfer::FileTransfer
 
 
 	case WM_SYSCOMMAND:
 		switch (LOWORD(wParam))
 		{
 		case SC_RESTORE:
 			_this->ShowFileTransferWindow(true);
 			return TRUE;
+		case SC_MINIMIZE:
+			SendMessage(hWnd,WM_COMMAND,MAKEWPARAM(IDC_HIDE_B,0),0);
+			return FALSE;
 		}
 		break;
+	case WM_SIZING:
+		LPRECT lprc;
+		lprc = (LPRECT)lParam;
+		switch(wParam){
+		case WMSZ_TOPLEFT:
+			FTAdjustTop(lprc);
+			FTAdjustLeft(lprc);
+		case WMSZ_TOP:
+			FTAdjustTop(lprc);
+		case WMSZ_TOPRIGHT:
+			FTAdjustTop(lprc);
+			FTAdjustRight(lprc);
+		case WMSZ_LEFT:
+			FTAdjustLeft(lprc);
+		case WMSZ_RIGHT:
+			FTAdjustRight(lprc);
+		case WMSZ_BOTTOMLEFT:
+			FTAdjustBottom(lprc);
+			FTAdjustLeft(lprc);
+		case WMSZ_BOTTOM:
+			FTAdjustBottom(lprc);
+		case WMSZ_BOTTOMRIGHT:
+			FTAdjustBottom(lprc);
+			FTAdjustRight(lprc);
+		}
+		return TRUE;
+	case WM_SIZE:
+		int cx;
+		int cy;
+		int icx;
+		int icy;
+		int lf_an;
+		RECT rc;
+
+		if(wParam == SIZE_MINIMIZED){
+			break;
+		}
+
+		cx = LOWORD(lParam);	//Client Width
+		cy = HIWORD(lParam);	//Client Height
+		icy = cy-85-50;
+		icx = cx/2 - (21+4) * 2 - 94 - 95 - 7 * 4;
+		lf_an=(cx - 112)/2;
+		//Left
+		GetWindowRect(GetDlgItem(hWnd, IDC_LOCAL_DRIVECB), &rc);
+		MoveWindow(GetDlgItem(hWnd, IDC_LOCAL_DRIVECB),              4,       4,   icx,  rc.bottom - rc.top, TRUE); 
+		MoveWindow(GetDlgItem(hWnd, IDC_LM_STATIC),            4+icx+7,       4,   141,                  19, TRUE); 
+		MoveWindow(GetDlgItem(hWnd, IDC_LOCAL_ROOTB),    4+icx+7+141+7,       4,    25,                  18, TRUE); 
+		MoveWindow(GetDlgItem(hWnd, IDC_LOCAL_UPB), 4+icx+7+141+7+25+4,       4,    25,                  18, TRUE); 
+		MoveWindow(GetDlgItem(hWnd, IDC_CURR_LOCAL),                 4,      25, lf_an,                  18, TRUE); 
+		MoveWindow(GetDlgItem(hWnd, IDC_LOCAL_FILELIST),             4,      46, lf_an,                 icy, TRUE);
+		MoveWindow(GetDlgItem(hWnd, IDC_LOCAL_STATUS),               4, cy-85+4, lf_an,                  15, TRUE);
+		
+		//Right
+		GetWindowRect(GetDlgItem(hWnd, IDC_REMOTE_DRIVECB), &rc);
+		MoveWindow(GetDlgItem(hWnd, IDC_REMOTE_DRIVECB),               lf_an+109,       4,   icx,   rc.bottom - rc.top, TRUE); 
+		MoveWindow(GetDlgItem(hWnd, IDC_RM_STATIC),              lf_an+109+icx+7,       4,   141,                   19, TRUE); 
+		MoveWindow(GetDlgItem(hWnd, IDC_REMOTE_ROOTB),     lf_an+109+icx+7+141+7,       4,    25,                   18, TRUE); 
+		MoveWindow(GetDlgItem(hWnd, IDC_REMOTE_UPB),  lf_an+109+icx+7+141+7+25+4,       4,    25,                   18, TRUE); 
+		MoveWindow(GetDlgItem(hWnd, IDC_CURR_REMOTE),                  lf_an+109,      25, lf_an,                   18, TRUE); 
+		MoveWindow(GetDlgItem(hWnd, IDC_REMOTE_FILELIST),              lf_an+109,      46, lf_an,                  icy, TRUE);
+		MoveWindow(GetDlgItem(hWnd, IDC_REMOTE_STATUS),                lf_an+109, cy-85+4, lf_an,                   15, TRUE);
+		
+		//Bottom
+		icx = cx-135-69;
+		MoveWindow(GetDlgItem(hWnd, IDC_HS_STATIC),                  8,          cy-85+4+18+4,     39,                15, TRUE);
+		GetWindowRect(GetDlgItem(hWnd, IDC_HISTORY_CB), &rc);
+		MoveWindow(GetDlgItem(hWnd, IDC_HISTORY_CB),                65,            cy-85+4+18,  cx-69,  rc.bottom-rc.top, TRUE);
+		MoveWindow(GetDlgItem(hWnd, IDC_PR_STATIC),                  8,   cy-85+4+15+4+4+18+3,     56,                15, TRUE);
+		MoveWindow(GetDlgItem(hWnd, IDC_PROGRESS),                  65,   cy-85+4+15+4+4+18+2,    icx,                15, TRUE);
+		MoveWindow(GetDlgItem(hWnd, IDC_PERCENT),             65+icx+6, cy-85+4+10+4+4+18+4+2,     25,                12, TRUE);
+		MoveWindow(GetDlgItem(hWnd, IDC_GLOBAL_STATUS),  65+icx+6+25+3, cy-85+4+10+4+4+18+4+2,     97,                12, TRUE);
+		GetWindowRect(GetDlgItem(hWnd, IDC_STATUS), &rc);
+		MoveWindow(GetDlgItem(hWnd, IDC_STATUS),                     0, cy-(rc.bottom-rc.top),     cx,  rc.bottom-rc.top, TRUE);
+
+		//Center
+		icy = 46+icy/2;
+		MoveWindow(GetDlgItem(hWnd, IDC_UPLOAD_B),     lf_an+10+2,  icy-15-20-6-20-5-20, 90, 20, TRUE); 
+		MoveWindow(GetDlgItem(hWnd, IDC_DOWNLOAD_B),   lf_an+10+2,       icy-15-20-6-20, 90, 20, TRUE); 
+		MoveWindow(GetDlgItem(hWnd, IDC_ABORT_B),      lf_an+10+2,            icy-15-20, 90, 20, TRUE); 
+		MoveWindow(GetDlgItem(hWnd, IDC_DELETE_B),     lf_an+10+2,               icy+15, 90, 20, TRUE); 
+		MoveWindow(GetDlgItem(hWnd, IDC_NEWFOLDER_B),  lf_an+10+2,          icy+15+20+6, 90, 20, TRUE); 
+		MoveWindow(GetDlgItem(hWnd, IDC_RENAME_B),     lf_an+10+2,     icy+15+20+6+20+6, 90, 20, TRUE); 
+		MoveWindow(GetDlgItem(hWnd, IDC_HIDE_B),       lf_an+10+2,        cy-103-20-4-6, 90, 20, TRUE); 
+		MoveWindow(GetDlgItem(hWnd, IDCANCEL),         lf_an+10+2,             cy-103-4, 90, 20, TRUE); 
+
+		InvalidateRect(hWnd, NULL, FALSE);
+		return TRUE;
 
 	// Messages from ListViews
 	case WM_NOTIFY:
 		{
 			// int nId = (int) wParam;
 			LPNMHDR lpNmh = (LPNMHDR) lParam;
 
 			switch(lpNmh->code)
Index: res/vncviewer.rc
===================================================================
RCS file: /cvsroot/ultravnc/ultravnc/vncviewer/res/vncviewer.rc,v
retrieving revision 1.97
diff -u -8 -p -r1.97 vncviewer.rc
--- res/vncviewer.rc	25 May 2006 21:24:07 -0000	1.97
+++ res/vncviewer.rc	1 Jun 2006 13:37:12 -0000
@@ -202,28 +203,29 @@ BEGIN
     CTEXT           "%",IDC_STATIC,303,140,8,8,0,WS_EX_TRANSPARENT
     EDITTEXT        IDC_SCALE_DEN,294,102,14,12,ES_AUTOHSCROLL | ES_NUMBER | 
                     NOT WS_VISIBLE
     LTEXT           "1  /",IDC_STATIC,253,153,12,8
     LTEXT           "by",IDC_STATIC,259,139,10,8
 END
 
 IDD_FILETRANSFER_DLG DIALOGEX 0, 0, 555, 414
-STYLE DS_MODALFRAME | DS_3DLOOK | DS_CENTER | WS_POPUP | WS_CAPTION
+STYLE DS_SETFONT | DS_3DLOOK | DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | 
+    WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
 CAPTION " File Transfer - Ultr@VNC"
 FONT 8, "MS Sans Serif"
 BEGIN
     DEFPUSHBUTTON   "OK",IDOK,251,23,59,14,NOT WS_VISIBLE
     PUSHBUTTON      "Close",IDCANCEL,248,339,60,14
     PUSHBUTTON      "Send >>",IDC_UPLOAD_B,248,103,60,14,BS_CENTER | BS_FLAT
     PUSHBUTTON      "<< Receive",IDC_DOWNLOAD_B,248,121,60,14,BS_CENTER | 
                     BS_FLAT
     CONTROL         "Progress1",IDC_PROGRESS,"msctls_progress32",WS_BORDER,
                     45,388,410,9
-    CTEXT           "LOCAL MACHINE",IDC_STATIC,105,3,94,13,SS_CENTERIMAGE,
+    CTEXT           "LOCAL MACHINE",IDC_LM_STATIC,105,3,94,13,SS_CENTERIMAGE,
                     WS_EX_CLIENTEDGE
     PUSHBUTTON      "Stop",IDC_ABORT_B,248,141,60,14,BS_FLAT | NOT 
                     WS_VISIBLE
     EDITTEXT        IDC_CURR_LOCAL,3,17,238,12,ES_AUTOHSCROLL | ES_READONLY
     EDITTEXT        IDC_CURR_REMOTE,314,17,238,12,ES_AUTOHSCROLL | 
                     ES_READONLY
     PUSHBUTTON      "Local Drives List",IDC_LOCAL_ROOT_B,263,1,40,9,BS_FLAT | 
                     NOT WS_VISIBLE
@@ -243,31 +245,31 @@ BEGIN
     PUSHBUTTON      "..",IDC_LOCAL_UPB,224,3,17,12
     CONTROL         "",IDC_LOCAL_STATUS,"Static",SS_LEFTNOWORDWRAP | 
                     WS_GROUP,3,359,238,10,WS_EX_STATICEDGE
     CONTROL         "",IDC_REMOTE_STATUS,"Static",SS_LEFTNOWORDWRAP | 
                     WS_GROUP,314,359,238,10,WS_EX_STATICEDGE
     PUSHBUTTON      "\",IDC_REMOTE_ROOTB,514,3,17,12
     PUSHBUTTON      "..",IDC_REMOTE_UPB,534,3,17,12
     LTEXT           "",IDC_GLOBAL_STATUS,484,388,65,8,0,WS_EX_RIGHT
-    LTEXT           "Progress :",IDC_STATIC,4,388,32,8
+    LTEXT           "Progress :",IDC_PR_STATIC,4,388,32,8
     COMBOBOX        IDC_HISTORY_CB,45,372,507,71,CBS_DROPDOWNLIST | 
                     CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
-    LTEXT           "History :",IDC_STATIC,4,374,26,8
-    CTEXT           "REMOTE MACHINE",IDC_STATIC,415,3,95,13,SS_CENTERIMAGE,
-                    WS_EX_CLIENTEDGE
+    LTEXT           "History :",IDC_HS_STATIC,4,374,26,8
+    CTEXT           "REMOTE MACHINE",IDC_RM_STATIC,415,3,95,13,
+                    SS_CENTERIMAGE,WS_EX_CLIENTEDGE
     PUSHBUTTON      "Delete",IDC_DELETE_B,248,203,60,14,BS_FLAT
     PUSHBUTTON      "New Folder",IDC_NEWFOLDER_B,248,221,60,14,BS_FLAT
     PUSHBUTTON      "Minimize",IDC_HIDE_B,248,321,60,14
     LTEXT           "",IDC_PERCENT,459,388,17,8
     PUSHBUTTON      "Rename",IDC_RENAME_B,248,239,60,14,BS_FLAT
 END
 
[EDIT] Patch revised. Finished reviewing. [/EDIT]

[EDIT] Patch revised. Progress bar size issue fixed. [/EDIT]

[EDIT] Patch revised. Bug with Resizable TextChat was fixed. [/EDIT]
Last edited by roytam1 on 2006-06-01 14:55, edited 11 times in total.
UltraSam
Admin & Developer
Admin & Developer
Posts: 462
Joined: 2004-04-26 20:55
Contact:

Post by UltraSam »

Wow.

This is plain cool :)
You save me a lot of time (I'm not very good in GUI stuff :mrgreen: )

Going to integrate it to the v1.0.2 version asap.

Thanks a lot
UltraSam
roytam1
20
20
Posts: 47
Joined: 2006-05-16 08:49
Contact:

Post by roytam1 »

UltraSam wrote:Wow.

This is plain cool :)
You save me a lot of time (I'm not very good in GUI stuff :mrgreen: )

Going to integrate it to the v1.0.2 version asap.

Thanks a lot
You should say thank you to KP447 too as the base of this patch is owned by KP774.

And now I just made a final review of this and I posted in here too. :)
roytam1
20
20
Posts: 47
Joined: 2006-05-16 08:49
Contact:

Post by roytam1 »

Final version of patch is posted.
Just a note: the min. size of FT I set is 611 x 429.
UltraSam
Admin & Developer
Admin & Developer
Posts: 462
Joined: 2004-04-26 20:55
Contact:

Post by UltraSam »

Ok. So thanks to KP774 :)

As a say in the other thread, I'm gonna check all the new goodies included in KP774 patches.
UltraSam
roytam1
20
20
Posts: 47
Joined: 2006-05-16 08:49
Contact:

Post by roytam1 »

See! It just fits in 640 x 480 screen!
Image

Environment: Windows 98 SE Traditional Chinese Edition @ Virtual PC w/ Virtual Switching Network
Terriff
20
20
Posts: 51
Joined: 2005-01-28 19:28

Post by Terriff »

You beat me to it! I was looking into this as well. :)

Great job!
UltraSam
Admin & Developer
Admin & Developer
Posts: 462
Joined: 2004-04-26 20:55
Contact:

Post by UltraSam »

I've added your resizable FT window patch into 1.0.2 (setup will be put online by the end of this WE)

I've also added:
- Close Window button is now disabled in the title bar, preventing the user from closing th window during a transfer
- Left columns dynamic risizing ("Name" columns of both lists) when the FT window is breing resized.
UltraSam
roytam1
20
20
Posts: 47
Joined: 2006-05-16 08:49
Contact:

Post by roytam1 »

UltraSam wrote:I've added your resizable FT window patch into 1.0.2 (setup will be put online by the end of this WE)

I've also added:
- Close Window button is now disabled in the title bar, preventing the user from closing th window during a transfer
- Left columns dynamic risizing ("Name" columns of both lists) when the FT window is breing resized.
You did the taskes that I was going to do! Great!! :D
UltraSam
Admin & Developer
Admin & Developer
Posts: 462
Joined: 2004-04-26 20:55
Contact:

Post by UltraSam »

:)

Also added the patch about disabling AlphaBlending, userimpersonation and lockws under win9x and NTx.x (for AlphaBlending)
UltraSam
roytam1
20
20
Posts: 47
Joined: 2006-05-16 08:49
Contact:

Post by roytam1 »

UltraSam wrote::)

Also added the patch about disabling AlphaBlending, userimpersonation and lockws under win9x and NTx.x (for AlphaBlending)
Did you commit them to cvs/svn?
UltraSam
Admin & Developer
Admin & Developer
Posts: 462
Joined: 2004-04-26 20:55
Contact:

Post by UltraSam »

Not yet. Will be done today
UltraSam
UltraSam
Admin & Developer
Admin & Developer
Posts: 462
Joined: 2004-04-26 20:55
Contact:

Post by UltraSam »

CVS Updated
UltraSam
roytam1
20
20
Posts: 47
Joined: 2006-05-16 08:49
Contact:

Post by roytam1 »

UltraSam wrote:CVS Updated
OK I got the updates and I'm building them now.
Post Reply