Screenshot/Capture

07/30/2015 02:49 .HeyEyay.#1
Hello everyone, i try to use screenshot/capture but it's not saving on the Capture Folder anyone who knows for fixes about this bug? Thanks in Advance!
07/30/2015 06:37 Spraystar#2
Habe auch dieses Problem spreichert einfach nicht wenn man 0 drück ordner wird aber erstellt
07/30/2015 15:23 kevinkraus#3
Just Implent this System (JPG/BMP Capture):

WndManager.cpp:
Code:
BOOL CWndMgr::ScreenCapture()
{
    static long    bmpcnt = 0;
    char    filename[ _MAX_PATH ] = "";
    FILE    *fp;
#ifdef __CAPTURE_JPG_BMP
if( g_Option.m_capture == 0 )
{
    {
        CreateDirectory( "Capture", NULL );
        while(1)
        {
            sprintf( filename, "Capture\\flyff%05d.jpg", bmpcnt );
            if( (fp = fopen(filename,"r")) == NULL ) break; else fclose(fp);
            bmpcnt ++;
        }
    }
    sprintf( filename, "Capture\\flyff%05d.jpg", bmpcnt );
    SaveJPG( filename );
    CString string;
    string.Format( prj.GetText(TID_ADMIN_CAPTUREJPG), bmpcnt++ );
    PutString( string, NULL, prj.GetTextColor(TID_ADMIN_CAPTUREJPG) );
}
else {
    {
        CreateDirectory( "Capture", NULL );
        while(1)
        {
            sprintf( filename, "Capture\\flyff%05d.bmp", bmpcnt );
            if( (fp = fopen(filename,"r")) == NULL ) break; else fclose(fp);
            bmpcnt ++;
        }
    }
    sprintf( filename, "Capture\\flyff%05d.bmp", bmpcnt );

    SaveBitmap( filename );
    CString string;
    string.Format( prj.GetText(TID_ADMIN_SCREENSHOTSAVE), bmpcnt++ );
    PutString( string, NULL, prj.GetTextColor(TID_ADMIN_SCREENSHOTSAVE) );
}
#endif    
    return TRUE;
}
HwOption.h:
Code:
#ifdef __CAPTURE_JPG_BMP
    int    m_capture;
#endif
HwOption.cpp:
Code:
#ifdef __CAPTURE_JPG_BMP
    m_capture = 0; // jpg
#endif
Code:
#ifdef __CAPTURE_JPG_BMP
    else if(scan.Token == _T( "CaptureFormat" ))
    {
        m_capture = scan.GetNumber();
    }
#endif
Code:
#ifdef __CAPTURE_JPG_BMP
    _ftprintf(fp, _T( "CaptureFormat %d\n" ), m_capture );
#endif
WndOption.cpp:
Code:
#ifdef __CAPTURE_JPG_BMP
    pWndButton[ 0 ] = (CWndButton*)GetDlgItem( WIDC_RADIO1 );
    pWndButton[ 1 ] = (CWndButton*)GetDlgItem( WIDC_RADIO2 );
    pWndButton[ 0 ]->SetGroup( TRUE );
    pWndButton[ g_Option.m_capture ]->SetCheck( TRUE );
#endif
Code:
#ifdef __CAPTURE_JPG_BMP
    case WIDC_RADIO1:
        g_Option.m_capture = 0;
        break;
    case WIDC_RADIO2:
        g_Option.m_capture = 1;
        break;
#endif
VersionCommon.h:
Code:
#define __CAPTURE_JPG_BMP
resdata.inc
At the end of APP_OPTEX_AV12:
Code:
    WTYPE_STATIC WIDC_STATIC8 "" 0 8 278 104 294 0x2220000 0 0 0 0
    {
    // Title String
IDS_RESDATA_INC_008877
    }
    {
    // ToolTip
IDS_RESDATA_INC_008878
    }
    WTYPE_BUTTON WIDC_RADIO1 "ButtRadio.bmp" 0 104 280 148 296 0x220014 0 0 0 0
    {
    // Title String
IDS_RESDATA_INC_008879
    }
    {
    // ToolTip
IDS_RESDATA_INC_008880
    }
    WTYPE_BUTTON WIDC_RADIO2 "ButtRadio.bmp" 0 152 280 248 296 0x220014 0 0 0 0
    {
    // Title String
IDS_RESDATA_INC_008881
    }
    {
    // ToolTip
IDS_RESDATA_INC_008882
    }
At the end of resdata.txt.txt:
Code:
IDS_RESDATA_INC_008877    Capture Format
IDS_RESDATA_INC_008878    
IDS_RESDATA_INC_008879    JPG
IDS_RESDATA_INC_008880    
IDS_RESDATA_INC_008881    BMP
IDS_RESDATA_INC_008882
Credits (im not sure but should be from):
- Tex0 (Other Forum)
07/30/2015 16:11 .HeyEyay.#4
Quote:
Originally Posted by kevinkraus View Post
Just Implent this System (JPG/BMP Capture):

WndManager.cpp:
Code:
BOOL CWndMgr::ScreenCapture()
{
    static long    bmpcnt = 0;
    char    filename[ _MAX_PATH ] = "";
    FILE    *fp;
#ifdef __CAPTURE_JPG_BMP
if( g_Option.m_capture == 0 )
{
    {
        CreateDirectory( "Capture", NULL );
        while(1)
        {
            sprintf( filename, "Capture\\flyff%05d.jpg", bmpcnt );
            if( (fp = fopen(filename,"r")) == NULL ) break; else fclose(fp);
            bmpcnt ++;
        }
    }
    sprintf( filename, "Capture\\flyff%05d.jpg", bmpcnt );
    SaveJPG( filename );
    CString string;
    string.Format( prj.GetText(TID_ADMIN_CAPTUREJPG), bmpcnt++ );
    PutString( string, NULL, prj.GetTextColor(TID_ADMIN_CAPTUREJPG) );
}
else {
    {
        CreateDirectory( "Capture", NULL );
        while(1)
        {
            sprintf( filename, "Capture\\flyff%05d.bmp", bmpcnt );
            if( (fp = fopen(filename,"r")) == NULL ) break; else fclose(fp);
            bmpcnt ++;
        }
    }
    sprintf( filename, "Capture\\flyff%05d.bmp", bmpcnt );

    SaveBitmap( filename );
    CString string;
    string.Format( prj.GetText(TID_ADMIN_SCREENSHOTSAVE), bmpcnt++ );
    PutString( string, NULL, prj.GetTextColor(TID_ADMIN_SCREENSHOTSAVE) );
}
#endif    
    return TRUE;
}
HwOption.h:
Code:
#ifdef __CAPTURE_JPG_BMP
    int    m_capture;
#endif
HwOption.cpp:
Code:
#ifdef __CAPTURE_JPG_BMP
    m_capture = 0; // jpg
#endif
Code:
#ifdef __CAPTURE_JPG_BMP
    else if(scan.Token == _T( "CaptureFormat" ))
    {
        m_capture = scan.GetNumber();
    }
#endif
Code:
#ifdef __CAPTURE_JPG_BMP
    _ftprintf(fp, _T( "CaptureFormat %d\n" ), m_capture );
#endif
WndOption.cpp:
Code:
#ifdef __CAPTURE_JPG_BMP
    pWndButton[ 0 ] = (CWndButton*)GetDlgItem( WIDC_RADIO1 );
    pWndButton[ 1 ] = (CWndButton*)GetDlgItem( WIDC_RADIO2 );
    pWndButton[ 0 ]->SetGroup( TRUE );
    pWndButton[ g_Option.m_capture ]->SetCheck( TRUE );
#endif
Code:
#ifdef __CAPTURE_JPG_BMP
    case WIDC_RADIO1:
        g_Option.m_capture = 0;
        break;
    case WIDC_RADIO2:
        g_Option.m_capture = 1;
        break;
#endif
VersionCommon.h:
Code:
#define __CAPTURE_JPG_BMP
resdata.inc
At the end of APP_OPTEX_AV12:
Code:
    WTYPE_STATIC WIDC_STATIC8 "" 0 8 278 104 294 0x2220000 0 0 0 0
    {
    // Title String
IDS_RESDATA_INC_008877
    }
    {
    // ToolTip
IDS_RESDATA_INC_008878
    }
    WTYPE_BUTTON WIDC_RADIO1 "ButtRadio.bmp" 0 104 280 148 296 0x220014 0 0 0 0
    {
    // Title String
IDS_RESDATA_INC_008879
    }
    {
    // ToolTip
IDS_RESDATA_INC_008880
    }
    WTYPE_BUTTON WIDC_RADIO2 "ButtRadio.bmp" 0 152 280 248 296 0x220014 0 0 0 0
    {
    // Title String
IDS_RESDATA_INC_008881
    }
    {
    // ToolTip
IDS_RESDATA_INC_008882
    }
At the end of resdata.txt.txt:
Code:
IDS_RESDATA_INC_008877    Capture Format
IDS_RESDATA_INC_008878    
IDS_RESDATA_INC_008879    JPG
IDS_RESDATA_INC_008880    
IDS_RESDATA_INC_008881    BMP
IDS_RESDATA_INC_008882
Credits (im not sure but should be from):
- Tex0 (Other Forum)
i try it hope it's work
07/30/2015 17:03 Spraystar#5
Thanks its work :)
07/30/2015 19:36 kevinkraus#6
Kein Problem :)