Search

'it/emb'에 해당되는 글 25건

  1. 2011/04/05 iPhone 4.3.1 완탈후 mobileterminal 설치 방법. (4)
  2. 2007/07/06 PDA용 우편번호 검색 프로그램 소스
  3. 2006/08/08 mobile개발
  4. 2006/02/09 PDA 가로보기, 세로보기 전환 (Landscape, Portrait)
  5. 2005/09/13 How To Use CeRapiInvoke
  6. 2005/09/02 PDA에서 외장 메모리 삽입/삭제 시 이벤트
  7. 2005/03/02 WinCE에서 폰트 설치 및 삭제
  8. 2004/10/19 CF기반에서 c#코딩한 소스 봤습니다. 질문좀 드릴께요 (1)
  9. 2004/01/28 Dialog 창이 전체 화면에 뿌려지는것을 막고 싶습니다
  10. 2003/10/29 안녕하세요.. 번거롭게 해드려 죄송합니다..;; 질문이 또하나..;; (2)
  11. 2003/10/28 안녕하세요.. 또 질문거리가 생겨버렸네요..;; (2)
  12. 2003/10/25 질문) 저 안녕하세요 처음 글을 올립니다. (7)
  13. 2003/10/24 [질문] MR 세팅후 마지막에서 다음과 같은 에러 메세지가 나옵니다.
  14. 2003/10/20 CDMA 모듈을 이용한 DB 접속? (1)
  15. 2003/10/15 [질문] SQLCE 2.0 설치 방법에 대해서 좀 알려 주십시오. (1)
  16. 2003/10/09 sql 서버의 게시판 복제에 관한 질문입니다.(MR 셋팅)
  17. 2003/09/26 SQLCE의 MR 서버 셋팅과 SERVER AGENT셋팅에 관한 질문입니다. (1)
  18. 2003/09/25 오랫만에 질문을 올립니다.^^ ras에 대해서 좀 더 여쭙고 싶은게 있습니다. (1)
  19. 2003/09/20 포켓 pc 2000에 관한 질문이 있습니다. 답변 부탁드릴게요.^^ (4)
  20. 2003/09/18 한가지 더 여쭤볼게요.^^ (1)
  21. 2003/09/18 evb의 픽처박스에 에뮬레이터 상으로 bmp파일을 올릴려면 어떻게 해야 하나요? (1)
  22. 2003/09/17 sdf파일은 pda상에서만 생성되나요? (2)
  23. 2003/09/17 evb로 pc에 sdf파일을 생성할려고 하는데 에러가 뜹니다.-.-; (1)
  24. 2003/09/17 명규님. RAS(window ce)에 관한 질문입니다.답변 부탁드려요. (1)
  25. 2003/07/18 Compact Framework을 이용한 간단한 RDA 예제
iPhone 4.3.1 완탈 후 몇몇 시디아 어플이 정상적으로 설치가 되지 않았다.

iFile, SBSettings, mobileterminal 등이 설치를 하려면, 
다른 툴들과의 종속성 에러가 발생하는 것이다. ( DEPENDS xxxxx )

Cydia / Manage / Sources 에서 불필요해 보이는 소스를 삭제하니 정상적으로 설치가 되었다.
소스 아이콘이 ?(물음표) 로 나오는 것 위주로 삭제하니 되었다.

필요한 어플들을 설치 하기는 했는데, 
mobileterminal 을 실행하면 바로 죽어버린다.

구글링을 해보니, 소스에 [ http://www.ijailbreak.com/repository/ ]를 추가하고,
시디아를 Refresh하면, upgrade를 진행한다.

터미널을 띄우면 정삭으로 동작한다.

[ 참조 ]
http://www.ijailbreak.com/cydia/learn-how-to-install-mobileterminal-for-up-to-the-ios-4-3-1-firmware-mobileterminal-520-1/ 
http://www.ijailbreak.com/cydia/introducing-the-official-ijailbreak-repository/
http://tiny2n.tistory.com/80

PDA용 우편번호 검색 프로그램 소스

it/emb 2007/07/06 10:54 Posted by newtype
사용자 삽입 이미지

우편번호 검색 프로그램이 항상 상위랭크네요.
2003년도에 개인적으로 필요해서 만든 PDA용 프로그램이
인터넷 상에서 떠도는 모양입니다.

프로그램안에 개인 홈피 url을 넣어 두었는데,
그분들이 찾아 주시는 듯 합니다.

evc를 배울 당시 만든거라 속도도 UI도 많이 허접합니다.

버전업을 핑계로 관련 포스팅을 미루고 있었는데..
PDA가 제손을 떠난 지금은, 버전업을 약속 할 수가 없네요.

우편번호를 업데이트 하고 싶으시면
http://www.postman.pe.kr/
여기서 파일을 받아 엑셀에서 csv파일로 저장 하시면 됩니다.
받으실땐 Type 1로 받으세요.
저도 여기서 받은 자료를 가지고 만든것입니다.





zipcode_bin.rar

실행파일 직접 받기



Zipcode_src.rar

프로그램 소스






mobile개발

it/emb 2006/08/08 12:22 Posted by newtype
sk vm --> wipi java   -->   xce

  invokeWapBrowser(특정 url로 WAP Browser를 띄운다.)


gvm --> wipi c --> 신지 소프트  -> gnexclub.com
  BackToBrowser(Application 실행을 중지하고 지정된 URL로 Browser를 연결한다. )


TAG GVM, SKVM, WIPI
enumDO에 정의되어 있는 모드를 차례대로 변환 합니다.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

[CODE type=c++]
#include <windows.h>
#include "EzLotator.h"

DWORD getDisplayOrientation(DEVMODE* pDevmode);
void setDisplayOrientation(DEVMODE* pDevmode, DWORD angle);

int WINAPI WinMain(HINSTANCE hInstance,
                  HINSTANCE hPrevInstance,
                  LPTSTR    lpCmdLine,
                  int       nCmdShow)
{
       DEVMODE devmode = {0,};

       DWORD enumDO[] = { DMDO_0, DMDO_90 };

       DWORD currentDO = getDisplayOrientation(&devmode);

       int countEDO = sizeof(enumDO)/sizeof(enumDO[0])-1;

       int i=0;

       for(i=0; i<countEDO; i++)
               if ( currentDO == enumDO[i] )
                       break;

       if ( i<countEDO )
       {
               setDisplayOrientation( &devmode, enumDO[++i] );
       }
       else
       {
               setDisplayOrientation( &devmode, enumDO[0] );
       }


       return 0;
}


DWORD getDisplayOrientation(DEVMODE* pDevmode)
{
       pDevmode->dmSize = sizeof(DEVMODE);
       pDevmode->dmFields = DM_DISPLAYORIENTATION;
       ChangeDisplaySettingsEx(NULL, pDevmode, NULL, CDS_TEST, 0);

       return pDevmode->dmDisplayOrientation;
}

void setDisplayOrientation(DEVMODE* pDevmode, DWORD angle)
{
       getDisplayOrientation( pDevmode );

       pDevmode->dmDisplayOrientation = angle;
       ChangeDisplaySettingsEx(NULL, pDevmode, NULL, CDS_RESET, 0);
}

[/HTML][/CODE]

How To Use CeRapiInvoke

it/emb 2005/09/13 16:57 Posted by newtype
How To Use CeRapiInvoke()
View products that this article applies to.
Article ID : 299891
Last Review : August 30, 2004
Revision : 1.0
This article was previously published under Q299891
On This Page
SUMMARY
MORE INFORMATION
  Using CeRapiInvoke() in Block Mode
  Using CeRapiInvoke in Stream Mode
  Building Modules That Use RAPI
APPLIES TO

SUMMARY
The remote API (RAPI) CeRapiInvoke() enables you to invoke your routines in the Windows CE device from a desktop application. The routines are implemented in a DLL and the DLL must export those routines. You can use CeRapiInvoke() in two ways: in block mode or in stream mode. This article demonstrates how to use CeRapiInvoke() in both ways.
Back to the top

MORE INFORMATION
The following is a prototype for CeRapiInvoke in RAPI.dll to be used by an application running on the desktop.

HRESULT CeRapiInvoke(LPCWSTR pDllPath, LPCWSTR pFunctionName,
DWORD cbInput, BYTE *pInput, DWORD *pcbOutput,
BYTE **ppOutput, IRAPIStream **ppIRAPIStream,
DWORD dwReserved)
                               

CeRapiInvoke() will be called in block mode if IRAPIStream** is NULL. Otherwise it will be called in the stream mode.

The following is a prototype DLL routine that runs on the device: int CallMyFunction(DWORD cbInput, BYTE* pInput,
                  DWORD* pcbOutput, BYTE** ppOutput,
                  IRAPIStream* pStream)
                               
Back to the top

Using CeRapiInvoke() in Block Mode
In the block mode, calls to CeRapiInvoke() return only after the DLL routine has executed and returned. The ppOutput pointer must be allocated by the DLL through the use of LocalAlloc() and the desktop application must call LocalFree() on the same [what?]. In block mode, ppIRAPIStream must be set to NULL. The value returned by the DLL routine will be returned by CeRapiInvoke.

The following sample code demonstrates use of CeRapiInvoke() in the block mode by calling a method in the DLL that resides in the \Windows folder of the device. The DLL method returns the available physical memory in the device in kilobytes. // test console application to call in blocking mode
#include <windows.h>
#include <stdio.h>
#include <conio.h>
#include "rapi.h"


int main(int argc, char* argv[])
{
       DWORD        cbOut;
       BYTE*        pOut;
       HRESULT        hr;

//Initialize Windows CE RAPI
   hr = CeRapiInit();
//Invoke CallMyFunction routine in MyRapi DLL in the \Windows directory.
   hr = CeRapiInvoke(L"MyRapi", L"CallMyFunction",
        0, NULL, &cbOut, &pOut, NULL, 0);
       if(cbOut)
               printf("Your device got %s KB of Physical Memory available", pOut);
       else
               printf("No memory available in the device");

//Uninitialize Windows CE RAPI
   hr = CeRapiUninit();
//Free the DLL allocated memory.
       if(pOut)
               LocalFree(pOut);
       return 0;
}
                               

The following code shows implementation of the CallMyFunction routine inside MyRapi.dll: #include <windows.h>
#include "rapi.h"
extern "C"
{
       __declspec(dllexport) int CallMyFunction(DWORD cbInput,
               BYTE* pInput, DWORD* pcbOutput, BYTE** ppOutput,
               IRAPIStream* pStream);
}

int CallMyFunction(DWORD cbInput, BYTE* pInput,
                  DWORD* pcbOutput, BYTE** ppOutput,
                  IRAPIStream* pStream)
{
       MEMORYSTATUS structMemStatus;
       DWORD dwMemAvailPhys;
       char        szFree[10];
       //Initialize buffer to all NULLs
       ZeroMemory(szFree, 10);
       GlobalMemoryStatus(&structMemStatus);
       dwMemAvailPhys = structMemStatus.dwAvailPhys;
       sprintf(szFree, "%d", dwMemAvailPhys/1024);
       //Provide extra char for NULL
       *ppOutput = (BYTE*)LocalAlloc(LPTR, strlen(szFree)+1);
       if(*ppOutput)
       {
               //Copy along with NULL
               strncpy((char*)*ppOutput, szFree, strlen(szFree)+1);
               *pcbOutput = strlen(szFree) + 1;
       }
       else
               *pcbOutput = 0;
       return 0;
}
                               
Back to the top

Using CeRapiInvoke in Stream Mode
The following code demonstrates how to use CeRapiInvoke() in stream mode. It communicates with the device through IRAPIStream interface and displays the available physical memory in an Edit control. This simple application will loop indefinitely when reading data from the RAPI stream until a key is pressed. Once a key is pressed, the application exits the loop and writes to the RAPI stream, notifying code in MyRapi.dll that it is exiting. // test console application to call in stream mode
//

#define UNICODE
#define _UNICODE
#include <windows.h>
#include <stdio.h>
#include <conio.h>
#include <tchar.h>
#include "rapi.h"

//Serious Error conditions and execution paths are not
//considered in this example. Purpose is just to demonstrate
//the usage of CeRapiInvoke() in Stream mode.


struct MY_MEM_STRUCT
{
       DWORD        dwPhysMemAvail;
       DWORD        dwPhysTotal;
};

int main(int argc, char* argv[])
{
       IRAPIStream *pStream;
       DWORD        cbOut;
       DWORD        dwLength, cbBytesRead;
       MY_MEM_STRUCT        structMyDeviceMem;

       HRESULT        hr = CeRapiInit();
       hr = CeRapiInvoke(L"MyRapi", L"CallMyFunction", NULL,
               NULL, &cbOut, NULL, &pStream, 0);

       _tprintf(_T("Press any key to exit\n"));
       fflush(stdin);
       while(!kbhit())
       {
               cbBytesRead = 0;
               //First read the length information.
               hr = pStream->Read(&dwLength, sizeof(DWORD), &cbBytesRead);
               if(FAILED(hr) || (dwLength != sizeof(MY_MEM_STRUCT)))
               {
                       _tprintf(_T("Error while reading from stream"));
                       break;
               }
               //Read the bytes into the structure.
               hr = pStream->Read(&structMyDeviceMem, dwLength,
                       &cbBytesRead);
               if(FAILED(hr))
               {
                       break;
               }
               if(cbBytesRead > 0)
               {

                       _tprintf(_T("\rTotal Physical Memory = %d KB, Available Memory = %d KB."),
                               structMyDeviceMem.dwPhysTotal, structMyDeviceMem.dwPhysMemAvail);
               }
               Sleep(2000);
       }
       fflush(stdin);
       DWORD        dwDataWrite = 1 ;
       DWORD        cbWritten;
       hr = pStream->Write(&dwDataWrite, sizeof(dwDataWrite), &cbWritten);
       hr = CeRapiUninit();
       return 0;
}
                               

On the device a separate thread is dedicated for reading the notification from the desktop. The read operation will block the thread until it reads the notification from the stream. The main thread writes to the stream every two seconds. struct MY_MEM_STRUCT
{
       DWORD        dwPhysMemAvail;
       DWORD        dwPhysTotal;
};

UINT MyThreadProc(LPVOID pParam);
CRITICAL_SECTION        g_structCriticalSect;
BOOL        g_fContinue = TRUE;

HRESULT        SendToMyRapiStream(IRAPIStream* pStream,
                       void*        pWriteStruct, int nDataWrite)
{
       HRESULT hr;
       DWORD        cbWritten, dwWrite;
       dwWrite = sizeof(nDataWrite);
       //Write the length information first
       hr = pStream->Write(&nDataWrite, dwWrite, &cbWritten);
       if(FAILED(hr))
               return E_FAIL;
       //Write the structure into the stream
       hr = pStream->Write(pWriteStruct, nDataWrite, &cbWritten);
       if(FAILED(hr))
               return E_FAIL;
       return S_OK;
}

int CallMyFunction(DWORD dwInput, BYTE* pInput,
                  DWORD* pcbOutput, BYTE** ppOutput,
                  IRAPIStream* pStream)
{
       MEMORYSTATUS structMemStatus;
       BOOL        bContinue = TRUE;
       MY_MEM_STRUCT        structMyMem;
       HRESULT        hr;

       DWORD        dwThreadId;
       InitializeCriticalSection(&g_structCriticalSect);

       HANDLE hThread = CreateThread(NULL, NULL,
               (LPTHREAD_START_ROUTINE)MyThreadProc, pStream,
               NULL, &dwThreadId);

       while(1)
       {
               EnterCriticalSection(&g_structCriticalSect);
               if(g_fContinue == FALSE)
               {
                       LeaveCriticalSection(&g_structCriticalSect);
                       break;
               }
               LeaveCriticalSection(&g_structCriticalSect);
               GlobalMemoryStatus(&structMemStatus);
               structMyMem.dwPhysMemAvail = structMemStatus.dwAvailPhys / 1024;
               structMyMem.dwPhysTotal = structMemStatus.dwTotalPhys / 1024;
               hr = SendToMyRapiStream(pStream, &structMyMem, sizeof(structMyMem));
               if(FAILED(hr))
               {
                       break;
               }
                 /*wait for 2 seconds. if WaitForSingleObject() comes out
               in less than 2 seconds then client has requested to stop
               sending the data or an error has occured.*/
               if(WaitForSingleObject(hThread, 2000) != WAIT_TIMEOUT)
                       break;
       }
       //Make sure the other thread has terminated
       WaitForSingleObject(hThread, 5000);
       DeleteCriticalSection(&g_structCriticalSect);
       g_fContinue = FALSE;
        return 0;

}

UINT MyThreadProc(LPVOID pParam)
{
       DWORD        dwInput, cbReadBytes;
       IRAPIStream* pStream = (IRAPIStream*)pParam;
       HRESULT hrStream = pStream->Read(&dwInput, sizeof(dwInput), &cbReadBytes);
       EnterCriticalSection(&g_structCriticalSect);
       g_fContinue = FALSE;
       LeaveCriticalSection(&g_structCriticalSect);
       return 0;
}
                               
For additional information, see the MSDN CeRapiInvoke function reference:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcesdkr/htm/_wcesdk_cerapiinvoke.asp (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcesdkr/htm/_wcesdk_cerapiinvoke.asp)
Back to the top

Building Modules That Use RAPI
The Rapi.h header file and Rapi.lib library file are available for use in compiling and linking desktop code to use RAPI. The header file and library files for use with RAPI functions are found in the following folder in a typical installation:

C:\Windows CE Tools\wce300\MS Pocket PC\support\ActiveSync\Inc
C:\Windows CE Tools\wce300\MS Pocket PC\support\ActiveSync\Lib
To compile the device-side DLL, you can use the same Rapi.h file mentioned earlier. There is no RAPI library file necessary to create the device DLL.

NOTE: RAPI.dll is not redistributable. It is installed when ActiveSync is installed on the desktop host computer.


[출처]
http://www.kbalertz.com/kb_Q299891.aspx
TAG ce, PDA, rapi
QA: How to implement autorun from a storage card?
By Joao Paulo Figueira, June 02, 2003.
Print version

Question
I want to start an application when the user inserts or removes a storage card. How do I implement such functionality?

Answer
You can execute an application when a storage card is inserted or removed from your device. This may allow your users to install applications, perform backups, or other action you like. The protocol is really simple:


Create one directory under the root of the card named after your CPU's ID. For instance, StrongARM is 2577, SH3 is 10003 and MIPS is 4000.
Your application must be named autorun.exe and it must be in that directory.
When the card is inserted, the application is called with 'install' as the command line parameter. When the card is removed, the parameter is 'uninstall'.

Here is a skeleton application. You can create it using eVC's Wizard, choosing the 'WCE Pocket PC 2002 Application'.

TCHAR szCFPath [MAX_PATH+1]; // Compact Flash path


// OnCardInsert
//
// The compact flash card has been inserted
//
void OnCardInsert()
{
   //
   // Get the path from where we are starting up
   //
   if(!SHGetAutoRunPath(szCFPath))
   {
       return;
   }
}


// OnCardRemove
//
// The compact flash card has been removed
//
void OnCardRemove()
{
}


// WinMain
//
// Main entry point
//
int WINAPI WinMain(HINSTANCE hInstance,
                  HINSTANCE hPrevInstance,
                  LPTSTR    lpCmdLine,
                  int       nCmdShow)
{
   if(lstrcmpi(lpCmdLine, _T("install")) == 0)
   {
       //
       // Card has been inserted
       //
       OnCardInsert();
   }
   else if(lstrcmpi(lpCmdLine, _T("uninstall")) == 0)
   {
       //
       // Card has been removed
       //
       OnCardRemove();
   }
   return 0;
}


Note that your application does not know where it is starting. You cannot infer that the startup path will be the one you are expecting.

Related resources:

[출처]
http://www.pocketpcdn.com/articles/autorun.html
TAG ce, CF, PDA, SD

WinCE에서 폰트 설치 및 삭제

it/emb 2005/03/02 20:09 Posted by newtype
* 폰트 설치.

Windows 폴더에 복사해 넣으면 됩니다.



* 폰트 삭제.

1. 폰트파일의 확장자를 바꾸고. ( *.ttf -> *.ttt )

2. 소프트 리셋을 한후

3. 폰트 파일을 지워줍니다.


알고 있으면서도 잊어서..
그때마다 헤매게 되네요..^^;
rda = new SqlCeRemoteDataAccess( "http://192.168.0.3/Mobile/sscesa20.dll","", "", strCon );

rda.Pull( "userinfo", strSQL, strOleCon );

이 부분이 무엇을 하는것인지는 잘 모르겠습니다. 알려주시면
감사하겠습니다.

테스트 결과는 잘 나왔습니다. 좋은 자료 감사드립니다.
TAG C#, PDA
안녕하세요? 고수는 절대 아니지만... 제가 아는 문제인것 같아서 답변을
적어봅니다.
^^;...
이 글은 님께서 Pocket PC Version으로 작업 하신다는 가정하에 말씀드립니다.
해주셔야 할 작업은 총 3개가 존재합니다.
그럼... ^^;...


1. PocketPC에는 멤버 변수로 m_bFullScreen를 가지고
있습니다.
  일반 WinCE Version에서 있는지는 잘 모르겠구요... ^^;...
  이 값은 기본적으로 TRUE로 설정되어 있습니다. 속성은 눈치
채셨듯이...
Full Screen으로 할지 안할지를 결정하는 인자입니다.
이 값만 바꿔준다면, 화면이 초기에 뜰때, 아마 최대화가 아닌 설정한
값으로,
다이얼로그 박스가 나타날 것입니다.
설정은.... 다이얼로그의 생성자 함수에서...
  m_bFullScreen = FALSE;              //
Full Screen 금지
이렇게 해주시면 됩니다.
위와 같이 한다고 하더라도 Pocket PC Version에서 보면 문제가 생깁니다.
  SIP던가요? 키보드를 위로 올리거나, 닫거나 하면 이넘의 다이얼로그가
허락도 안받구...
  지 맴데로 전체 창으로 가버립니다.
  희한한 화면 구성이 되는데요....
  이것은 SIP 관련 이벤트에 구현되어 있는 부분에 문제(?)가
있어서 그렇습니다.
  물론 MFC가 구현해준 부분이라 찾아야 하는데요...
  딱 2 부분만 고치면 됩니다.




2. 첫번째로 바꿔줘야 할 부분은
  OnActivate 이벤트입니다.
  dlgcore.cpp 파일을 열어서 찾아보면,
void CDialog::OnActivate(UINT nState, CWnd* pWndOther,  BOOL bMinimized)
{
       if (!(GetStyle() & WS_CHILD))
       {
               _AFX_THREAD_STATE* pThreadState = _afxThreadState.GetData();
               SHHandleWMActivate(m_hWnd, pThreadState->m_lastSentMsg.wParam,
                                  pThreadState->m_lastSentMsg.lParam, &m_sai, FALSE);
       }

       CWnd::OnActivate(nState, pWndOther, bMinimized);
}


이 부분을 찾으실 수 있을 겁니다.
이 부분에서 SHHandleWMActive를 호출하는데요.
MSDN에서 이 함수에 대해서 찾아보면 다음과 같이 나오는군요.
This function is used to help manage the input panel and your application.
In Windows for Pocket PC, when a window is activated, the input panel should
be restored to the state it was in when the window lost activation.
This function helps manage the restoration of the original state
해석을 보면...(참고루... 전 해석 능력이 짧은 관계로 영어랑 욜라 친한 울 회사분께서
번역해주셨음... ㅋㅋㅋ)
이 기능은 입력패널과 당신은 어플리케이션의 관리를 도울때 쓴다.
포켓PC용 윈도우 안에서, 하나의 창이 활성화 되었을 때,
입력 패널은 그 창이 비활성화 될 때 상태로 되돌려져야 한다.
이 기능은 원상태의 복원에 도움을 준다.


결국에는 이 함수를 호출해서 다이얼로그 창이 input panel 의 동작 상태에 따라서,
사이즈가 마음데로... 왔다갔다 하게 되죠.
CDialog의 OnActiveate 에서는 결국 하는 일은 저 함수를 호출 하는 일 밖에 없으므로,
님께서 구현하신 Dialog함수에서 OnActivate함수내부에서,
바로 CWnd::OnActivate를 호출하셔서 저 SHHandleWMActive를 호출하지 않도록
막으시면 될겁니다.
그럼... 다음과 같이...


void CUsrnDlg::OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized)

{
       CDialog::OnActivate(nState, pWndOther, bMinimized);
}
이렇게 되어 있는 부분을요.. 주석으로 냅따~~~ 막아버리시구요.
CWnd::OnActivate를 호출하시면 될것입니다.


void CUsrnDlg::OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized)

{
       // CDialog::OnActivate(nState, pWndOther, bMinimized);        // FullScrean금지를
위해 주석처리
       CWnd::OnActivate(nState, pWndOther, bMinimized);
}




3. 아직도 input pannel에 영향을 받을 겁니다.
그 이유는 바로 ON_WM_SETTINGCHANGE() 와 관련이
있는데요.
CDialog class내에 함수 구현된 부분을 찾아보면 다음과 같이 되어 있습니다.


void CDialog::OnSettingChange(UINT uFlags, LPCTSTR lpszSection)
{
       if (!(GetStyle() & WS_CHILD))
       {
               _AFX_THREAD_STATE* pThreadState = _afxThreadState.GetData();

               SHHandleWMSettingChange(m_hWnd, pThreadState->m_lastSentMsg.wParam,
                       pThreadState->m_lastSentMsg.lParam, &m_sai);
       }

       CWnd::OnSettingChange(uFlags, lpszSection);
}
이 부분의 SHHandleWMSettingChange함수를 MSDN을
찾아보면 다음과 같이 나올 것입니다.
This function is used to help manage the input panel and your application.
If hwnd should size based on the position of the input panel,
then call this function to size your window when the window receives the
WM_SETTINGCHANGE message.
해석을 보면... (역시 이 부분도 영어 고수님의 도움을 받아서... ㅋㅋㅋ, 아!~
난 왜 이리두 영어 실력이 짧은가... ㅡㅡa...)
이 기능은 입력패널과 당신 어플리케이션의 관리를 도울때 쓴다.
만약, hwnd 가 입력패널의 위치에 기반을 두고 어떤 크기로 만들어져야 한다고
가정을 한다면,
그 창이 WM_SETTINGCHANGE 메시지를 받을 때 당신의 창을 사이즈 하기 위해서
이 기능을 사용하라!


이 부분도 결국에는 다이얼로그 창이 마음데로 왔다갔다 하는 몰상식한(?) 기능을
수행하는데요.. ㅋㅋㅋ
이유는 다 아시겠지만 SHHandleWMSettingChange 이 함수를 호출하기 때문에 발생하는 문제입니다.
이 부분도 역시 위와 동일하게 바로 CWnd::OnSettingChange함수를 님께서 구현하신
Dialog 클래스내에서 저 함수를 구현해 놓으시고, 내부에 상위 CDialog 내의 OnSettingChange를 호출하시는게 아니라, 더 상위인 CWnd::OnSettingChange를 호출하시면 됩니다.


따라서 다음과 같이 멤버 함수로,
afx_msg void OnSettingChange(UINT uFlags, LPCTSTR lpszSection);
을 헤더 파일에 넣어주시구요.


MESSAGE_MAP 부분에 ON_WM_SETTINGCHANGE()를 추가하시구요.


BEGIN_MESSAGE_MAP(CUsrDlg, CDialog)
       ON_WM_SETTINGCHANGE()
END_MESSAGE_MAP()



내부에는 다음과 같이 처리하면 되겠죠? ^^;
void CUsrDlg::OnSettingChange(UINT uFlags, LPCTSTR lpszSection)
{
       CWnd::OnSettingChange(uFlags, lpszSection);        // Full Screen 금지
}

이와 같이 고쳐 놓으면 아마(?) 다이얼로그의 사이즈가 반항(?)하는 것을 찾기
힘드실 것입니다.
물론... 위의 항목에서 2, 3번 항목은  if (!(GetStyle() & WS_CHILD))
조건에 걸릴 경우만 타는 겁니다.


참고루요..
다이얼로그가 PocketPC Version에서는 모달로 띄우거나, 모달리스로 띄우거나,
메인 메뉴가 자동적으로 사라집니다.
어떻게 해볼라고 해도 안되더군요.
물론 모달리스로 띄우면 메뉴는 선택할 수 있어야 하는 것인데...(WinCE Version에서는 메뉴 사용 가능)
얼마동안 찾아봤는데 잘 안되더군요.


전 이렇게 해서 그 문제를 해결했습니다.
Test환경은 PocketPC Version에서 Test했습니다.


올만에 개발실루 왔더니 아는 부분이 있어서 몇자 적어봤습니다.
만약 틀린 부분이 있다면... 괜한 삽질(?)로 고생시키게 해서 죄송하구요... ^^;...
그럼 이만... ^^;...






[출처]

데브피아
초보라서 자꾸 막히네여..ㅡ.ㅜ

mdf파일을 sdf로 변환하고 싶은데요.. 간단하게 변환하는 방법이 없을까요?

동기화 시켜서... sdf로 변환시키는건 어렵고 또 제가 만드는 플그램에

필요 없는 부분이라서.. 그냥 mdf를 sdf로 포맷을 바꾸기만 하면 되는데

답변 부탁합니다.
pda에 sqlce, adoce를 설치중입니다. 강좌대로...

     adoce31.dll
     adocedb31.dll
     adoceoledb31.dll
     adoxce31.dll
     msdadc.dll
     msdaeren.dll
     ssceerror20en.dll
     dllregister.exe
     ssce20.dll
     ssceca20.dll

위의 파일을 모두 PDA의 WINDOWS폴더로 카피한후
dllregister.exe를 실행했는대.. 라이브러 파일이 없다면서 에러가 나네요. 혹시 카피한 경로가 잘못된건가요??
이번에 evt를 처음 접하게 되었는데 잘 몰라서요..^^;; 도움을 요청합니다.
sqlce를 설치하고.. 디비를 생성했는데요...
evt에서.. 그 디비에 접근해서.. sql문을 사용해서.. 원하는 자료를 검색해서... 가져 오는 방법을 잘 모르겠어서요... vc++에선 해본적이 있는데 여기선 잘 모르겠습니다. 도와주세여~
SQL Server 엔터프라이즈 관리자이(가) '210.222.0.87'을(를) '210.222.0.87'의 배포자로 구성할 수 없습니다.
오류 18483: 'distributor_admin'이(가) 서버에서 원격 로그인으로 정의되어 있지 않기 때문에 KRNET'서버에 연결할 수 없습니다.

이런 에러가 나옵니다.

어떻게 해결 방법이 없습니까?

CDMA 모듈을 이용한 DB 접속?

it/emb 2003/10/20 18:26 Posted by newtype
안녕하세요.
강좌는 재미있게 읽었습니다.

저의 경우는 PPC2002(m400)에 닷넷C#을 올려서
SQL CE을 활용해 응용 프로그램을 개발하고 있습니다.

연결환경은 CDMA/CRADLED 입니다.
크래들 연결상황에서는 아무런 문제없이 작동하는데,
CDMA 모듈을 이용할 경우 문제가 생깁니다.

문제를 자세히 설명하자면,
CE의 "설정>연결>인터넷설정"에서 수동으로 "연결"을
선택하지 않으면 CDMA 모듈과 붙지를 않습니다.

인터넷 설정은 "셀룰러 라인"을 선택하고 있거든요.
혹시 프로그램에서 이 연결을 컨트롤할 수 있는 방법은 없나요.
즉, 데이타 통신이 필요할 때
CDMA 연결을 ON 했다가 다 필요하면 OFF 시키는 거죠.

그런데 CE 설명서 자체에서는 CDMA(전화환경) 를 이용할 경우에
해당하는 이야기가 없더라구요.

쩝 고수님들의 답변 부탁드립니다.



SQLCE 2.0 설치 순서는 아는데요...
설치 과정에서 물어보는 각종 정보에 대해서 모르는게 있어서요..
IIS 에 대한 정보도 있어야 겠고...
좀 자세히 나와 있는 곳이 없습니까?

제가 로컬 sql 서버의 특정 데이터를 동기화 시킬려고 하는데요.

게시판 복제를 시행할려고 하는데 , 셋팅시 현재 sql 서버가

시스템 계정이라면서

테이블 게시판 복제가 구현되지 않습니다.

이를 구현할려면 어떻게 해야 하는지 모르겠거든요.

답변을 부탁드립니다.^^

아르켜 주세요~~~~~

제가 MR을 구현하고 싶은데요.

님의 강좌를 보다가 궁금한것이,

SQLCE의 MR 서버 셋팅과 SERVER AGENT셋팅을 하기 위해선

반드시 WINDOWS 2000 SERVER에서 셋팅을 해주어야 하나요?

XP나 WINDOWS 2000 프로페셔널은 안되는 것 인가요?

님의 답변을 부탁드릴게요.^^

기본적으로 PDA에 RAS 접속 모듈이 셋팅되어 있잖아요.

이 기본 RAS 접속 모듈을 자동으로 구동시키고 싶거든요.

항상 인터넷 익스플로어(제 PDA폰 같은 경우)를 구동시켜야

그 때 전화접속 모듈이 같이 구동됩니다.

이것을 구동시킬려는 이유는 채팅 프로그램을 구동시킬려고 하는데,

구동시키기 전에 전화접속 모듈을 구동시키지 않으면,

채팅 프로그램이 제대로 구동되지 않더라구요.

어떤분은 레지스트리를 조작해 보라고 하시는데 ,

저는 도통 감이 안잡힙니다.

그러니까 제가 구현하고 싶은건 인터넷 익스플로어 프로그램이

구동되면 전화접속 모듈이 같이 구동되듯이,

제가 제작한 채팅 프로그램이 구동되면 , 전화접속 모듈이 같이

구동되게끔 하고 싶거든요.

무슨 방법이 없을까요?

답변을 부탁드립니다.^^
혹시 포켓 pc 2002로 개발한 프로그램을 포켓 pc 2000이 탑재된

pda에 탑재해서 구동할 수 있는지 궁금하네요.

너무 황당한? 질문이지만, 꼭 알고 싶거든요.^^;

그리고 , 만일 구동할 수 없다면 포켓 pc 2000상에서

구동할 수 있는 프로그램을 개발할려면 어떻게 해야 하나요?

초보라 모르는것이 너무 많습니다.-.-;

답변 부탁드릴게요.^^

한가지 더 여쭤볼게요.^^

it/emb 2003/09/18 04:18 Posted by newtype
evc에서 생성한 dll을 evb에 탑재할 수 있나요?

그러니까 예를 들어 , evc로 구현한 클라이언트용 소켓 모듈을

dll화해서 evb에서 사용하고 싶은데요.

가능한지 궁금합니다.

답변 부탁드릴게요.^^
제가 e드라이브에 있는 bmp파일을 픽처박스에 에뮬레이터 상으로 리뷰할려고 하는데요.

파일을 찾을 수 없다면서 에러가 발생하네요.

픽처박스에 에뮬레이터 상으로 bmp파일을 출력할려면 어떻게 해야 하나요?

'에러 코드 입니다.
PictureBox1.Picture = "E:\show.bmp"


p.s: 항상 좋은 답변해 주셔서 감사합니다.^^ 저 같은 초보에게

유용한 정보 아르켜 주셔서 정말로 감사합니다.^^

이번 질문도 부탁드릴게요.^^

sdf파일은 pda상에서만 생성되나요?

it/emb 2003/09/17 22:38 Posted by newtype
갑자기 궁금한게 있어서 그런데요.^^;

sdf파일은 pda상에서만 생성되나요?

pc에서는 생성이 안되나요?

답변 부탁드릴게요.^^
제가 evb를 사용해서 pc의 특정 폴더에 sqlce 파일을 생성할려고

하는데요. 밑의 소스의 CeCatalog.Create ConStr 부분에서

"An error was encountered while running this program: Unspecified Error"라는 에러가 발생합니다.

이거 왜 그런지 알 수 있을까요?

답변 부탁드릴게요.^^

Private Sub CreateDatabase()
   Dim CeCatalog As ADOXCE.Catalog
   Dim ConStr As String
       
   Set CeCatalog = CreateObject("ADOXCE.Catalog.3.1")
   ConStr = "Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0; data source=d:\homeDir\exam.sdf"
   
   CeCatalog.Create ConStr
       
   Set CeCatalog = Nothing
       
   MsgBox ("RdaTest.sdf was Created.")
   
End Sub
PDA상에서 인터넷에 접속할때 , 현재 무선랜이 그리 보급되어

있지 않은 관계로 , 전화접속 네트워킹(RAS)를 사용해서

인터넷에 접속을 하잖아요.

여기서 궁금한것이 EVC로 구현된 RAS관련 예제는 있는데 ,

EVB로 구혆된 RAS관련 예제는 없더라구요.

전화접속 네트워킹(RAS)를 EVB로 구현하고 싶은데요.

자료나 방법을 알 수 있을까요?

명규님의 답변 부탁드릴게요.^^;

Compact Framework을 이용한 간단한 RDA 예제

it/emb 2003/07/18 17:50 Posted by newtype
요번에 VS.NET 2003 설치하구 잠깐 짬내서 해봤습니다.
MR은 서버 셋팅이 까다로와서 RDA방식으로 했구요.
EVC로 하다가 C#으로 하니 엄청 편하네여..@.@



=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


               private void button1_Click(object sender, System.EventArgs e)
               {

                       string strLocalDB = "\\NorthWind.sdf";
                       string strCon = "Provider=microsoft.sqlserver.oledb.ce.2.0;Data Source=" + strLocalDB;
                       string strOleCon = "provider=sqloledb; data source=192.168.0.2; Initial Catalog=NorthWind; user id=sa; password=sa";
                       string strSQL = "SELECT ProductID, ProductName, UnitPrice FROM Products";

                       // 기존 파일 삭제
                       System.IO.File.Delete( strLocalDB );


                       // Local DB 생성
                       SqlCeEngine engine = new SqlCeEngine( strCon );
                       engine.CreateDatabase();

                       System.Data.SqlServerCe.SqlCeRemoteDataAccess rda;
                       SqlCeConnection con;
                       SqlCeCommand cmd;
                       SqlCeDataReader reader;

                       try
                       {
                               

                               // RDA Pull
                               rda        = new SqlCeRemoteDataAccess( "http://192.168.0.2/mobile/sscesa20.dll",                
                                                                    "", "", strCon );
                               rda.Pull( "Products", strSQL, strOleCon );

                               // Local Open
                               con        = new SqlCeConnection( "Data Source = \\Northwind.sdf;" );
                               cmd = new SqlCeCommand( strSQL, con );
                               cmd.CommandType = CommandType.Text;

                               cmd.Connection.Open();
                               reader = cmd.ExecuteReader(CommandBehavior.CloseConnection);

                               while( reader.Read() )
                               {
                                       System.Windows.Forms.ListViewItem lvi;
                                       lvi = new ListViewItem( reader.GetValue(0).ToString() );
                                       lvi.SubItems.Add( reader.GetValue(1).ToString() );
                                       lvi.SubItems.Add( reader.GetValue(2).ToString() );

                                       listView1.Items.Add( lvi );
                                       
                               }

                               reader.Close();
                               con.Close();

                       }
                       catch(SqlCeException ex)
                       {
                               SqlCeErrorCollection errorCollection = ex.Errors;

                               StringBuilder bld = new StringBuilder();
                               Exception   inner = ex.InnerException;

                               if (null != inner)
                               {
                                       MessageBox.Show("Inner Exception: " + inner.ToString());
                               }

                               foreach (SqlCeError err in errorCollection)
                               {
                                       bld.Append("\n Error Code: " + err.HResult.ToString("X"));
                                       bld.Append("\n Message   : " + err.Message);
                                       bld.Append("\n Minor Err.: " + err.NativeError);
                                       bld.Append("\n Source    : " + err.Source);
           
                                       foreach (int numPar in err.NumericErrorParameters)
                                       {
                                               if (0 != numPar) bld.Append("\n Num. Par. : " + numPar);
                                       }
           
                                       foreach (string errPar in err.ErrorParameters)
                                       {
                                               if (String.Empty != errPar) bld.Append("\n Err. Par. : " + errPar);
                                       }

                                       MessageBox.Show(bld.ToString());
                                       bld.Remove(0, bld.Length);
                               }
                       }

               }
TAG C#, RDA, sqlce