독도 광고 모금 캠페인

특별한딸기이야기

블로그 이미지
딸기다운 사이버 공간을 만들고 싶어하는 특별한 딸기의 블로그입니다.
by 특별한녀석
  • 9,675Total hit
  • 4Today hit
  • 25Yesterday hit

최근에 달린 레몬펜 쪽지

Statistics Graph

'예제'에 해당되는 글 8건

  1. 2008/03/21
    자바 예제 11.3 (1)
  2. 2008/03/18
    과제 참고 소스
  3. 2008/03/03
    마소 안드로이드 연재 스캔_1
  4. 2008/02/02
    대화상자 생성 및 이벤트 처리
  5. 2008/01/28
    OnMouseMove함수에서 마우스 버튼 눌려졌을 때 설정
  6. 2008/01/28
    WM_TIMER 사용법
  7. 2008/01/10
    네이트온 파일방 설정 방법
  8. 2008/01/07
    간단한 SDK 예제 프로그램
출처 angelic zoon | 아르
원문 http://blog.naver.com/pigjh1/20036843493

//  실습 11.3: Taegukgi.java

import java.applet.Applet;
import java.awt.*;

public class Taegukgi2 extends Applet
{
 //태극기를 그린다.
 public void paint (Graphics page)
 {
  //태극마크를 그린다.
  page.setColor(Color.red);
  page.fillArc(120,60,120,120,0,180);
  page.setColor(Color.blue);
  page.fillArc(120,60,120,120,180,180);
  page.setColor(Color.red);
  page.fillArc(120,90,60,60,180,180);
  page.setColor(Color.blue);
  page.fillArc(180,90,60,60,0,180);


 //건곤감리를 그린다.
  page.setColor(Color.black);

  int x1[]={54,64,99,89};
  int y1[]={72,79,28,21};
  page.fillPolygon(x1,y1,4);

  int x2[]={67,77,112,102};
  int y2[]={81,88,37,30};
  page.fillPolygon(x2,y2,4);

  int x3[]={80,90,125,115};
  int y3[]={90,97,46,39};
  page.fillPolygon(x3,y3,4);

  int x4_1[]={235,245,261,251};
  int y4_1[]={46,39,63,70};
  page.fillPolygon(x4_1,y4_1,4);

  int x4_2[]={254,264,280,270};
  int y4_2[]={74,67,91,98};
  page.fillPolygon(x4_2,y4_2,4);

  int x5[]={248,258,293,283};
  int y5[]={37,30,81,88};
  page.fillPolygon(x5,y5,4);

  int x6_1[]={261,271,287,277};
  int y6_1[]={28,21,45,52};
  page.fillPolygon(x6_1,y6_1,4);

  int x6_2[]={280,290,306,296};
  int y6_2[]={56,49,73,80};
  page.fillPolygon(x6_2,y6_2,4);

  int x7[]={54,64,99,89};
  int y7[]={168,161,212,219};
  page.fillPolygon(x7,y7,4);

  int x8_1[]={67,77,93,83};
  int y8_1[]={159,152,176,183};
  page.fillPolygon(x8_1,y8_1,4);

  int x8_2[]={86,96,112,102};
  int y8_2[]={186,179,203,210};
  page.fillPolygon(x8_2,y8_2,4);

  int x9[]={80,90,125,115};
  int y9[]={150,143,194,201};
  page.fillPolygon(x9,y9,4);

  int x10_1[]={235,245,261,251};
  int y10_1[]={194,201,177,170};
  page.fillPolygon(x10_1,y10_1,4);

  int x10_2[]={254,264,280,270};
  int y10_2[]={167,174,150,143};
  page.fillPolygon(x10_2,y10_2,4);

  int x11_1[]={248,258,274,264};
  int y11_1[]={203,210,186,179};
  page.fillPolygon(x11_1,y11_1,4);

  int x11_2[]={267,277,293,283};
  int y11_2[]={176,183,159,152};
  page.fillPolygon(x11_2,y11_2,4);

  int x12_1[]={261,271,287,277};
  int y12_1[]={212,219,195,188};
  page.fillPolygon(x12_1,y12_1,4);

  int x12_2[]={280,290,306,296};
  int y12_2[]={185,192,168,161};
  page.fillPolygon(x12_2,y12_2,4);
 }
}

TRACKBACK 0 AND COMMENT 1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  <title>Untitled Document</title>
  <style type = "text/css">
   .join_name {
    border:solid lpx #ff000;
   }
  </style>
 </head>
 <body>
  <form>
   <textarea style = "width : 300px" name = "contract" id = "contract" class = "join_contract">
My name is Tyto.
My Nicname is Special Strawberry.
I like my names.
야옹</textarea>
   <br />
   <label>
    <input type = "checkbox"> 위 약관에 동의하십니까?
   </label>
   <table>
    <tr>
     <th>
      이름
     </th>
     <td>
      <input type="text" name="name" id="name" class="join_name">
     </td>
    </tr>
    <tr>
     <td>
      아이디
     </td>
     <td>
      <input type = "text" name ="user_id" id="user_id" class = "join_user_id">
      <input type = "button" name = "user_id_check" id = "user_id_check" value = "아이디체크"
      onclick="javascript:alert('hello world')">
     </td>    
    </tr>
    <tr>
     <th>
      패스워드
     </th>
     <td>
      <input type = "password">
     </td>
    </tr>
    <tr>
     <th>
      성
     </th>
     <td>
      <label>
      남 <input type = "radio" id = "sex1" name = "sex" value = "남">
      </label>
      <label>
      여 <input type = "radio" id = "sex2" name = "sex" value = "여">
      </label>
     </td>
    </tr>
    <tr>
     <th>
      직업
     </th>
     <td>
      <select name = "job" id = "job">
       <option value = "" selected = "selected">
        ----------
       </option>
       <option value = "학부생">
        학부생
       </option>
       <option value = "학생">
        학생
       </option>
      </select>
     </td>
    </tr>
    <tr>
     <td>
      취미
     </td>
     <td>
      <label>
       동영상
      <input type ="checkbox" name = "hobby" value = "hobby">
      </label>
      <label>
       동상
      <input type ="checkbox" name = "hobby" value = "teach">
      </label>
     </td>
    </tr>
   </table>
  </form>
 </body>
</html>
TRACKBACK 0 AND COMMENT 0

보호되어 있는 글입니다.
내용을 보시려면 비밀번호를 입력하세요.

대화상자 화면에 출력하기
  1. 대화상자 리소스를 이용하여 대화상자의 모양을 디자인 한다.
  2. 이 리소스와 연결되는 CDialog 파생 클래스를 만든다.
  3. CDialog 클래스의 멤버 함수인 DoModal을 실행한다.
  예제
    void CMyClass::OnDialog()
    {
      CMyDlg dlg;
      dlg.DoModal();
    }

사용자가 OK버튼을 눌렀을 경우 이벤트 처리
  예제
    void CMyClass::OnDialog()
    {
      CMyDlg dlg;
      if(dlg.DoModal() == IDOK)
      {
        // OK버튼이 눌렸을 때만 실행되는 부분
      }
    }

'딸기 공부방 > MFC공부방' 카테고리의 다른 글

컨트롤과 연결가능한 변수 종류  (0) 2008/02/10
대화상자 생성 및 이벤트 처리  (0) 2008/02/02
OnInitDialog함수  (0) 2008/02/02
대화상자 주요 속성  (0) 2008/02/02
LOGFONT 기본 설정  (0) 2008/01/28
텍스트 설정 함수  (0) 2008/01/28
TRACKBACK 0 AND COMMENT 0

void View::OnMouseMove(UINT nFlags, CPoint point)
{
 // TODO: Add your message handler code here and/or call default
 if(nFlags & MK_LBUTTON)
 {
    // 여기에 코드를 넣으면 마우스 버튼이 눌린 동안 작동
 }
 
 CView::OnMouseMove(nFlags, point);
}

TRACKBACK 0 AND COMMENT 0
설정부분

SetTimer(0, 1000, NULL);
SetTimer(1, 800, NULL);
// 첫번째 인자는 ID
// 두번째 인자는 호출 간격 1000 = 1초
// 세번째 인자는 호출 함수 명(NULL지정시 OnTimer 호출)

구현부분

void View::OnTimer(UINT nIDEvent)
{
  if(nIDEvent == 0)
  {
    // 타이머 아이디가 0일 때
  }
  else if(nIDEvent == 1)
  {
     // 타이머 아이디가 1일 때
  }
}

중단부분
KillTimer(0);
// 인자는 ID
TRACKBACK 0 AND COMMENT 0
오늘은 네이트온 파일방 설정 방법에 대해서 올리겠습니다.

먼저 네이트온을 실행합니다.

사용자 삽입 이미지

네이트온에 로그한 장면



그럼 내 미니홈피가는 단추 옆에 손에 디스켓을 들고 있는 단추가 보입니다.

그 단추를 꾸욱 눌러줍니다.

사용자 삽입 이미지

마법사 실행 장면


화면 구석에 마법사로 설정하기 라는 버튼이 보이는 군요.

그 버튼을 눌러 마법사를 실행시킵니다.

사용자 삽입 이미지

그럼 파일방의 제목과 형태를 정하는 창이 뜨는 군요.

한글을 아신다면 충분히 이해 하시리라 생각합니다.

(혹시 모르겠다면 주위의 어른분들에게 물어보세요 -.-;;;)

설정을 마치면 다음 버튼을 눌러줍니다.

사용자 삽입 이미지


비밀번호 방식을 선택하셨다면 암호를 넣어주시면 되고...

이제 경로를 지정합니다.

찾기 버튼을 눌러 내가 공유할 파일이 있는 폴더를 지정합니다.

공유이름은 알아서 지어 주시고...

설명도 알아서...

권한은 방문한 사람이 받아가기만 할 것이냐 올리기만 할것이냐 둘다 할것이냐 입니다만...

대부분은 다운로드겠지요...

사용용도에 따라서 지정해 줍니다.

사용자 삽입 이미지

제대로 설정이 되었다고 나오는 군요.

하나의 폴더가 아닌 여러개의 폴더를 공유하시고 싶으시면 다음을...

하나면 충분해 하시면 마침을 누르시면 됩니다.

넘넘 자세한 설명이라 모두들 이해하실듯...(명강의 (ㅠ.ㅠ)b)

그럼 질문 사항이 있으시면 방명록이나 덧글에 달아주세요^^

좋은 하루 보내세요
TRACKBACK 0 AND COMMENT 0

#include <windows.h>

// WinMain()함수에서 참조하므로 함수 원형을 선언한다.
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);

int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPreInstance, LPSTR lpCmdLine, int nShowCmd)
{
 HWND hwnd;
 MSG msg;
 WNDCLASS wndclass;

 // 윈도우 클래스를 초기화하고 운영체제에 등록한다.
 wndclass.style = CS_HREDRAW | CS_VREDRAW;
 wndclass.lpfnWndProc = WndProc;
 wndclass.cbClsExtra = 0;
 wndclass.cbWndExtra = 0;
 wndclass.hInstance = hInstance;
 wndclass.hIcon = LoadIcon(NULL, IDI_APPLICATION);
 wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
 wndclass.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
 wndclass.lpszMenuName = NULL;
 wndclass.lpszClassName = "HelloClass";

 if(!RegisterClass(&wndclass))
 {
  return -1;
 }

 // 윈도우를 생성하고 화면에 보이게 한다.
 hwnd = CreateWindow("HelloClass", "Hello SDK Application", WS_OVERLAPPEDWINDOW, CW_USEDEFAULT,
   CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, hInstance, NULL);
 ShowWindow(hwnd, nShowCmd);
 UpdateWindow(hwnd);

 // 메세지 대기열에서 메시지를 하나씩 꺼내 처리한다.
 while(GetMessage(&msg, NULL, 0, 0) > 0)
 {
  TranslateMessage(&msg);
  DispatchMessage(&msg);
 }

 return msg.wParam;
}

LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
 HDC hdc;
 PAINTSTRUCT ps;
 char *str = "Hello SDK";

 // 메시지 종류에 따라 응용 프로그램이 적절히 처리한다.
 switch(message)
 {
 case WM_CREATE :
  return 0;
 case WM_PAINT :
  hdc = BeginPaint(hwnd, &ps);
  TextOut(hdc, 100, 100, str, lstrlen(str));
  EndPaint(hwnd, &ps);
  return 0;
 case WM_LBUTTONDOWN :
  MessageBox(hwnd, "마우스를 클릭했습니다.", "마우스 메세지", MB_OK);
  return 0;
 case WM_DESTROY :
  PostQuitMessage(0);
  return 0;
 }

 // 응용프로그램이 처리하지 않으면 윈도우 운영체제가 처리한다.
 return DefWindowProc(hwnd, message, wParam, lParam);
}

TRACKBACK 0 AND COMMENT 0

ARTICLE CATEGORY

딸기 이야기 (254)
딸기의 혼잣말 (55)
딸기 호감 사이트 (2)
딸기의 사진 (16)
딸기 리뷰 (15)
딸기 공부방 (113)
딸기 자료실 (52)

CALENDAR

«   2008/10   »
      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  

ARCHIVE