diff options
author | René Schümann <white06tiger@gmail.com> | 2014-06-07 02:09:06 +0000 |
---|---|---|
committer | René Schümann <white06tiger@gmail.com> | 2014-06-07 02:09:06 +0000 |
commit | e0c488c6dc749b80d29a0de678a40fea3510695b (patch) | |
tree | 342e49a7cb875590b59bec99b18b27140c579c76 /plugins/SendScreenshotPlus | |
parent | a03937bb912c76af61f04da1c5d5a5e7d5e4d7aa (diff) |
SendSS:
! fixed non-centered text in capture desktop size edit box (resource.rc)
! fixed x86_64 related type error (CSendImageShack)
- removed duplicate code, and "removed" ability to use custom icons for capture tabs (we're using the same icon anyway, no need to load it thrice)
+ added local file feature to upload existing local files (resource, UMainForm, mir_string)
reduced function DlgProc_CaptureWindow and DlgProc_CaptureDesktop to just DlgProc_CaptureTabPage as we use less code with only one function handling all 3 tab pages ("lot" of shared code)
git-svn-id: http://svn.miranda-ng.org/main/trunk@9416 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SendScreenshotPlus')
-rw-r--r-- | plugins/SendScreenshotPlus/res/resource.rc | 18 | ||||
-rw-r--r-- | plugins/SendScreenshotPlus/src/CSendImageShack.cpp | 2 | ||||
-rw-r--r-- | plugins/SendScreenshotPlus/src/UMainForm.cpp | 164 | ||||
-rw-r--r-- | plugins/SendScreenshotPlus/src/UMainForm.h | 5 | ||||
-rw-r--r-- | plugins/SendScreenshotPlus/src/mir_string.h | 99 | ||||
-rw-r--r-- | plugins/SendScreenshotPlus/src/resource.h | 7 |
6 files changed, 165 insertions, 130 deletions
diff --git a/plugins/SendScreenshotPlus/res/resource.rc b/plugins/SendScreenshotPlus/res/resource.rc index 1f2d4285f0..4b5e3b91cf 100644 --- a/plugins/SendScreenshotPlus/res/resource.rc +++ b/plugins/SendScreenshotPlus/res/resource.rc @@ -102,7 +102,7 @@ BEGIN END IDD_UMain_CaptureWindow DIALOGEX 0, 0, 214, 48 -STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_VISIBLE +STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN LTEXT "Caption:",ID_edtCaptionLabel,4,1,158,8 @@ -115,16 +115,28 @@ BEGIN END IDD_UMain_CaptureDesktop DIALOGEX 0, 0, 214, 48 -STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_VISIBLE +STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN LTEXT "Caption:",ID_edtCaptionLabel,4,1,158,8 COMBOBOX ID_edtCaption,4,12,158,30,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_TABSTOP RTEXT "Size (HxW):",ID_edtSizeLabel,0,30,50,8 - EDITTEXT ID_edtSize,52,28,43,13,ES_AUTOHSCROLL | ES_READONLY + EDITTEXT ID_edtSize,52,28,43,13,ES_CENTER | ES_AUTOHSCROLL | ES_READONLY ICON IDI_MONITOR,ID_imgTarget,174,12,29,29,SS_NOTIFY | SS_CENTERIMAGE | SS_SUNKEN | WS_GROUP END +IDD_UMain_CaptureFile DIALOGEX 0, 0, 214, 48 +STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + LTEXT "File:",ID_edtCaptionLabel,4,1,158,8 + EDITTEXT ID_edtSize,4,12,147,13,ES_AUTOHSCROLL + PUSHBUTTON "...",ID_btnExplore,151,12,11,13 + RTEXT "Description:",ID_edtSizeLabel,0,30,50,8 + EDITTEXT ID_edtCaption,52,28,110,13,ES_AUTOHSCROLL + ICON IDI_MAIN,ID_imgTarget,174,12,29,29,SS_NOTIFY | SS_CENTERIMAGE | SS_SUNKEN | WS_GROUP +END + IDD_UResultForm DIALOGEX 0, 0, 332, 100 STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Result" diff --git a/plugins/SendScreenshotPlus/src/CSendImageShack.cpp b/plugins/SendScreenshotPlus/src/CSendImageShack.cpp index 9d37604197..c12eed48fe 100644 --- a/plugins/SendScreenshotPlus/src/CSendImageShack.cpp +++ b/plugins/SendScreenshotPlus/src/CSendImageShack.cpp @@ -79,7 +79,7 @@ void CSendImageShack::SendThread() { if(url && *url){ mir_free(m_URL), m_URL=mir_strdup(url); mir_free(m_URLthumb), m_URLthumb=mir_strdup(m_URL); - int extlen; + size_t extlen; char* pos=strrchr(m_URLthumb,'.'); if(pos && (extlen=mir_strlen(pos))>2){ char* tmp=mir_strdup(pos); diff --git a/plugins/SendScreenshotPlus/src/UMainForm.cpp b/plugins/SendScreenshotPlus/src/UMainForm.cpp index 8cf2a967ce..df0a22f699 100644 --- a/plugins/SendScreenshotPlus/src/UMainForm.cpp +++ b/plugins/SendScreenshotPlus/src/UMainForm.cpp @@ -41,36 +41,22 @@ void TfrmMain::Unload(){ } //--------------------------------------------------------------------------- -INT_PTR CALLBACK TfrmMain::DlgProc_CaptureWindow(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { +INT_PTR CALLBACK TfrmMain::DlgProc_CaptureTabPage(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { // main message handling is done inside TfrmMain::DlgTfrmMain switch (uMsg) { case WM_INITDIALOG: - Static_SetIcon(GetDlgItem(hDlg, ID_imgTarget), Skin_GetIcon(ICO_COMMON_SSTARGET)); - SetDlgItemText(hDlg, ID_edtCaption, TranslateT("Drag&Drop the target on the desired window.")); - break; - case WM_CTLCOLORDLG: - case WM_CTLCOLOREDIT: - case WM_CTLCOLORSTATIC: - SetTextColor((HDC)wParam,GetSysColor(COLOR_WINDOWTEXT)); - return (INT_PTR)GetStockObject(WHITE_BRUSH); - case WM_COMMAND: - SendMessage(GetParent(hDlg), uMsg, wParam, lParam); - break; - case WM_NOTIFY: - SendMessage(GetParent(hDlg), uMsg, wParam, lParam); - break; - case WM_DESTROY: - break; - } - return FALSE; -} - -//--------------------------------------------------------------------------- -INT_PTR CALLBACK TfrmMain::DlgProc_CaptureDesktop(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { -// main message handling is done inside TfrmMain::DlgTfrmMain - switch (uMsg) { - case WM_INITDIALOG: - Static_SetIcon(GetDlgItem(hDlg, ID_imgTarget), Skin_GetIcon(ICO_COMMON_SSMONITOR)); + switch(lParam){ + case IDD_UMain_CaptureWindow: + Static_SetIcon(GetDlgItem(hDlg, ID_imgTarget), Skin_GetIcon(ICO_COMMON_SSTARGET)); + SetDlgItemText(hDlg, ID_edtCaption, TranslateT("Drag&Drop the target on the desired window.")); + break; + case IDD_UMain_CaptureDesktop: + Static_SetIcon(GetDlgItem(hDlg, ID_imgTarget), Skin_GetIcon(ICO_COMMON_SSMONITOR)); + break; + case IDD_UMain_CaptureFile: + Static_SetIcon(GetDlgItem(hDlg, ID_imgTarget), Skin_GetIcon(ICO_COMMON_SSWINDOW1)); + break; + } break; case WM_CTLCOLORDLG: case WM_CTLCOLOREDIT: @@ -78,6 +64,23 @@ INT_PTR CALLBACK TfrmMain::DlgProc_CaptureDesktop(HWND hDlg, UINT uMsg, WPARAM w SetTextColor((HDC)wParam,GetSysColor(COLOR_WINDOWTEXT)); return (INT_PTR)GetStockObject(WHITE_BRUSH); case WM_COMMAND: + if(HIWORD(wParam)==BN_CLICKED && LOWORD(wParam)==ID_btnExplore){ /// local file tab + OPENFILENAME ofn={sizeof(OPENFILENAME)}; + TCHAR filename[MAX_PATH]; + GetDlgItemText(hDlg,ID_edtSize,filename,MAX_PATH); + ofn.lStructSize = sizeof(ofn); + ofn.hwndOwner = hDlg; + ofn.lpstrFilter = _T("Images\0*.png;*.jpg;*.jpeg;*.bmp;*.gif;*.tif;*.tiff\0"); + ofn.nFilterIndex = 1; + ofn.lpstrFile = filename; + ofn.nMaxFile = MAX_PATH; +// ofn.lpstrInitialDir = m_FDestFolder; + ofn.Flags = OFN_FILEMUSTEXIST | OFN_READONLY; + if(GetOpenFileName(&ofn)){ + SetDlgItemText(hDlg,ID_edtSize,filename); + } + break; + } SendMessage(GetParent(hDlg), uMsg, wParam, lParam); break; case WM_NOTIFY: @@ -176,21 +179,21 @@ void TfrmMain::wmInitdialog(WPARAM wParam, LPARAM lParam) { chkTimedClick(); //enable disable Timed controls //create Image list for tab control - if(m_himlTab == 0){ + if(!m_himlTab){ //m_himlTab = ImageList_Create(16, 16, PluginConfig.m_bIsXP ? ILC_COLOR32 | ILC_MASK : ILC_COLOR8 | ILC_MASK, 2, 0); m_himlTab = ImageList_Create(16, 16, ILC_COLOR32 | ILC_MASK, 2, 0); - ImageList_AddIcon(m_himlTab, Skin_GetIcon(ICO_COMMON_SSWINDOW2)); - ImageList_AddIcon(m_himlTab, Skin_GetIcon(ICO_COMMON_SSWINDOW2)); + ImageList_AddIcon(m_himlTab, Skin_GetIcon(ICO_COMMON_SSWINDOW2)); /// @note : use custom icon for each capture tab? +// ImageList_AddIcon(m_himlTab, Skin_GetIcon(ICO_COMMON_SSWINDOW2)); +// ImageList_AddIcon(m_himlTab, Skin_GetIcon(ICO_COMMON_SSWINDOW2)); } //create the tab control. { - TAB_INFO itab; + TAB_INFO itab={}; RECT rcClient, rcTab; m_hwndTab = GetDlgItem(m_hWnd, IDC_CAPTURETAB); TabCtrl_SetItemExtra(m_hwndTab, sizeof(TAB_INFO) - sizeof(TCITEMHEADER)); - ZeroMemory(&itab, sizeof(itab)); itab.hwndMain = m_hWnd; itab.hwndTab = m_hwndTab; @@ -203,19 +206,17 @@ void TfrmMain::wmInitdialog(WPARAM wParam, LPARAM lParam) { itab.tcih.mask = TCIF_PARAM|TCIF_TEXT|TCIF_IMAGE; itab.tcih.pszText = TranslateT("Window"); - itab.tcih.iImage = 0; - itab.hwndTabPage = CreateDialog(hInst,MAKEINTRESOURCE(IDD_UMain_CaptureWindow), m_hWnd,DlgProc_CaptureWindow); +// itab.tcih.iImage = 0; + itab.hwndTabPage = CreateDialogParam(hInst,MAKEINTRESOURCE(IDD_UMain_CaptureWindow), m_hWnd,DlgProc_CaptureTabPage,IDD_UMain_CaptureWindow); TabCtrl_InsertItem(m_hwndTab, 0, &itab); MoveWindow(itab.hwndTabPage, (rcTab.left - rcClient.left)+2, (rcTab.top - rcClient.top), (rcTab.right - rcTab.left) - 2*5, (rcTab.bottom - rcTab.top) - 2*20, TRUE); - ShowWindow(itab.hwndTabPage, SW_HIDE); CheckDlgButton(itab.hwndTabPage, ID_chkClientArea, m_opt_chkClientArea ? BST_CHECKED : BST_UNCHECKED); itab.tcih.pszText = TranslateT("Desktop"); - itab.tcih.iImage = 1; - itab.hwndTabPage = CreateDialog(hInst,MAKEINTRESOURCE(IDD_UMain_CaptureDesktop), m_hWnd, DlgProc_CaptureDesktop); +// itab.tcih.iImage = 1; + itab.hwndTabPage = CreateDialogParam(hInst,MAKEINTRESOURCE(IDD_UMain_CaptureDesktop), m_hWnd, DlgProc_CaptureTabPage,IDD_UMain_CaptureDesktop); TabCtrl_InsertItem(m_hwndTab, 1, &itab); MoveWindow(itab.hwndTabPage, (rcTab.left - rcClient.left)+2, (rcTab.top - rcClient.top), (rcTab.right - rcTab.left) - 2*5, (rcTab.bottom - rcTab.top) - 2*20, TRUE); - ShowWindow(itab.hwndTabPage, SW_HIDE); hCtrl = GetDlgItem(itab.hwndTabPage, ID_edtCaption); ComboBox_ResetContent(hCtrl); @@ -235,6 +236,12 @@ void TfrmMain::wmInitdialog(WPARAM wParam, LPARAM lParam) { } PostMessage(m_hWnd, WM_COMMAND, MAKEWPARAM(ID_edtCaption, CBN_SELCHANGE),(LPARAM)hCtrl); + itab.tcih.pszText = TranslateT("File"); +// itab.tcih.iImage = 2; + itab.hwndTabPage = CreateDialogParam(hInst,MAKEINTRESOURCE(IDD_UMain_CaptureFile), m_hWnd, DlgProc_CaptureTabPage,IDD_UMain_CaptureFile); + TabCtrl_InsertItem(m_hwndTab, 2, &itab); + MoveWindow(itab.hwndTabPage, (rcTab.left - rcClient.left)+2, (rcTab.top - rcClient.top), (rcTab.right - rcTab.left) - 2*5, (rcTab.bottom - rcTab.top) - 2*20, TRUE); + //select tab and set m_hwndTabPage TabCtrl_SetCurSel(m_hwndTab, m_opt_tabCapture); ZeroMemory(&itab, sizeof(itab)); @@ -518,23 +525,21 @@ void TfrmMain::wmTimer(WPARAM wParam, LPARAM lParam){ case 1: m_Screenshot = CaptureMonitor((m_opt_cboxDesktop > 0) ? m_Monitors[m_opt_cboxDesktop-1].szDevice : NULL); break; + case 2: /// edge case, existing local file + break; + #ifdef _DEBUG default: - KillTimer(m_hWnd,ID_chkTimed); - m_bCapture = false; - #ifdef _DEBUG - OutputDebugStringA("SS Bitmap Timer Stop (no tabCapture)\r\n" ); - #endif - return; + OutputDebugStringA("SS Bitmap Timer Stop (no tabCapture)\r\n" ); + #endif } - if (!m_Screenshot) m_bCapture = false; - } - if (m_Screenshot) { - KillTimer(m_hWnd,ID_chkTimed); m_bCapture = false; - #ifdef _DEBUG - OutputDebugStringA("SS Bitmap Timer Stop (CaptureDone)\r\n" ); - #endif - SendMessage(m_hWnd,UM_EVENT, 0, (LPARAM)EVT_CaptureDone); + if (m_Screenshot || m_opt_tabCapture==2) { /// @note : test without "if" + KillTimer(m_hWnd,ID_chkTimed); + #ifdef _DEBUG + OutputDebugStringA("SS Bitmap Timer Stop (CaptureDone)\r\n" ); + #endif + SendMessage(m_hWnd,UM_EVENT, 0, (LPARAM)EVT_CaptureDone); + } } } } @@ -598,7 +603,7 @@ void TfrmMain::UMevent(WPARAM wParam, LPARAM lParam) { //HWND hWnd = (HWND)wParam; switch (lParam) { case EVT_CaptureDone: - if (!m_Screenshot) { + if (!m_Screenshot && m_opt_tabCapture!=2) { TCHAR *err = TranslateT("Can't create a Screenshot"); MessageBox(m_hWnd,err,ERROR_TITLE,MB_OK|MB_ICONWARNING); Show(); @@ -618,9 +623,7 @@ void TfrmMain::UMevent(WPARAM wParam, LPARAM lParam) { */ return; } - else { - FormClose(); - } + FormClose(); break; case EVT_SendFileDone: break; @@ -752,25 +755,36 @@ void TfrmMain::btnCaptureClick() { m_bFormEdit = false; //until UEditForm is includet if(m_opt_tabCapture==1) m_hTargetWindow=GetDesktopWindow(); - else if(!m_hTargetWindow) { + else if(m_opt_tabCapture==2){ + TCHAR filename[MAX_PATH]; + GetDlgItemText(m_hwndTabPage, ID_edtSize, filename, MAX_PATH); + FILE* fp=_wfopen(filename,_T("rb")); + if(!fp){ + TCHAR *err = TranslateT("Select a file"); + MessageBox(m_hWnd,err,ERROR_TITLE,MB_OK|MB_ICONWARNING); + return; + } + fclose(fp); + mir_free(m_pszFile); m_pszFile=mir_tstrdup(filename); + }else if(!m_hTargetWindow) { TCHAR *err = TranslateT("Select a target window."); MessageBox(m_hWnd,err,ERROR_TITLE,MB_OK|MB_ICONWARNING); return; } TfrmMain::Hide(); - - if (m_opt_chkTimed) { - SetTimer(m_hWnd, ID_chkTimed, m_opt_edtTimed ? m_opt_edtTimed*1000 : 500, NULL); + if(m_opt_chkTimed){ + SetTimer(m_hWnd, ID_chkTimed, m_opt_edtTimed ? m_opt_edtTimed*1000 : 500, NULL); /// calls EVT_CaptureDone + return; } - else if (m_opt_tabCapture == 1){ - //desktop need always time to update from TfrmMain::Hide() - SetTimer(m_hWnd, ID_chkTimed, 500, NULL); + if(m_opt_tabCapture==1){ /// desktop needs always time to update from TfrmMain::Hide() + SetTimer(m_hWnd, ID_chkTimed, 500, NULL); /// calls EVT_CaptureDone + return; } - else { + if(m_opt_tabCapture!=2){ m_Screenshot = CaptureWindow(m_hTargetWindow, m_opt_chkClientArea); - SendMessage(m_hWnd,UM_EVENT, 0, (LPARAM)EVT_CaptureDone); } + SendMessage(m_hWnd,UM_EVENT, 0, (LPARAM)EVT_CaptureDone); } //--------------------------------------------------------------------------- @@ -1046,13 +1060,13 @@ INT_PTR TfrmMain::SaveScreenshot(FIBITMAP* dib) { if(ret){ db_set_dw(NULL,SZ_SENDSS,"FileNumber",FileNumber); - mir_freeAndNil(m_pszFile); m_pszFile=ret; - mir_freeAndNil(m_pszFileDesc); + mir_free(m_pszFile); m_pszFile=ret; + mir_free(m_pszFileDesc); if(IsWindowEnabled(GetDlgItem(m_hWnd,ID_btnDesc)) && m_opt_btnDesc){ m_pszFileDesc=pszFileDesc; }else{ mir_free(pszFileDesc); - mir_tcsadd(m_pszFileDesc, _T("")); + m_pszFileDesc=mir_tstrdup(_T("")); } if(m_cSend) { @@ -1067,9 +1081,17 @@ INT_PTR TfrmMain::SaveScreenshot(FIBITMAP* dib) { //--------------------------------------------------------------------------- void TfrmMain::FormClose() { - - // Saving the screenshot - if (SaveScreenshot(m_Screenshot)) { + if(m_opt_tabCapture==2){ /// existing file + TCHAR description[1024]; + GetDlgItemText(m_hwndTabPage, ID_edtCaption, description, 1024); + if(!IsWindowEnabled(GetDlgItem(m_hWnd,ID_btnDesc)) || !m_opt_btnDesc) + *description='\0'; + if(m_cSend) { + m_cSend->m_bDeleteAfterSend = false; /// well... guess it's better to not delete existing files for now... + m_cSend->SetFile(m_pszFile); + m_cSend->SetDescription(description); + } + }else if(SaveScreenshot(m_Screenshot)){ /// Saving the screenshot Show(); // Error from SaveScreenshot return; } diff --git a/plugins/SendScreenshotPlus/src/UMainForm.h b/plugins/SendScreenshotPlus/src/UMainForm.h index ea4b61e15e..33f790a6d9 100644 --- a/plugins/SendScreenshotPlus/src/UMainForm.h +++ b/plugins/SendScreenshotPlus/src/UMainForm.h @@ -118,7 +118,7 @@ class TfrmMain{ bool m_opt_btnDeleteAfterSend; //TCheckBox *chkDeleteAfterSend; BYTE m_opt_cboxFormat; //TComboBox *cboxFormat; BYTE m_opt_edtTimed; //TLabeledEdit *edtTimed; - bool m_bCapture; //is capture activ + bool m_bCapture; //is capture active HWND m_hwndTab; //TabControl handle HWND m_hwndTabPage; //TabControl activ page handle HIMAGELIST m_himlTab; //TabControl imagelist @@ -136,8 +136,7 @@ class TfrmMain{ void UMevent(WPARAM wParam, LPARAM lParam); void UMClosing(WPARAM wParam, LPARAM lParam); - static INT_PTR CALLBACK DlgProc_CaptureWindow (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); - static INT_PTR CALLBACK DlgProc_CaptureDesktop(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); + static INT_PTR CALLBACK DlgProc_CaptureTabPage(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); // LRESULT CALLBACK DlgProc_UseLastFile (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); }; diff --git a/plugins/SendScreenshotPlus/src/mir_string.h b/plugins/SendScreenshotPlus/src/mir_string.h index a8dc50e776..d5c33fe1a3 100644 --- a/plugins/SendScreenshotPlus/src/mir_string.h +++ b/plugins/SendScreenshotPlus/src/mir_string.h @@ -1,49 +1,50 @@ -/*
-Miranda NG: the free IM client for Microsoft* Windows*
-
-Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
-Copyright (c) 2000-09 Miranda ICQ/IM project,
-
-This file is part of Send Screenshot Plus, a Miranda IM plugin.
-Copyright (c) 2010 Ing.U.Horn
-
-Parts of this file based on original sorce code
-from UserInfoEx Plugin
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#ifndef _MIR_STRING_H_INCLUDED_
-#define _MIR_STRING_H_INCLUDED_
-
-#define mir_tcslen mir_wcslen
-#define mir_tcsadd mir_wcsadd
-#define mir_tcsncpy mir_wcsncpy
-#define mir_tcsncat mir_wcsncat
-
-#define mir_strlen(s) (((s)!=0)?strlen(s):0)
-#define mir_strcpy(d,s) (((s)!=0&&(d)!=0)?strcpy(d,s):0)
-
-#define mir_wcslen(s) (((s)!=0)?wcslen(s):0)
-
-#define mir_freeAndNil(ptr) mir_free(ptr),ptr=NULL
-
-wchar_t* mir_wcsncpy(wchar_t* pszDest, const wchar_t* pszSrc, const size_t cchDest);
-wchar_t* mir_wcsncat(wchar_t* pszDest, const wchar_t* pszSrc, const size_t cchDest);
-
-void mir_stradd(char* &pszDest, const char* pszSrc);
-void mir_wcsadd(wchar_t* &pszDest, const wchar_t* pszSrc);
-
-#endif /* _MIR_STRING_H_INCLUDED_ */
\ No newline at end of file +/* +Miranda NG: the free IM client for Microsoft* Windows* + +Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org), +Copyright (c) 2000-09 Miranda ICQ/IM project, + +This file is part of Send Screenshot Plus, a Miranda IM plugin. +Copyright (c) 2010 Ing.U.Horn + +Parts of this file based on original sorce code +from UserInfoEx Plugin + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ + +#ifndef _MIR_STRING_H_INCLUDED_ +#define _MIR_STRING_H_INCLUDED_ + +#define mir_tcslen mir_wcslen +#define mir_tcsadd mir_wcsadd +#define mir_tcsncpy mir_wcsncpy +#define mir_tcsncat mir_wcsncat +#define mir_tstrdup mir_wstrdup + +#define mir_strlen(s) (((s)!=0)?strlen(s):0) +#define mir_strcpy(d,s) (((s)!=0&&(d)!=0)?strcpy(d,s):0) + +#define mir_wcslen(s) (((s)!=0)?wcslen(s):0) + +#define mir_freeAndNil(ptr) mir_free(ptr),ptr=NULL + +wchar_t* mir_wcsncpy(wchar_t* pszDest, const wchar_t* pszSrc, const size_t cchDest); +wchar_t* mir_wcsncat(wchar_t* pszDest, const wchar_t* pszSrc, const size_t cchDest); + +void mir_stradd(char* &pszDest, const char* pszSrc); +void mir_wcsadd(wchar_t* &pszDest, const wchar_t* pszSrc); + +#endif /* _MIR_STRING_H_INCLUDED_ */ diff --git a/plugins/SendScreenshotPlus/src/resource.h b/plugins/SendScreenshotPlus/src/resource.h index af67a83858..5c5dca91ae 100644 --- a/plugins/SendScreenshotPlus/src/resource.h +++ b/plugins/SendScreenshotPlus/src/resource.h @@ -20,9 +20,10 @@ #define IDD_UMainForm 101 #define IDD_UMain_CaptureWindow 102 #define IDD_UMain_CaptureDesktop 103 -#define IDD_UEditForm 104 -#define IDD_UAboutForm 105 -#define IDD_UResultForm 106 +#define IDD_UMain_CaptureFile 104 +#define IDD_UEditForm 105 +#define IDD_UAboutForm 106 +#define IDD_UResultForm 107 #define IDD_MSGBOX 110 #define IDD_MSGBOXDUMMI 111 #define IDR_LICENSE 120 |