//
// 住所などから緯度・経度を求める
//
// @copyright	(c)studio pahoo
// @author		パパぱふぅ
//

#include <windows.h>
#include <commctrl.h>
#include <richedit.h>
#include "resource.h"

//
// アプリケーション・ダイアログ
//
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_MAIN DIALOGEX 0, 0, 260, 240
STYLE DS_SETFONT | WS_CAPTION | WS_VISIBLE | WS_SYSMENU | WS_MINIMIZEBOX
CAPTION "住所などから緯度・経度を求める"
MENU IDR_MENU
FONT 10, "MS UI Gothic", 0, 0, 1
{
	LTEXT		"住所またはキーワード", IDC_TEXT_QUERY, 10, 10, 80, 15, NOT WS_GROUP | SS_LEFT, WS_EX_LEFT
	CONTROL		"", IDC_EDIT_QUERY, RICHEDIT_CLASS, WS_TABSTOP | WS_BORDER | ES_MULTILINE | ES_WANTRETURN | ES_NOHIDESEL, 80, 10, 160, 15, WS_EX_LEFT
	DEFPUSHBUTTON	"検索", IDC_BUTTON_EXEC, 80, 30, 30, 15, 0, WS_EX_LEFT
	PUSHBUTTON	"リセット", IDC_BUTTON_RESET, 120, 30, 30, 15, 0, WS_EX_LEFT
	LTEXT		"緯度", IDC_TEXT_LATITUDE, 10, 60, 80, 15, NOT WS_GROUP | SS_LEFT, WS_EX_LEFT
	CONTROL		"", IDC_EDIT_LATITUDE, RICHEDIT_CLASS, WS_TABSTOP | WS_BORDER | ES_MULTILINE | ES_WANTRETURN | ES_NOHIDESEL, 80, 60, 160, 15, WS_EX_LEFT
	LTEXT		"経度", IDC_TEXT_LONGITUDE, 10, 80, 80, 15, NOT WS_GROUP | SS_LEFT, WS_EX_LEFT
	CONTROL		"", IDC_EDIT_LONGITUDE, RICHEDIT_CLASS, WS_TABSTOP | WS_BORDER | ES_MULTILINE | ES_WANTRETURN | ES_NOHIDESEL, 80, 80, 160, 15, WS_EX_LEFT
	LTEXT		"住所", IDC_TEXT_ADDRESS, 10, 100, 80, 15, NOT WS_GROUP | SS_LEFT, WS_EX_LEFT
	CONTROL		"", IDC_EDIT_ADDRESS, RICHEDIT_CLASS, WS_TABSTOP | WS_BORDER | ES_MULTILINE | ES_WANTRETURN | ES_NOHIDESEL, 80, 100, 160, 30, WS_EX_LEFT
	LTEXT		"WebAPI", IDC_TEXT_WEBAPI, 10, 140, 80, 15, NOT WS_GROUP | SS_LEFT, WS_EX_LEFT
	CONTROL		"", IDC_EDIT_WEBAPI, RICHEDIT_CLASS, WS_TABSTOP | WS_BORDER | ES_MULTILINE | ES_WANTRETURN | ES_NOHIDESEL, 80, 140, 160, 60, WS_EX_LEFT
	PUSHBUTTON	"コピー", IDC_BUTTON_COPY, 80, 210, 30, 15, 0, WS_EX_LEFT
	PUSHBUTTON	"保存", IDC_BUTTON_SAVE, 120, 210, 30, 15, 0, WS_EX_LEFT
}

//
// メニュー
//
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDR_MENU MENU {
	POPUP "ファイル(&F)" {
		MENUITEM "検索(&N)", IDM_EXEC
		MENUITEM "保存(&S)", IDM_SAVE
		MENUITEM "終了(&Q)", IDM_QUIT
	}
	POPUP "編集(&E)" {
		MENUITEM "コピー(&C)", IDM_COPY
		MENUITEM "リセット(&X)", IDM_RESET
	}
	POPUP "ヘルプ(&H)" {
		MENUITEM "ヘルプ(&H)", IDM_HELP
		MENUITEM "バージョン情報(&V)", IDM_VERSION
		MENUITEM "Google APIキー保存", IDM_GOOGLE_APIKEY
		MENUITEM "Yahoo! アプリケーションID保存", IDM_YAHOO_APIKEY
		MENUITEM SEPARATOR
		MENUITEM "設定クリア＋終了", IDM_CLEAR_PARAMETER
		MENUITEM SEPARATOR
		MENUITEM "技術情報サイト(&P)", IDM_PAHOO
	}
}

//
// バージョン・ダイアログ
//
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_DIALOG_VER DIALOG 0, 0, 260, 230
STYLE DS_3DLOOK | DS_CENTER | DS_MODALFRAME | WS_CAPTION | WS_VISIBLE | WS_POPUP | WS_SYSMENU
CAPTION "バージョン情報"
FONT 10, "MS UI Gothic"
{
	LTEXT			"", IDC_TEXT_HELP, 10, 10, 240, 200, SS_LEFT, WS_EX_LEFT
	DEFPUSHBUTTON	"OK", IDC_BUTTON_OK, 95, 205, 50, 14, 0, WS_EX_LEFT
}

//
// Google APIキー入力ダイアログ
//
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_DIALOG_GOOGLE_APIKEY DIALOG 0, 0, 200, 90
STYLE DS_3DLOOK | DS_CENTER | DS_MODALFRAME | WS_CAPTION | WS_VISIBLE | WS_POPUP | WS_SYSMENU
CAPTION "Google APIキー入力"
FONT 10, "MS UI Gothic"
{
	LTEXT			"", IDC_TEXT_APIKEY, 10, 10, 180, 15, SS_LEFT, WS_EX_LEFT
	CONTROL			"", IDC_EDIT_APIKEY, RICHEDIT_CLASS, WS_TABSTOP | WS_BORDER | ES_MULTILINE | ES_WANTRETURN | ES_NOHIDESEL, 10, 30, 180, 15, WS_EX_LEFT
	DEFPUSHBUTTON	"保存", IDC_BUTTON_APIKEY_SAVE, 20, 60, 40, 14, 0, WS_EX_LEFT
	DEFPUSHBUTTON	"削除", IDC_BUTTON_APIKEY_DELETE, 80, 60, 40, 14, 0, WS_EX_LEFT
	PUSHBUTTON	"キャンセル", IDC_BUTTON_APIKEY_CANCEL, 140, 60, 40, 14, 0, WS_EX_LEFT
}

//
// Yahoo!アプリケーションID 入力ダイアログ
//
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_DIALOG_YAHOO_APIKEY DIALOG 0, 0, 200, 90
STYLE DS_3DLOOK | DS_CENTER | DS_MODALFRAME | WS_CAPTION | WS_VISIBLE | WS_POPUP | WS_SYSMENU
CAPTION "Yahoo!アプリケーションID 入力"
FONT 10, "MS UI Gothic"
{
	LTEXT			"", IDC_TEXT_APIKEY, 10, 10, 180, 15, SS_LEFT, WS_EX_LEFT
	CONTROL			"", IDC_EDIT_APIKEY, RICHEDIT_CLASS, WS_TABSTOP | WS_BORDER | ES_MULTILINE | ES_WANTRETURN | ES_NOHIDESEL, 10, 30, 180, 15, WS_EX_LEFT
	DEFPUSHBUTTON	"保存", IDC_BUTTON_APIKEY_SAVE, 20, 60, 40, 14, 0, WS_EX_LEFT
	DEFPUSHBUTTON	"削除", IDC_BUTTON_APIKEY_DELETE, 80, 60, 40, 14, 0, WS_EX_LEFT
	PUSHBUTTON	"キャンセル", IDC_BUTTON_APIKEY_CANCEL, 140, 60, 40, 14, 0, WS_EX_LEFT
}

//
// アイコン
//
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDI_ICON	ICON	".\\application.ico"
