블로그 이미지
안녕1999

카테고리

전체 (3067)
자바스크립트 (20)
안드로이드 (14)
WebGL (4)
변비 (17)
정치,경제 (35)
C언어,ARM (162)
컴퓨터(PC, Note Book, 윈.. (41)
전자회로, PCB (27)
유머,안웃긴,GIF,동영상 (118)
국부론60 (71)
모듈(PCB) (3)
건강 (2)
FreeCAD (25)
PADS (43)
퇴직,퇴사,구직,취업 활동 (3)
C# (86)
엑셀 (8)
워드 (0)
LabView (6)
레고 (30)
FPGA (0)
Total
Today
Yesterday

달력

« » 2024.12
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31

공지사항

최근에 올라온 글

REM KEILL MDK ARM - axf파일을 bin파일로 변환 배치파일
REM *.axf ==>> *.bin
set a=test
C:\Keil_V5\ARM\ARMCC\bin\fromelf.exe --bin --output=%a%.bin %a%.axf

'C언어,ARM' 카테고리의 다른 글

keil ARM - AXF파일을 BIN으로 변환  (0) 2021.03.21
VC++ 6.0 *.pdb 못찾을때( can't find pdb)  (0) 2020.12.06
DLL to Lib.bat.zip  (0) 2020.10.11
ViewHexToStr.exe  (0) 2020.09.27
C2Html  (0) 2020.09.27
Posted by 안녕1999
, |


@@

KEILL MDK ARM - axf파일을 bin파일로 변환 배치파일


set a=test

C:\Keil_V5\ARM\ARMCC\bin\fromelf.exe --bin --output=%a%.bin %a%.axf

'C언어,ARM' 카테고리의 다른 글

KEILL MDK ARM - axf파일을 bin파일로 변환 배치파일  (0) 2021.04.07
VC++ 6.0 *.pdb 못찾을때( can't find pdb)  (0) 2020.12.06
DLL to Lib.bat.zip  (0) 2020.10.11
ViewHexToStr.exe  (0) 2020.09.27
C2Html  (0) 2020.09.27
Posted by 안녕1999
, |

pdb.zip
3.33MB

Microsoft Visual Studio\VC98\Lib
MSVCIRTD.PDB
MSVCPRTD.PDB
MSVCRTD.PDB
...

Microsoft Visual Studio\VC98\MFC\Lib
mfcs42d.pdb
MFCS42.PDB
MFCS42U.PDB
MFCS42UD.PDB
...

 

'C언어,ARM' 카테고리의 다른 글

KEILL MDK ARM - axf파일을 bin파일로 변환 배치파일  (0) 2021.04.07
keil ARM - AXF파일을 BIN으로 변환  (0) 2021.03.21
DLL to Lib.bat.zip  (0) 2020.10.11
ViewHexToStr.exe  (0) 2020.09.27
C2Html  (0) 2020.09.27
Posted by 안녕1999
, |

DLL to Lib.bat.zip

C언어,ARM / 2020. 10. 11. 23:41

'C언어,ARM' 카테고리의 다른 글

keil ARM - AXF파일을 BIN으로 변환  (0) 2021.03.21
VC++ 6.0 *.pdb 못찾을때( can't find pdb)  (0) 2020.12.06
ViewHexToStr.exe  (0) 2020.09.27
C2Html  (0) 2020.09.27
WINDOWS.H already included  (0) 2020.09.26
Posted by 안녕1999
, |

ViewHexToStr.exe

C언어,ARM / 2020. 9. 27. 16:31

'C언어,ARM' 카테고리의 다른 글

VC++ 6.0 *.pdb 못찾을때( can't find pdb)  (0) 2020.12.06
DLL to Lib.bat.zip  (0) 2020.10.11
C2Html  (0) 2020.09.27
WINDOWS.H already included  (0) 2020.09.26
DLL  (0) 2020.09.26
Posted by 안녕1999
, |

C2Html

C언어,ARM / 2020. 9. 27. 16:30

'C언어,ARM' 카테고리의 다른 글

DLL to Lib.bat.zip  (0) 2020.10.11
ViewHexToStr.exe  (0) 2020.09.27
WINDOWS.H already included  (0) 2020.09.26
DLL  (0) 2020.09.26
AVR Studio err  (0) 2020.09.26
Posted by 안녕1999
, |
#error WINDOWS.H already included.  MFC apps must not #include 

//windows.h을 모두 찾아서, 아래와 같이 수정
#include //#include "windows.h"

'C언어,ARM' 카테고리의 다른 글

ViewHexToStr.exe  (0) 2020.09.27
C2Html  (0) 2020.09.27
DLL  (0) 2020.09.26
AVR Studio err  (0) 2020.09.26
CTabCtrl_CalSize  (0) 2020.09.26
Posted by 안녕1999
, |

DLL

C언어,ARM / 2020. 9. 26. 23:46
DLL의 함수가 ?로 시작함 => DLL 헤더파일에 아래 코드 추가
#ifdef __cplusplus
extern "C" {
#endif

//DLL에서 사용할 변수, 함수들
...

#ifdef __cplusplus
}
#endif





mfcs42d.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already defined in
Link - ProjectOption에 /FORCE:MULTIPLE 추가후 error가 아닌 warning으로 빌드됨.

'C언어,ARM' 카테고리의 다른 글

C2Html  (0) 2020.09.27
WINDOWS.H already included  (0) 2020.09.26
AVR Studio err  (0) 2020.09.26
CTabCtrl_CalSize  (0) 2020.09.26
다이얼로그 창의 자식창 영역좌표 얻기  (0) 2020.09.26
Posted by 안녕1999
, |

AVR Studio err

C언어,ARM / 2020. 9. 26. 23:46

AVR Studio
Backend agent is not running
=>관리자권한으로 실행

Warning function declaration isn't a prototype
=> void xxx() => void xxx(void)


Warning no previous prototype for 'xx'
=>
void xxx(void);  <<== ADD
void xxx(void)
{
...
}

each undeclared identifier is reported only once for each function it appears in
=> define된것이 없다. #include "xx.h"

'C언어,ARM' 카테고리의 다른 글

WINDOWS.H already included  (0) 2020.09.26
DLL  (0) 2020.09.26
CTabCtrl_CalSize  (0) 2020.09.26
다이얼로그 창의 자식창 영역좌표 얻기  (0) 2020.09.26
excel RoundDown  (0) 2020.09.26
Posted by 안녕1999
, |

CTabCtrl_CalSize

C언어,ARM / 2020. 9. 26. 23:35
//CTabCtrl_util.cpp
#include "stdafx.h"
#include "CTabCtrl_util.h"

int CTabCtrl_ShowTabPage(CTabCtrl *pCTabCtrl,int i)
{
    int ipre=-1;

    if(pCTabCtrl)
    {
        TCITEM item;
        CWnd *pCWnd;

        item.mask=TCIF_PARAM;
        ipre=pCTabCtrl->GetCurSel();
        if(ipre==i)
        {
            //skip
        }
        else
        {
            if(pCTabCtrl->GetItem(ipre,&item))
            {
                pCWnd=(CWnd*)item.lParam;
                if(pCWnd)
                {
                    pCWnd->ShowWindow(SW_HIDE);
                }
            }
            pCTabCtrl->SetCurSel(i);
            if(pCTabCtrl->GetItem(i,&item))
            {
                pCWnd=(CWnd*)item.lParam;
                if(pCWnd)
                {
                    pCWnd->ShowWindow(SW_SHOW);
                }
            }
        }
    }
    return ipre;
}
CWnd *CTabCtrl_ShowCurSelTabPage(CTabCtrl *pCTabCtrl,int bCmdShow)
{
    CWnd *pCWnd;
    TCITEM ti;
    int CurSel;

    ti.mask=TCIF_PARAM;
    CurSel=pCTabCtrl->GetCurSel();
    pCTabCtrl->GetItem(CurSel,&ti);
    
    pCWnd=(CWnd*)ti.lParam;
    if(pCWnd)
    {
        pCWnd->ShowWindow(SW_SHOW);
    }
    return pCWnd;
}
void *CTabCtrl_GetCurPage(CTabCtrl *pCTabCtrl)
{
    if(pCTabCtrl)
    if(pCTabCtrl->m_hWnd)//20140708
    {
        int i;
        TCITEM item;

        i=pCTabCtrl->GetCurSel();
        item.mask=TCIF_PARAM;
        if(pCTabCtrl->GetItem(i,&item))
        {
            return (void*)(item.lParam);
        }
    }
    return 0;
}
int CTabCtrl_GetTabPageIndex(CTabCtrl *pCTabCtrl,char *title)
{
    if(title)
    if(pCTabCtrl)
    {
        int i;
        int cnt;
        TCITEM item;
        char buf[128];

        //memset(&item,0,sizeof(item));
        item.mask=TCIF_TEXT;
        item.pszText=buf;
        item.cchTextMax=sizeof(buf);
        cnt=pCTabCtrl->GetItemCount();
        for(i=0; i < cnt; i++)
        {
            if(pCTabCtrl->GetItem(i,&item))
            {
                if(item.pszText)
                if(item.pszText[0]==title[0])
                if(strcmp(item.pszText,title)==0)
                {
                    return i;
                }
            }
        }
    }
    return -1;
}
void *CTabCtrl_GetTabPage(CTabCtrl *pCTabCtrl,char *title)
{
    void *pPage=NULL;
    int i;
    
    if(pCTabCtrl)
    {
        i=CTabCtrl_GetTabPageIndex(pCTabCtrl,title);
        if(i!=-1)
        {
            pPage=CTabCtrl_GetTabPage(pCTabCtrl,i);
        }
    }
    return pPage;
}
void *CTabCtrl_GetTabPage(CTabCtrl *pCTabCtrl,int i)
{
    void *pPage=NULL;
    
    if(i!=-1)
    if(pCTabCtrl)
    {
        TCITEM item;
        
        item.mask=TCIF_PARAM;
        if(pCTabCtrl->GetItem(i,&item))
        {
            pPage=(void*)item.lParam;
        }
    }
    return pPage;
}
int CTabCtrl_ShowTabPage(CTabCtrl *pCTabCtrl,char *title)
{
    int i;

    i=CTabCtrl_GetTabPageIndex(pCTabCtrl,title);
    if(i!=-1)
    {
        CTabCtrl_ShowTabPage(pCTabCtrl,i);
    }
    return i;
}
void CTabCtrl_CalSize(CTabCtrl *pCTabCtrl)
{
    if(pCTabCtrl)
    {
        RECT r;

        if(pCTabCtrl->m_hWnd)
        {
                        //set tabctrl size
            CWnd *pCWnd;
            
            pCWnd=(CWnd*)(pCTabCtrl->GetParent());
            void SetWindowSizeNoMoveFit(HWND hwnd_parent,HWND hwnd_control,int right,int bottom);
            SetWindowSizeNoMoveFit(pCWnd->m_hWnd,pCTabCtrl->m_hWnd,0,0);
                        ::GetClientRect(pCTabCtrl->m_hWnd,&r);
            pCTabCtrl->AdjustRect(0,&r);
                        TCITEM item;
            //CWnd *pCWnd;
            int i;

            item.mask=TCIF_PARAM;
            i=0;
            while(pCTabCtrl->GetItem(i,&item))
            {
                pCWnd=(CWnd*)item.lParam;
                if(pCWnd)
                {
                    pCWnd->MoveWindow(&r);
                }
                i++;
            }
        }
    }
}
//tab컨트롤 안의 윈도우를 tab컨트롤 크기에 맞게 조정한다.
void CTabCtrl_SizeFitClient(CTabCtrl *pCTabCtrl)
{
    if(pCTabCtrl)
    {
        RECT r;

        if(pCTabCtrl->m_hWnd)
        {
            TCITEM item;
            CWnd *pCWnd;
            int i;

            ::GetClientRect(pCTabCtrl->m_hWnd,&r);
            pCTabCtrl->AdjustRect(0,&r);    //tab 사이즈 빼고 실질적인 클라이언트 영역
            item.mask=TCIF_PARAM;
            i=0;
            while(pCTabCtrl->GetItem(i,&item))
            {
                pCWnd=(CWnd*)item.lParam;
                if(pCWnd)
                {
                    pCWnd->MoveWindow(&r);
                }
                i++;
            }
        }
    }
}
void CTabCtrl_CalSize(CTabCtrl *pCTabCtrl,int i)
{
    if(pCTabCtrl)
    {
        RECT r;

        if(pCTabCtrl->m_hWnd)
        {
            TCITEM item;
            CWnd *pCWnd;
            
            pCTabCtrl->GetClientRect(&r);
            pCTabCtrl->AdjustRect(0,&r);
            item.mask=TCIF_PARAM;
            if(pCTabCtrl->GetItem(i,&item))
            {
                pCWnd=(CWnd*)item.lParam;
                if(pCWnd)
                {
                    pCWnd->MoveWindow(&r);
                }
            }
        }
    }
}
void CTabCtrl_AddPage(CTabCtrl *pCTabCtrl,CWnd *pCWnd,char *text)
{
    if(pCTabCtrl)
    {
        TCITEM item;
        int cnt;
        
        item.mask=TCIF_TEXT|TCIF_PARAM;
        cnt=pCTabCtrl->GetItemCount();
        item.pszText=text;
        item.lParam=(LPARAM)pCWnd;
        pCTabCtrl->InsertItem(cnt,&item);
        CTabCtrl_CalSize(pCTabCtrl,cnt);
        CTabCtrl_ShowTabPage(pCTabCtrl,cnt);
    }
}
void CTabCtrl_DeletePage(CTabCtrl *pCTabCtrl,
                         int i,
                         void (*delete_func)(void *pDlg),
                         int default_view_page)
{
    if(pCTabCtrl)
    {
        //i=pCTabCtrl->GetCurSel();
        //if(i > 0)
        {
            TCITEM item;CWnd *pCWnd;
            
            item.mask=TCIF_PARAM;
            if(pCTabCtrl->GetItem(i,&item))
            {
                pCWnd=(CWnd*)item.lParam;
                if(pCWnd)
                {
                    pCWnd->ShowWindow(SW_HIDE);
                    pCWnd->CloseWindow();
                    pCWnd->DestroyWindow();
                    if(delete_func)delete_func(pCWnd);
                }
            }
            pCTabCtrl->DeleteItem(i);
            
            if(default_view_page==-1)default_view_page=i-1;
            if(default_view_page==-1)default_view_page=0;
            CTabCtrl_ShowTabPage(pCTabCtrl,default_view_page);
            CTabCtrl_CalSize(pCTabCtrl);
        }
    }
}
void CTabCtrl_DeletePage(CTabCtrl *pCTabCtrl,void *pPage,void (*delete_func)(void *pDlg))
{
    if(pCTabCtrl)
    {
        TCITEM item;
        int i,cnt;

        item.mask=TCIF_PARAM;
        cnt=pCTabCtrl->GetItemCount();
        for(i=0; i < cnt; i++)
        {
            if(pCTabCtrl->GetItem(i,&item))
            if(((void*)item.lParam)==pPage)
            {
                CTabCtrl_DeletePage(pCTabCtrl,i,delete_func);
                break;
            }
        }
    }
}
void CTabCtrl_DeletePageAll(CTabCtrl *pCTabCtrl,void (*delete_func)(void *pDlg))
{
    if(pCTabCtrl)
    {
        TCITEM item;
        int i,cnt;

        item.mask=TCIF_PARAM;
        cnt=pCTabCtrl->GetItemCount();
        for(i=0; i < cnt; i++)
        {
            CTabCtrl_DeletePage(pCTabCtrl,0,delete_func);//20140818 페이지 삭제가 제대로 안되는 문제 수정(메모리누수)
        }
    }
}
void CTabCtrl_DeletePage(CTabCtrl *pCTabCtrl,void *pDlg)
{
    if(pCTabCtrl)
    {
        TCITEM item;
        int i,cnt;

        item.mask=TCIF_PARAM;
        cnt=pCTabCtrl->GetItemCount();
        for(i=0; i < cnt; i++)
        {
            if(pCTabCtrl->GetItem(i,&item))
            if(((void*)item.lParam)==pDlg)
            {
                pCTabCtrl->DeleteItem(i);
                break;
            }
        }
        CTabCtrl_CalSize(pCTabCtrl);
        cnt=pCTabCtrl->GetItemCount();
        if(cnt)
        {
            cnt--;
            CTabCtrl_ShowTabPage(pCTabCtrl,cnt);
        }
    }
}

void CTabCtrl_AddTabDlg(CTabCtrl *pTabCtrl,void *pDlg,char *tabname)
{
    if(pTabCtrl)
    {
        TCITEM item;
        int cnt;

        item.mask=TCIF_TEXT|TCIF_PARAM;
        item.pszText=tabname;
        item.lParam=(LPARAM)pDlg;
        cnt=pTabCtrl->GetItemCount();
        pTabCtrl->InsertItem(cnt,&item);

        //g_Data.m_pTabCtrl->SetCurSel(cnt);
        CTabCtrl_CalSize(pTabCtrl);
        CTabCtrl_ShowTabPage(pTabCtrl,cnt);
    }
}
//실패 : -1
int CTabCtrl_FindTabPage(CTabCtrl *pTabCtrl,void *pDlg)
{
    if(pTabCtrl)
    {
        TCITEM item;
        int cnt;
        int i;

        item.mask=TCIF_PARAM;
        //item.pszText=tabname;
        cnt=pTabCtrl->GetItemCount();
        for(i=0; i < cnt; i++)
        {
            if(pTabCtrl->GetItem(i,&item))
            {
                if((void*)(item.lParam)==pDlg)
                {
                    return i;
                }
            }
        }
    }
    return -1;
}
void CTabCtrl_ChangeTabName(CTabCtrl *pTabCtrl,void *pDlg,char *tabname)
{
    int i;

    i=CTabCtrl_FindTabPage(pTabCtrl,pDlg);
    if(i!=-1)
    {
        TCITEM item;
        
        item.mask=TCIF_TEXT;
        item.pszText=tabname;
        pTabCtrl->SetItem(i,&item);
        CTabCtrl_CalSize(pTabCtrl,i);
        CTabCtrl_ShowTabPage(pTabCtrl,i);
    }
}
char *CTabCtrl_GetTabName(CTabCtrl *pTabCtrl,void *pDlg,char *buf,int len)
{
    int i;

    i=CTabCtrl_FindTabPage(pTabCtrl,pDlg);
    if(i!=-1)
    {
        TCITEM item;
        
        item.mask=TCIF_TEXT;
        item.pszText=buf;
        item.cchTextMax=len;
        pTabCtrl->GetItem(i,&item);
        return item.pszText;
    }
    return NULL;
}

'C언어,ARM' 카테고리의 다른 글

DLL  (0) 2020.09.26
AVR Studio err  (0) 2020.09.26
다이얼로그 창의 자식창 영역좌표 얻기  (0) 2020.09.26
excel RoundDown  (0) 2020.09.26
ANSI 유니코드 문자열 코드 변환 쉽게  (0) 2020.09.19
Posted by 안녕1999
, |

최근에 달린 댓글

글 보관함