[475] | 1 | #include "stdafx.h"
|
---|
| 2 |
|
---|
[3] | 3 | #include "Common.h"
|
---|
| 4 |
|
---|
| 5 | #if defined(JPN)
|
---|
| 6 | //日本語
|
---|
| 7 | #include "rad_msg_jpn.h"
|
---|
| 8 | #else
|
---|
| 9 | //英語
|
---|
| 10 | #include "rad_msg_eng.h"
|
---|
| 11 | #endif
|
---|
| 12 |
|
---|
| 13 | void ShowControlAdvice(int Control){
|
---|
| 14 | if(Control==IDC_TOOL_MOUSE) SetStatusText("");
|
---|
| 15 |
|
---|
| 16 | #if defined(JPN)
|
---|
| 17 | //日本語
|
---|
| 18 | else if(Control==IDC_TOOL_BUTTON) SetStatusText("[ボタン] クリックすることができるボタンです。");
|
---|
| 19 | else if(Control==IDC_TOOL_CHECKBOX) SetStatusText("[チェック ボックス] ON/OFFの設定ができるボタンです。");
|
---|
| 20 | else if(Control==IDC_TOOL_COMBOBOX) SetStatusText("[コンボ ボックス] ドロップダウン リストの中から項目を選択することができます。");
|
---|
| 21 | else if(Control==IDC_TOOL_EDIT) SetStatusText("[エディット ボックス] ユーザーが文字列の編集操作を行うことができます。");
|
---|
| 22 | else if(Control==IDC_TOOL_GROUPBOX) SetStatusText("[グループ ボックス] 複数のコントロールを囲むことができます。");
|
---|
| 23 | else if(Control==IDC_TOOL_HSCROLLBAR) SetStatusText("[水平スクロールバー] 現在位置を表示、設定します。");
|
---|
| 24 | else if(Control==IDC_TOOL_IMAGEBOX) SetStatusText("[イメージ ボックス] 四角形やビットマップ、アイコンを表示します。");
|
---|
| 25 | else if(Control==IDC_TOOL_LISTBOX) SetStatusText("[リスト ボックス] 複数の項目を表示、選択できるリストです。");
|
---|
| 26 | else if(Control==IDC_TOOL_LISTVIEW) SetStatusText("[リスト ビュー] リスト ボックス内にアイコンやテキストを並べて表示するビューです。");
|
---|
| 27 | else if(Control==IDC_TOOL_PROGRESSBAR) SetStatusText("[プログレス バー] 進行状況を表示するバー。");
|
---|
| 28 | else if(Control==IDC_TOOL_RADIOBUTTON) SetStatusText("[ラジオ ボタン] 複数の項目から1つを選択するボタンです。");
|
---|
| 29 | else if(Control==IDC_TOOL_STATIC) SetStatusText("[スタティック テキスト] テキストを表示します。");
|
---|
| 30 | else if(Control==IDC_TOOL_TRACKBAR) SetStatusText("[トラック バー] 目盛が付いた移動バー。");
|
---|
| 31 | else if(Control==IDC_TOOL_TREEVIEW) SetStatusText("[ツリー ビュー] リストを階層構造で表示します。");
|
---|
| 32 | else if(Control==IDC_TOOL_UPDOWN) SetStatusText("[アップ ダウン コントロール] 上下のボタンで数値を設定します。");
|
---|
| 33 | else if(Control==IDC_TOOL_VSCROLLBAR) SetStatusText("[垂直スクロールバー] 現在位置を表示、設定します。");
|
---|
| 34 | #else
|
---|
| 35 | //英語
|
---|
| 36 | else if(Control==IDC_TOOL_BUTTON) SetStatusText("[Button] The button which can be clicked");
|
---|
| 37 | else if(Control==IDC_TOOL_CHECKBOX) SetStatusText("[CheckBox] The button which can switch on/off");
|
---|
| 38 | else if(Control==IDC_TOOL_COMBOBOX) SetStatusText("[ComboBox] Choose an item from drop down lists");
|
---|
| 39 | else if(Control==IDC_TOOL_EDIT) SetStatusText("[EditBox] A user can edit a character sequence");
|
---|
| 40 | else if(Control==IDC_TOOL_GROUPBOX) SetStatusText("[GroupBox] Two or more control can be packed");
|
---|
| 41 | else if(Control==IDC_TOOL_HSCROLLBAR) SetStatusText("[Horizontal Scrollbar] The present position is displayed and setup");
|
---|
| 42 | else if(Control==IDC_TOOL_IMAGEBOX) SetStatusText("[ImageBox] A rectangle, a bitmap, and an icon are displayed.");
|
---|
| 43 | else if(Control==IDC_TOOL_LISTBOX) SetStatusText("[ListBox] The list which can display and choose two or more items");
|
---|
| 44 | else if(Control==IDC_TOOL_LISTVIEW) SetStatusText("[ListView] The view which displays an icon and a text in a list box");
|
---|
| 45 | else if(Control==IDC_TOOL_PROGRESSBAR) SetStatusText("[Progressbar] The bar which displays an advance situation");
|
---|
| 46 | else if(Control==IDC_TOOL_RADIOBUTTON) SetStatusText("[RadioButton] The button which chooses one from two or more items");
|
---|
| 47 | else if(Control==IDC_TOOL_STATIC) SetStatusText("[StaticText] Display the text messages");
|
---|
| 48 | else if(Control==IDC_TOOL_TRACKBAR) SetStatusText("[Trackbar] The bar to which the scale was attached");
|
---|
| 49 | else if(Control==IDC_TOOL_TREEVIEW) SetStatusText("[TreeView] Lists are displayed by the layered structure");
|
---|
| 50 | else if(Control==IDC_TOOL_UPDOWN) SetStatusText("[Up/Down Control] A numerical value is set up with a up/down button");
|
---|
| 51 | else if(Control==IDC_TOOL_VSCROLLBAR) SetStatusText("[Vertical Scrollbar] The present position is displayed and setup");
|
---|
| 52 | #endif
|
---|
| 53 | }
|
---|
| 54 |
|
---|
| 55 | char *GetControlName(DWORD id){
|
---|
| 56 | char *pTemp;
|
---|
| 57 | pTemp="";
|
---|
| 58 |
|
---|
| 59 | #if defined(JPN)
|
---|
| 60 | //日本語
|
---|
| 61 | if(id==IDC_TOOL_MOUSE) pTemp="選択";
|
---|
| 62 | else if(id==IDC_TOOL_STATIC) pTemp="スタティック テキスト";
|
---|
| 63 | else if(id==IDC_TOOL_EDIT) pTemp="エディット ボックス";
|
---|
| 64 | else if(id==IDC_TOOL_GROUPBOX) pTemp="グループ ボックス";
|
---|
| 65 | else if(id==IDC_TOOL_COMBOBOX) pTemp="コンボ ボックス";
|
---|
| 66 | else if(id==IDC_TOOL_LISTBOX) pTemp="リスト ボックス";
|
---|
| 67 | else if(id==IDC_TOOL_BUTTON) pTemp="ボタン";
|
---|
| 68 | else if(id==IDC_TOOL_CHECKBOX) pTemp="チェック ボックス";
|
---|
| 69 | else if(id==IDC_TOOL_RADIOBUTTON) pTemp="ラジオ ボタン";
|
---|
| 70 | else if(id==IDC_TOOL_LISTVIEW) pTemp="リスト ビュー";
|
---|
| 71 | else if(id==IDC_TOOL_TREEVIEW) pTemp="ツリー ビュー";
|
---|
| 72 | else if(id==IDC_TOOL_HSCROLLBAR) pTemp="水平スクロール バー";
|
---|
| 73 | else if(id==IDC_TOOL_VSCROLLBAR) pTemp="垂直スクロール バー";
|
---|
| 74 | else if(id==IDC_TOOL_UPDOWN) pTemp="アップ ダウン コントロール";
|
---|
| 75 | else if(id==IDC_TOOL_IMAGEBOX) pTemp="イメージ ボックス";
|
---|
| 76 | else if(id==IDC_TOOL_TRACKBAR) pTemp="トラック バー";
|
---|
| 77 | else if(id==IDC_TOOL_PROGRESSBAR) pTemp="プログレス バー";
|
---|
| 78 | #else
|
---|
| 79 | //英語
|
---|
| 80 | if(id==IDC_TOOL_MOUSE) pTemp="Tool";
|
---|
| 81 | else if(id==IDC_TOOL_STATIC) pTemp="StaticText";
|
---|
| 82 | else if(id==IDC_TOOL_EDIT) pTemp="EditBox";
|
---|
| 83 | else if(id==IDC_TOOL_GROUPBOX) pTemp="GroupBox";
|
---|
| 84 | else if(id==IDC_TOOL_COMBOBOX) pTemp="ComboBox";
|
---|
| 85 | else if(id==IDC_TOOL_LISTBOX) pTemp="ListBox";
|
---|
| 86 | else if(id==IDC_TOOL_BUTTON) pTemp="Button";
|
---|
| 87 | else if(id==IDC_TOOL_CHECKBOX) pTemp="CheckBox";
|
---|
| 88 | else if(id==IDC_TOOL_RADIOBUTTON) pTemp="RadioButton";
|
---|
| 89 | else if(id==IDC_TOOL_LISTVIEW) pTemp="ListView";
|
---|
| 90 | else if(id==IDC_TOOL_TREEVIEW) pTemp="TreeView";
|
---|
| 91 | else if(id==IDC_TOOL_HSCROLLBAR) pTemp="Horizontal Scrollbar";
|
---|
| 92 | else if(id==IDC_TOOL_VSCROLLBAR) pTemp="Vertical Scrollbar";
|
---|
| 93 | else if(id==IDC_TOOL_UPDOWN) pTemp="Up/Down Control";
|
---|
| 94 | else if(id==IDC_TOOL_IMAGEBOX) pTemp="ImageBox";
|
---|
| 95 | else if(id==IDC_TOOL_TRACKBAR) pTemp="Trackbar";
|
---|
| 96 | else if(id==IDC_TOOL_PROGRESSBAR) pTemp="Progressbar";
|
---|
| 97 | #endif
|
---|
| 98 |
|
---|
| 99 | return pTemp;
|
---|
| 100 | }
|
---|
| 101 | BOOL CALLBACK RadToolButtonsProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
| 102 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 103 | extern PROJECTINFO ProjectInfo;
|
---|
| 104 | int i,i2,WndNum;
|
---|
| 105 | HWND hParent;
|
---|
| 106 | HWND hToolBar;
|
---|
| 107 | RECT rect;
|
---|
| 108 | TBBUTTON CtrlToolBar[]={
|
---|
| 109 | {0,IDC_TOOL_MOUSE,TBSTATE_ENABLED|TBSTATE_WRAP|TBSTATE_CHECKED,TBSTYLE_CHECKGROUP,0,0},
|
---|
| 110 | {1,IDC_TOOL_STATIC,TBSTATE_ENABLED,TBSTYLE_CHECKGROUP,0,0},
|
---|
| 111 | {2,IDC_TOOL_EDIT,TBSTATE_ENABLED,TBSTYLE_CHECKGROUP,0,0},
|
---|
| 112 | {3,IDC_TOOL_GROUPBOX,TBSTATE_ENABLED,TBSTYLE_CHECKGROUP,0,0},
|
---|
| 113 | {BMPNUM_RADTOOLBAR-1,0,TBSTATE_INDETERMINATE,TBSTYLE_CHECKGROUP,0,0},
|
---|
| 114 | {4,IDC_TOOL_COMBOBOX,TBSTATE_ENABLED,TBSTYLE_CHECKGROUP,0,0},
|
---|
| 115 | {5,IDC_TOOL_LISTBOX,TBSTATE_ENABLED|TBSTATE_WRAP,TBSTYLE_CHECKGROUP,0,0},
|
---|
| 116 | {6,IDC_TOOL_BUTTON,TBSTATE_ENABLED,TBSTYLE_CHECKGROUP,0,0},
|
---|
| 117 | {7,IDC_TOOL_CHECKBOX,TBSTATE_ENABLED,TBSTYLE_CHECKGROUP,0,0},
|
---|
| 118 | {8,IDC_TOOL_RADIOBUTTON,TBSTATE_ENABLED,TBSTYLE_CHECKGROUP,0,0},
|
---|
| 119 | {BMPNUM_RADTOOLBAR-1,0,TBSTATE_INDETERMINATE,TBSTYLE_CHECKGROUP,0,0},
|
---|
| 120 | {9,IDC_TOOL_LISTVIEW,TBSTATE_ENABLED,TBSTYLE_CHECKGROUP,0,0},
|
---|
| 121 | {10,IDC_TOOL_TREEVIEW,TBSTATE_ENABLED|TBSTATE_WRAP,TBSTYLE_CHECKGROUP,0,0},
|
---|
| 122 | {11,IDC_TOOL_HSCROLLBAR,TBSTATE_ENABLED,TBSTYLE_CHECKGROUP,0,0},
|
---|
| 123 | {12,IDC_TOOL_VSCROLLBAR,TBSTATE_ENABLED,TBSTYLE_CHECKGROUP,0,0},
|
---|
| 124 | {13,IDC_TOOL_UPDOWN,TBSTATE_ENABLED,TBSTYLE_CHECKGROUP,0,0},
|
---|
| 125 | {BMPNUM_RADTOOLBAR-1,0,TBSTATE_INDETERMINATE,TBSTYLE_CHECKGROUP,0,0},
|
---|
| 126 | {14,IDC_TOOL_IMAGEBOX,TBSTATE_ENABLED|TBSTATE_WRAP,TBSTYLE_CHECKGROUP,0,0},
|
---|
| 127 | {15,IDC_TOOL_TRACKBAR,TBSTATE_ENABLED,TBSTYLE_CHECKGROUP,0,0},
|
---|
| 128 | {16,IDC_TOOL_PROGRESSBAR,TBSTATE_ENABLED,TBSTYLE_CHECKGROUP,0,0},
|
---|
| 129 | };
|
---|
| 130 | TOOLTIPTEXT *pTipText;
|
---|
| 131 |
|
---|
| 132 | switch(message){
|
---|
| 133 | case WM_INITDIALOG:
|
---|
| 134 | hToolBar=CreateToolbarEx(hwnd,WS_CHILD|WS_VISIBLE|CCS_NODIVIDER|TBSTYLE_FLAT|TBSTYLE_TOOLTIPS,
|
---|
| 135 | NULL,
|
---|
| 136 | BMPNUM_RADTOOLBAR, /*ビットマップの個数*/
|
---|
| 137 | hResInst,(unsigned int)MAKEINTRESOURCE(IDR_CONTROL),CtrlToolBar,
|
---|
| 138 | (BMPNUM_RADTOOLBAR-1)+SEPNUM_RADTOOLBAR, /*アイテムの個数*/
|
---|
| 139 | 0,0,16,15,sizeof(TBBUTTON));
|
---|
| 140 |
|
---|
| 141 | //Windows9x系OSでの不具合を防ぐため
|
---|
| 142 | PostMessage(hwnd,WM_USER+120,0,0);
|
---|
| 143 |
|
---|
| 144 | break;
|
---|
| 145 | case WM_USER+120:
|
---|
| 146 | GetClientRect(hwnd,&rect);
|
---|
| 147 | MoveWindow(hwnd,5,22,rect.right,rect.bottom,1);
|
---|
| 148 | MoveWindow(GetWindow(hwnd,GW_CHILD),0,0,rect.right,rect.bottom,1);
|
---|
| 149 | return 1;
|
---|
| 150 | case WM_COMMAND:
|
---|
| 151 | switch(LOWORD(wParam)){
|
---|
| 152 | case IDC_TOOL_MOUSE:
|
---|
| 153 | ShowControlAdvice(LOWORD(wParam));
|
---|
| 154 | hParent=GetParent(GetParent(hwnd));
|
---|
| 155 | BringWindowToTop(hParent);
|
---|
| 156 | i=GetWndNum(hParent);
|
---|
| 157 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 158 | MdiInfo[i].MdiRadInfo->ButtonSelect=IDC_TOOL_MOUSE;
|
---|
| 159 | DrawSelectingRect(MdiInfo[i].MdiRadInfo->hRad,i,i2,IDC_TOOL_MOUSE);
|
---|
| 160 | SetFocus(MdiInfo[i].MdiRadInfo->hRad);
|
---|
| 161 | return 1;
|
---|
| 162 | case IDC_TOOL_BUTTON:
|
---|
| 163 | case IDC_TOOL_CHECKBOX:
|
---|
| 164 | case IDC_TOOL_COMBOBOX:
|
---|
| 165 | case IDC_TOOL_EDIT:
|
---|
| 166 | case IDC_TOOL_GROUPBOX:
|
---|
| 167 | case IDC_TOOL_HSCROLLBAR:
|
---|
| 168 | case IDC_TOOL_IMAGEBOX:
|
---|
| 169 | case IDC_TOOL_LISTBOX:
|
---|
| 170 | case IDC_TOOL_LISTVIEW:
|
---|
| 171 | case IDC_TOOL_PROGRESSBAR:
|
---|
| 172 | case IDC_TOOL_RADIOBUTTON:
|
---|
| 173 | case IDC_TOOL_STATIC:
|
---|
| 174 | case IDC_TOOL_TRACKBAR:
|
---|
| 175 | case IDC_TOOL_TREEVIEW:
|
---|
| 176 | case IDC_TOOL_UPDOWN:
|
---|
| 177 | case IDC_TOOL_VSCROLLBAR:
|
---|
| 178 | ShowControlAdvice(LOWORD(wParam));
|
---|
| 179 | hParent=GetParent(GetParent(hwnd));
|
---|
| 180 | BringWindowToTop(hParent);
|
---|
| 181 | WndNum=GetWndNum(hParent);
|
---|
| 182 | MdiInfo[WndNum].MdiRadInfo->ButtonSelect=LOWORD(wParam);
|
---|
| 183 | InvalidateRect(MdiInfo[WndNum].MdiRadInfo->hRad,NULL,0);
|
---|
| 184 | return 1;
|
---|
| 185 | }
|
---|
| 186 | break;
|
---|
| 187 | case WM_NOTIFY:
|
---|
| 188 | pTipText=(TOOLTIPTEXT *)lParam;
|
---|
| 189 | if(pTipText->hdr.code==TTN_NEEDTEXT){
|
---|
| 190 | //ステータスバーに説明文を表示
|
---|
| 191 | ShowControlAdvice(pTipText->hdr.idFrom);
|
---|
| 192 |
|
---|
| 193 | //コントロール名を取得し、ツールヒントとして表示する
|
---|
| 194 | pTipText->lpszText=GetControlName(pTipText->hdr.idFrom);
|
---|
| 195 | }
|
---|
| 196 | break;
|
---|
| 197 | }
|
---|
| 198 | return 0;
|
---|
| 199 | }
|
---|
| 200 | LRESULT CALLBACK RadToolsWindow(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
| 201 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 202 | extern PROJECTINFO ProjectInfo;
|
---|
| 203 | extern HFONT hStatusFont;
|
---|
| 204 | int i;
|
---|
| 205 | RECT rect;
|
---|
| 206 | SCROLLINFO ScrollInfo;
|
---|
| 207 | HDC hdc;
|
---|
| 208 | PAINTSTRUCT ps;
|
---|
| 209 | HFONT hOldFont;
|
---|
| 210 | POINT pos;
|
---|
| 211 |
|
---|
| 212 | switch(message){
|
---|
| 213 | case WM_CREATE:
|
---|
| 214 | CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_CTRLBUTTONS),hwnd,(DLGPROC)RadToolButtonsProc);
|
---|
| 215 | return 0;
|
---|
| 216 | case WM_VSCROLL:
|
---|
| 217 | ScrollInfo.cbSize=sizeof(SCROLLINFO);
|
---|
| 218 | ScrollInfo.fMask=SIF_POS|SIF_PAGE|SIF_RANGE;
|
---|
| 219 | GetScrollInfo(hwnd,SB_VERT,&ScrollInfo);
|
---|
| 220 | if(LOWORD(wParam)==SB_LINEUP) i=-20;
|
---|
| 221 | else if(LOWORD(wParam)==SB_LINEDOWN) i=20;
|
---|
| 222 | else if(LOWORD(wParam)==SB_PAGEUP) i=-(signed int)ScrollInfo.nPage;
|
---|
| 223 | else if(LOWORD(wParam)==SB_PAGEDOWN) i=ScrollInfo.nPage;
|
---|
| 224 | else if(LOWORD(wParam)==SB_THUMBTRACK) i=HIWORD(wParam)-ScrollInfo.nPos;
|
---|
| 225 | else i=0;
|
---|
| 226 | GetClientRect(hwnd,&rect);
|
---|
| 227 | i=max(-ScrollInfo.nPos,min(i,ScrollInfo.nMax-rect.bottom-ScrollInfo.nPos));
|
---|
| 228 | if(i!=0){
|
---|
| 229 | ScrollInfo.nPos+=i;
|
---|
| 230 | SetScrollInfo(hwnd,SB_VERT,&ScrollInfo,1);
|
---|
| 231 | ScrollWindow(hwnd,0,-i,NULL,NULL);
|
---|
| 232 | UpdateWindow(hwnd);
|
---|
| 233 | }
|
---|
| 234 | return 0;
|
---|
| 235 | case WM_SIZE:
|
---|
| 236 | GetClientRect(GetWindow(hwnd,GW_CHILD),&rect);
|
---|
| 237 | ScrollInfo.cbSize=sizeof(SCROLLINFO);
|
---|
| 238 | ScrollInfo.fMask=SIF_PAGE|SIF_RANGE|SIF_POS;
|
---|
| 239 |
|
---|
| 240 | //垂直スクロールバーの設定
|
---|
| 241 | GetScrollInfo(hwnd,SB_VERT,&ScrollInfo);
|
---|
| 242 | ScrollInfo.nMin=0;
|
---|
| 243 | ScrollInfo.nMax=rect.bottom;
|
---|
| 244 | ScrollInfo.nPage=HIWORD(lParam);
|
---|
| 245 | SetScrollInfo(hwnd,SB_VERT,&ScrollInfo,1);
|
---|
| 246 |
|
---|
| 247 | i=ScrollInfo.nPos;
|
---|
| 248 | ScrollInfo.fMask=SIF_POS;
|
---|
| 249 | GetScrollInfo(hwnd,SB_VERT,&ScrollInfo);
|
---|
| 250 | if(i>ScrollInfo.nPos){
|
---|
| 251 | ScrollWindow(hwnd,0,i-ScrollInfo.nPos,NULL,NULL);
|
---|
| 252 | UpdateWindow(hwnd);
|
---|
| 253 | }
|
---|
| 254 | return 0;
|
---|
| 255 | case WM_PAINT:
|
---|
| 256 | hdc=BeginPaint(hwnd,&ps);
|
---|
| 257 | hOldFont=(HFONT)SelectObject(hdc,hStatusFont);
|
---|
| 258 | SetBkMode(hdc,TRANSPARENT);
|
---|
| 259 | pos.x=30;
|
---|
| 260 | pos.y=3;
|
---|
| 261 | CursorPos_GlobalToLocal(hwnd,&pos.x,&pos.y);
|
---|
| 262 | #if defined(JPN)
|
---|
| 263 | //日本語
|
---|
| 264 | TextOut(hdc,pos.x,pos.y,"- コントロール -",lstrlen("- コントロール -"));
|
---|
| 265 | #else
|
---|
| 266 | //英語
|
---|
| 267 | TextOut(hdc,pos.x,pos.y,"- Control -",lstrlen("- Control -"));
|
---|
| 268 | #endif
|
---|
| 269 | SelectObject(hdc,hOldFont);
|
---|
| 270 | EndPaint(hwnd,&ps);
|
---|
| 271 | return 0;
|
---|
| 272 | }
|
---|
| 273 | return DefWindowProc(hwnd,message,wParam,lParam);
|
---|
| 274 | }
|
---|
| 275 |
|
---|
| 276 |
|
---|
| 277 | /////////////////////////
|
---|
| 278 | //ウィンドウ プロパティ
|
---|
| 279 |
|
---|
| 280 | void RadProperty_Window_Caption_StylingOrder(HWND hwnd,DWORD *style){
|
---|
| 281 | if((*style&WS_CAPTION)==WS_CAPTION){
|
---|
| 282 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_SYSMENU),1);
|
---|
| 283 | if(!(*style&WS_CHILD)){
|
---|
| 284 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_MINIMIZEBOX),1);
|
---|
| 285 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_MAXIMIZEBOX),1);
|
---|
| 286 | }
|
---|
| 287 | if(SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_GETCURSEL,0,0)==0){
|
---|
| 288 | if(*style&WS_THICKFRAME) SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_SETCURSEL,2,0);
|
---|
| 289 | else SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_SETCURSEL,1,0);
|
---|
| 290 | }
|
---|
| 291 | }
|
---|
| 292 | else{
|
---|
| 293 | *style&=~(WS_SYSMENU|WS_MINIMIZEBOX|WS_MAXIMIZEBOX);
|
---|
| 294 | SendDlgItemMessage(hwnd,IDC_STYLE_SYSMENU,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
| 295 | SendDlgItemMessage(hwnd,IDC_STYLE_MINIMIZEBOX,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
| 296 | SendDlgItemMessage(hwnd,IDC_STYLE_MAXIMIZEBOX,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
| 297 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_SYSMENU),0);
|
---|
| 298 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_MINIMIZEBOX),0);
|
---|
| 299 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_MAXIMIZEBOX),0);
|
---|
| 300 | }
|
---|
| 301 | }
|
---|
| 302 | void RadProperty_Window_Border_StylingOrder(HWND hwnd,DWORD *style){
|
---|
| 303 | if(*style&(WS_BORDER|WS_THICKFRAME)){
|
---|
| 304 | if(*style&(WS_POPUP|WS_CHILD)) EnableWindow(GetDlgItem(hwnd,IDC_STYLE_CAPTION),1);
|
---|
| 305 | else{
|
---|
| 306 | *style|=WS_CAPTION;
|
---|
| 307 | SendDlgItemMessage(hwnd,IDC_STYLE_CAPTION,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 308 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_CAPTION),0);
|
---|
| 309 | }
|
---|
| 310 | }
|
---|
| 311 | else{
|
---|
| 312 | *style&=~WS_CAPTION;
|
---|
| 313 | SendDlgItemMessage(hwnd,IDC_STYLE_CAPTION,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
| 314 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_CAPTION),0);
|
---|
| 315 | }
|
---|
| 316 | RadProperty_Window_Caption_StylingOrder(hwnd,style);
|
---|
| 317 | }
|
---|
| 318 | void RadProperty_Window_Window_StylingOrder(HWND hwnd,DWORD *style){
|
---|
| 319 | if(*style&WS_POPUP){
|
---|
| 320 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_CAPTION),1);
|
---|
| 321 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_MINIMIZEBOX),1);
|
---|
| 322 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_MAXIMIZEBOX),1);
|
---|
| 323 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_MINIMIZE),1);
|
---|
| 324 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_MAXIMIZE),1);
|
---|
| 325 | }
|
---|
| 326 | else if(*style&WS_CHILD){
|
---|
| 327 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_CAPTION),1);
|
---|
| 328 |
|
---|
| 329 | *style&=~(WS_MINIMIZEBOX|WS_MAXIMIZEBOX|WS_MINIMIZE|WS_MAXIMIZE);
|
---|
| 330 | SendDlgItemMessage(hwnd,IDC_STYLE_MINIMIZEBOX,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
| 331 | SendDlgItemMessage(hwnd,IDC_STYLE_MAXIMIZEBOX,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
| 332 | SendDlgItemMessage(hwnd,IDC_STYLE_MINIMIZE,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
| 333 | SendDlgItemMessage(hwnd,IDC_STYLE_MAXIMIZE,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
| 334 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_MINIMIZEBOX),0);
|
---|
| 335 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_MAXIMIZEBOX),0);
|
---|
| 336 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_MINIMIZE),0);
|
---|
| 337 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_MAXIMIZE),0);
|
---|
| 338 | }
|
---|
| 339 | else{
|
---|
| 340 | if(*style&WS_BORDER){
|
---|
| 341 | *style|=WS_CAPTION;
|
---|
| 342 | SendDlgItemMessage(hwnd,IDC_STYLE_CAPTION,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 343 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_CAPTION),0);
|
---|
| 344 |
|
---|
| 345 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_MINIMIZEBOX),1);
|
---|
| 346 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_MAXIMIZEBOX),1);
|
---|
| 347 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_MINIMIZE),1);
|
---|
| 348 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_MAXIMIZE),1);
|
---|
| 349 | }
|
---|
| 350 | }
|
---|
| 351 | RadProperty_Window_Border_StylingOrder(hwnd,style);
|
---|
| 352 | }
|
---|
| 353 | BOOL CALLBACK DlgRadProperty_Window_Rename(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
| 354 | extern HANDLE hHeap;
|
---|
| 355 | extern HWND hClient,hOwner;
|
---|
| 356 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 357 | extern PROJECTINFO ProjectInfo;
|
---|
[609] | 358 | int i,i3;
|
---|
[3] | 359 | char temporary[MAX_PATH],temp2[MAX_PATH];
|
---|
| 360 | switch(message){
|
---|
| 361 | case WM_INITDIALOG:
|
---|
[609] | 362 | {
|
---|
| 363 | SetPosCenter(hwnd);
|
---|
| 364 | i=GetWndNum(GetWindow(hClient,GW_CHILD));
|
---|
| 365 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
| 366 | sprintf(temporary,"h%s",pWindowInfo->name);
|
---|
| 367 | sprintf(temp2,"%sProc",pWindowInfo->name);
|
---|
| 368 | if(lstrcmp(temporary,pWindowInfo->HandleName)==0&&
|
---|
| 369 | lstrcmp(temp2,pWindowInfo->CallBackName)==0){
|
---|
| 370 | SendDlgItemMessage(hwnd,IDC_AUTOSET,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 371 | SendMessage(hwnd,WM_COMMAND,IDC_AUTOSET,0);
|
---|
| 372 | }
|
---|
| 373 | SetDlgItemText(hwnd,IDC_WINDOWNAME,pWindowInfo->name);
|
---|
| 374 | SetDlgItemText(hwnd,IDC_WINDOWHANDLE,pWindowInfo->HandleName);
|
---|
| 375 | SetDlgItemText(hwnd,IDC_WINDOWPROC,pWindowInfo->CallBackName);
|
---|
| 376 | break;
|
---|
[3] | 377 | }
|
---|
| 378 | case WM_COMMAND:
|
---|
| 379 | switch(LOWORD(wParam)){
|
---|
| 380 | case IDOK:
|
---|
[609] | 381 | {
|
---|
| 382 | if(GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWNAME))==0){
|
---|
| 383 | //MsgBox "ウィンドウ識別名を入力して下さい。"
|
---|
| 384 | MessageBox(hOwner,STRING_WINDOW_RENAME_MUST_WINDOWNAME,APPLICATION_NAME,MB_OK|MB_ICONEXCLAMATION);
|
---|
| 385 | break;
|
---|
| 386 | }
|
---|
| 387 | if(GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWHANDLE))==0){
|
---|
| 388 | //MsgBox "ハンドル名を入力して下さい。"
|
---|
| 389 | MessageBox(hOwner,STRING_WINDOW_RENAME_MUST_HANDLENAME,APPLICATION_NAME,MB_OK|MB_ICONEXCLAMATION);
|
---|
| 390 | break;
|
---|
| 391 | }
|
---|
| 392 | if(GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWPROC))==0){
|
---|
| 393 | //MsgBox "プロシージャ名を入力して下さい。"
|
---|
| 394 | MessageBox(hOwner,STRING_WINDOW_RENAME_MUST_PROCEDURENAME,APPLICATION_NAME,MB_OK|MB_ICONEXCLAMATION);
|
---|
| 395 | break;
|
---|
| 396 | }
|
---|
[3] | 397 |
|
---|
[609] | 398 | i=GetWndNum(GetWindow(hClient,GW_CHILD));
|
---|
| 399 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 400 |
|
---|
[609] | 401 | RAD_UNDOSTATE_NAME names,NoticeNames;
|
---|
| 402 | i3=GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWNAME))+1;
|
---|
| 403 | names.name=(char *)HeapAlloc(hHeap,0,i3);
|
---|
| 404 | GetDlgItemText(hwnd,IDC_WINDOWNAME,names.name,i3);
|
---|
[3] | 405 |
|
---|
[609] | 406 | i3=GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWHANDLE))+1;
|
---|
| 407 | names.HandleName=(char *)HeapAlloc(hHeap,0,i3);
|
---|
| 408 | GetDlgItemText(hwnd,IDC_WINDOWHANDLE,names.HandleName,i3);
|
---|
[3] | 409 |
|
---|
[609] | 410 | i3=GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWPROC))+1;
|
---|
| 411 | names.CallBackName=(char *)HeapAlloc(hHeap,0,i3);
|
---|
| 412 | GetDlgItemText(hwnd,IDC_WINDOWPROC,names.CallBackName,i3);
|
---|
[3] | 413 |
|
---|
[609] | 414 | if(lstrcmp(names.name,pWindowInfo->name)==0&&
|
---|
| 415 | lstrcmp(names.HandleName,pWindowInfo->HandleName)==0&&
|
---|
| 416 | lstrcmp(names.CallBackName,pWindowInfo->CallBackName)==0){
|
---|
| 417 | HeapDefaultFree(names.name);
|
---|
| 418 | HeapDefaultFree(names.HandleName);
|
---|
| 419 | HeapDefaultFree(names.CallBackName);
|
---|
| 420 | SendMessage(hwnd,WM_COMMAND,IDCANCEL,0);
|
---|
| 421 | return 1;
|
---|
| 422 | }
|
---|
[3] | 423 |
|
---|
[609] | 424 | //MsgBox "これらのウィンドウ識別名を変更すると、ソースコード内の識別子は手動で変換する必要があります。変更しますか?"
|
---|
| 425 | if(IDCANCEL==MessageBox(hwnd,STRING_WINDOW_RENAME_CHECK,APPLICATION_NAME,MB_OKCANCEL|MB_ICONEXCLAMATION)) return 1;
|
---|
[3] | 426 |
|
---|
[609] | 427 | //変更情報を更新
|
---|
| 428 | NoticeNames.name=pWindowInfo->name;
|
---|
| 429 | NoticeNames.HandleName=pWindowInfo->HandleName;
|
---|
| 430 | NoticeNames.CallBackName=pWindowInfo->CallBackName;
|
---|
| 431 | Rad_NoticeChanging(i,RAD_UNDO_NAME,SELECT_WINDOW,(DWORD)&NoticeNames);
|
---|
[3] | 432 |
|
---|
[609] | 433 | HeapDefaultFree(pWindowInfo->name);
|
---|
| 434 | pWindowInfo->name=names.name;
|
---|
| 435 | GlobalFree(MdiInfo[i].path);
|
---|
| 436 | MdiInfo[i].path=(char *)GlobalAlloc(GMEM_FIXED,lstrlen(names.name));
|
---|
| 437 | lstrcpy(MdiInfo[i].path,names.name);
|
---|
[3] | 438 |
|
---|
[609] | 439 | HeapDefaultFree(pWindowInfo->HandleName);
|
---|
| 440 | pWindowInfo->HandleName=names.HandleName;
|
---|
[3] | 441 |
|
---|
[609] | 442 | HeapDefaultFree(pWindowInfo->CallBackName);
|
---|
| 443 | pWindowInfo->CallBackName=names.CallBackName;
|
---|
[3] | 444 |
|
---|
[609] | 445 | EndDialog(hwnd,1);
|
---|
| 446 | return 1;
|
---|
| 447 | }
|
---|
[3] | 448 | case IDCANCEL:
|
---|
| 449 | EndDialog(hwnd,0);
|
---|
| 450 | return 1;
|
---|
| 451 | case IDC_WINDOWNAME:
|
---|
| 452 | if(HIWORD(wParam)==EN_CHANGE) SendMessage(hwnd,WM_COMMAND,IDC_AUTOSET,0);
|
---|
| 453 | return 1;
|
---|
| 454 | case IDC_AUTOSET:
|
---|
| 455 | if(SendDlgItemMessage(hwnd,IDC_AUTOSET,BM_GETCHECK,0,0)){
|
---|
| 456 | SendDlgItemMessage(hwnd,IDC_WINDOWHANDLE,EM_SETREADONLY,1,0);
|
---|
| 457 | SendDlgItemMessage(hwnd,IDC_WINDOWPROC,EM_SETREADONLY,1,0);
|
---|
| 458 | GetDlgItemText(hwnd,IDC_WINDOWNAME,temporary,MAX_PATH);
|
---|
| 459 | if(temporary[0]){
|
---|
| 460 | sprintf(temp2,"h%s",temporary);
|
---|
| 461 | SetDlgItemText(hwnd,IDC_WINDOWHANDLE,temp2);
|
---|
| 462 | sprintf(temp2,"%sProc",temporary);
|
---|
| 463 | SetDlgItemText(hwnd,IDC_WINDOWPROC,temp2);
|
---|
| 464 | }
|
---|
| 465 | else{
|
---|
| 466 | SetDlgItemText(hwnd,IDC_WINDOWHANDLE,"");
|
---|
| 467 | SetDlgItemText(hwnd,IDC_WINDOWPROC,"");
|
---|
| 468 | }
|
---|
| 469 | }
|
---|
| 470 | else{
|
---|
| 471 | SendDlgItemMessage(hwnd,IDC_WINDOWHANDLE,EM_SETREADONLY,0,0);
|
---|
| 472 | SendDlgItemMessage(hwnd,IDC_WINDOWPROC,EM_SETREADONLY,0,0);
|
---|
| 473 | }
|
---|
| 474 | return 1;
|
---|
| 475 | }
|
---|
| 476 | break;
|
---|
| 477 | }
|
---|
| 478 | return 0;
|
---|
| 479 | }
|
---|
| 480 | BOOL CALLBACK DlgRadProperty_Window_ExStyle(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
| 481 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 482 | extern PROJECTINFO ProjectInfo;
|
---|
[609] | 483 | int i;
|
---|
[3] | 484 |
|
---|
| 485 | switch(message){
|
---|
| 486 | case WM_INITDIALOG:
|
---|
[609] | 487 | {
|
---|
| 488 | SetPosCenter(hwnd);
|
---|
| 489 | i=GetWndNum(GetWindow(hClient,GW_CHILD));
|
---|
| 490 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
| 491 | if(pWindowInfo->ExStyle&WS_EX_TOPMOST) SendDlgItemMessage(hwnd,IDC_EXSTYLE_TOPMOST,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 492 | if(pWindowInfo->ExStyle&WS_EX_ACCEPTFILES) SendDlgItemMessage(hwnd,IDC_EXSTYLE_ACCEPTFILES,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 493 | if(pWindowInfo->ExStyle&WS_EX_TRANSPARENT) SendDlgItemMessage(hwnd,IDC_EXSTYLE_TRANSPARENT,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 494 | if(pWindowInfo->ExStyle&WS_EX_TOOLWINDOW) SendDlgItemMessage(hwnd,IDC_EXSTYLE_TOOLWINDOW,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 495 | if(pWindowInfo->ExStyle&WS_EX_CLIENTEDGE) SendDlgItemMessage(hwnd,IDC_EXSTYLE_CLIENTEDGE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 496 | if(pWindowInfo->ExStyle&WS_EX_STATICEDGE) SendDlgItemMessage(hwnd,IDC_EXSTYLE_STATICEDGE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 497 | if(pWindowInfo->ExStyle&WS_EX_NOPARENTNOTIFY) SendDlgItemMessage(hwnd,IDC_EXSTYLE_NOPARENTNOTIFY,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 498 | if(pWindowInfo->ExStyle&WS_EX_CONTEXTHELP) SendDlgItemMessage(hwnd,IDC_EXSTYLE_CONTEXTHELP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 499 | if(pWindowInfo->ExStyle&WS_EX_CONTROLPARENT) SendDlgItemMessage(hwnd,IDC_EXSTYLE_CONTROLPARENT,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 500 | break;
|
---|
| 501 | }
|
---|
[3] | 502 | case WM_COMMAND:
|
---|
| 503 | switch(LOWORD(wParam)){
|
---|
| 504 | case IDOK:
|
---|
[609] | 505 | {
|
---|
| 506 | i=GetWndNum(GetWindow(hClient,GW_CHILD));
|
---|
[3] | 507 |
|
---|
[609] | 508 | DWORD style;
|
---|
| 509 | style=0;
|
---|
| 510 | if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_TOPMOST,BM_GETCHECK,0,0))
|
---|
| 511 | style|=WS_EX_TOPMOST;
|
---|
| 512 | if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_ACCEPTFILES,BM_GETCHECK,0,0))
|
---|
| 513 | style|=WS_EX_ACCEPTFILES;
|
---|
| 514 | if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_TRANSPARENT,BM_GETCHECK,0,0))
|
---|
| 515 | style|=WS_EX_TRANSPARENT;
|
---|
| 516 | if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_TOOLWINDOW,BM_GETCHECK,0,0))
|
---|
| 517 | style|=WS_EX_TOOLWINDOW;
|
---|
| 518 | if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_CLIENTEDGE,BM_GETCHECK,0,0))
|
---|
| 519 | style|=WS_EX_CLIENTEDGE;
|
---|
| 520 | if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_STATICEDGE,BM_GETCHECK,0,0))
|
---|
| 521 | style|=WS_EX_STATICEDGE;
|
---|
| 522 | if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_NOPARENTNOTIFY,BM_GETCHECK,0,0))
|
---|
| 523 | style|=WS_EX_NOPARENTNOTIFY;
|
---|
| 524 | if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_CONTEXTHELP,BM_GETCHECK,0,0))
|
---|
| 525 | style|=WS_EX_CONTEXTHELP;
|
---|
| 526 | if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_CONTROLPARENT,BM_GETCHECK,0,0))
|
---|
| 527 | style|=WS_EX_CONTROLPARENT;
|
---|
[3] | 528 |
|
---|
[609] | 529 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
| 530 |
|
---|
| 531 | if(style==pWindowInfo->ExStyle){
|
---|
| 532 | SendMessage(hwnd,WM_COMMAND,IDCANCEL,0);
|
---|
| 533 | return 1;
|
---|
| 534 | }
|
---|
| 535 |
|
---|
| 536 | //変更情報
|
---|
| 537 | Rad_NoticeChanging(i,RAD_UNDO_EXSTYLE,SELECT_WINDOW,pWindowInfo->ExStyle);
|
---|
| 538 |
|
---|
| 539 | pWindowInfo->ExStyle=style;
|
---|
| 540 | EndDialog(hwnd,1);
|
---|
[3] | 541 | return 1;
|
---|
| 542 | }
|
---|
| 543 | case IDCANCEL:
|
---|
| 544 | EndDialog(hwnd,0);
|
---|
| 545 | return 1;
|
---|
| 546 | }
|
---|
| 547 | break;
|
---|
| 548 | }
|
---|
| 549 | return 0;
|
---|
| 550 | }
|
---|
| 551 | BOOL CALLBACK RadProperty_WindowProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
| 552 | extern HANDLE hHeap;
|
---|
| 553 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 554 | extern PROJECTINFO ProjectInfo;
|
---|
[609] | 555 | int i,i3,i4;
|
---|
[3] | 556 | static BOOL bInitial;
|
---|
| 557 |
|
---|
| 558 | switch(message){
|
---|
| 559 | case WM_INITDIALOG:
|
---|
[609] | 560 | {
|
---|
| 561 | bInitial=1;
|
---|
| 562 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 563 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 564 |
|
---|
[609] | 565 | SetDlgItemText(hwnd,IDC_WINDOWNAME,pWindowInfo->name);
|
---|
| 566 | SetDlgItemText(hwnd,IDC_HANDLE,pWindowInfo->HandleName);
|
---|
| 567 | SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->caption);
|
---|
[3] | 568 |
|
---|
[609] | 569 | //"3D FACE(標準)"
|
---|
| 570 | SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_BGCOLOR1);
|
---|
| 571 | //"色指定"
|
---|
| 572 | SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_BGCOLOR2);
|
---|
[3] | 573 |
|
---|
[609] | 574 | for(i3=0;i3<ProjectInfo.res.NumberOfBitmapRes;i3++)
|
---|
| 575 | SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_ADDSTRING,0,(long)ProjectInfo.res.pBitmapResInfo[i3].IdName);
|
---|
| 576 | if(pWindowInfo->type==WNDTYPE_MODALDLG||
|
---|
| 577 | pWindowInfo->type==WNDTYPE_MODELESSDLG){
|
---|
[3] | 578 | SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,0,0);
|
---|
[609] | 579 | EnableWindow(GetDlgItem(hwnd,IDC_BGCOLOR),0);
|
---|
[3] | 580 | }
|
---|
[609] | 581 | else{
|
---|
| 582 | if(pWindowInfo->bgColor==COLOR_3DFACE){
|
---|
| 583 | //3DFACE
|
---|
| 584 | SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,0,0);
|
---|
| 585 | }
|
---|
| 586 | else if(pWindowInfo->bgColor<=0){
|
---|
| 587 | //色指定
|
---|
| 588 | SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,1,0);
|
---|
| 589 | }
|
---|
| 590 | else if(pWindowInfo->bgColor>=0x1000){
|
---|
| 591 | //ビットマップ指定
|
---|
| 592 | SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,2+pWindowInfo->bgColor-0x1000,0);
|
---|
| 593 | }
|
---|
[3] | 594 | }
|
---|
| 595 |
|
---|
| 596 |
|
---|
[609] | 597 | ////////////
|
---|
| 598 | // メニュー
|
---|
| 599 | ////////////
|
---|
[3] | 600 |
|
---|
[609] | 601 | //"なし"
|
---|
| 602 | SendDlgItemMessage(hwnd,IDC_WINDOWMENU,CB_ADDSTRING,0,(long)STRING_NONE_);
|
---|
[3] | 603 |
|
---|
[609] | 604 | for(i3=0,i4=0;i3<ProjectInfo.NumberOfMenu;i3++){
|
---|
| 605 | if(pWindowInfo->MenuID){
|
---|
| 606 | if(lstrcmpi(ProjectInfo.pMenuInfo[i3].IdName,pWindowInfo->MenuID)==0)
|
---|
| 607 | i4=i3+1;
|
---|
| 608 | }
|
---|
| 609 | SendDlgItemMessage(hwnd,IDC_WINDOWMENU,CB_ADDSTRING,0,(long)ProjectInfo.pMenuInfo[i3].IdName);
|
---|
[3] | 610 | }
|
---|
[609] | 611 | if(i4==0&&pWindowInfo->MenuID){
|
---|
| 612 | //メニューが存在しない場合、無効にする
|
---|
| 613 | HeapDefaultFree(pWindowInfo->MenuID);
|
---|
| 614 | pWindowInfo->MenuID=0;
|
---|
| 615 | DrawRadWindow(i,pWindowInfo);
|
---|
| 616 | }
|
---|
| 617 | SendDlgItemMessage(hwnd,IDC_WINDOWMENU,CB_SETCURSEL,i4,0);
|
---|
[3] | 618 |
|
---|
| 619 |
|
---|
[609] | 620 | ////////////
|
---|
| 621 | // アイコン
|
---|
| 622 | ////////////
|
---|
[3] | 623 |
|
---|
[609] | 624 | //"Windowsロゴ(標準)"
|
---|
| 625 | SendDlgItemMessage(hwnd,IDC_ICONRES,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_ICONDEFAULT);
|
---|
[3] | 626 |
|
---|
[609] | 627 | for(i3=0,i4=0;i3<ProjectInfo.res.NumberOfIconRes;i3++){
|
---|
| 628 | SendDlgItemMessage(hwnd,IDC_ICONRES,CB_ADDSTRING,0,(long)ProjectInfo.res.pIconResInfo[i3].IdName);
|
---|
[3] | 629 |
|
---|
[609] | 630 | if(lstrcmp(pWindowInfo->IconResName,ProjectInfo.res.pIconResInfo[i3].IdName)==0)
|
---|
| 631 | i4=i3+1;
|
---|
| 632 | }
|
---|
| 633 | if(i4==0&&pWindowInfo->IconResName){
|
---|
| 634 | //アイコンが存在しない場合、無効にする
|
---|
| 635 | HeapDefaultFree(pWindowInfo->IconResName);
|
---|
| 636 | pWindowInfo->IconResName=0;
|
---|
| 637 | DrawRadWindow(i,pWindowInfo);
|
---|
| 638 | }
|
---|
| 639 | SendDlgItemMessage(hwnd,IDC_ICONRES,CB_SETCURSEL,i4,0);
|
---|
[3] | 640 |
|
---|
| 641 |
|
---|
[609] | 642 | ////////////
|
---|
| 643 | // スタイル
|
---|
| 644 | ////////////
|
---|
[3] | 645 |
|
---|
[609] | 646 | //"オーバーラップ"
|
---|
| 647 | SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_STYLE_OVERLAPPED);
|
---|
| 648 | //"ポップアップ"
|
---|
| 649 | SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_STYLE_POPUP);
|
---|
| 650 | //"チャイルド"
|
---|
| 651 | SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_STYLE_CHILD);
|
---|
[3] | 652 |
|
---|
[609] | 653 | if(pWindowInfo->style&WS_POPUP) SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_SETCURSEL,1,0);
|
---|
| 654 | else if(pWindowInfo->style&WS_CHILD) SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_SETCURSEL,2,0);
|
---|
| 655 | else SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_SETCURSEL,0,0);
|
---|
[3] | 656 |
|
---|
[609] | 657 | //"枠なし"
|
---|
| 658 | SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_STYLE_FRAME_NONE);
|
---|
| 659 | //"細枠"
|
---|
| 660 | SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_STYLE_FRAME_THICK);
|
---|
| 661 | //"サイズ変更枠"
|
---|
| 662 | SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_STYLE_FRAME_BORDER);
|
---|
[3] | 663 |
|
---|
[609] | 664 | //WS_CAPTION(WS_BORDER含む)を考慮してWS_THICKFRAMEを最初に比較する
|
---|
| 665 | if(pWindowInfo->style&WS_THICKFRAME) SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_SETCURSEL,2,0);
|
---|
| 666 | else if(pWindowInfo->style&WS_BORDER) SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_SETCURSEL,1,0);
|
---|
| 667 | else SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_SETCURSEL,0,0);
|
---|
[3] | 668 |
|
---|
[609] | 669 | if(pWindowInfo->style&WS_CAPTION) SendDlgItemMessage(hwnd,IDC_STYLE_CAPTION,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 670 | if(pWindowInfo->style&WS_SYSMENU) SendDlgItemMessage(hwnd,IDC_STYLE_SYSMENU,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 671 | if(pWindowInfo->style&WS_MINIMIZEBOX) SendDlgItemMessage(hwnd,IDC_STYLE_MINIMIZEBOX,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 672 | if(pWindowInfo->style&WS_MAXIMIZEBOX) SendDlgItemMessage(hwnd,IDC_STYLE_MAXIMIZEBOX,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 673 | if(pWindowInfo->style&WS_MINIMIZE) SendDlgItemMessage(hwnd,IDC_STYLE_MINIMIZE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 674 | if(pWindowInfo->style&WS_MAXIMIZE) SendDlgItemMessage(hwnd,IDC_STYLE_MAXIMIZE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 675 | if(pWindowInfo->style&WS_HSCROLL) SendDlgItemMessage(hwnd,IDC_STYLE_HSCROLLBAR,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 676 | if(pWindowInfo->style&WS_VSCROLL) SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLLBAR,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 677 | if(pWindowInfo->style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 678 | if(pWindowInfo->style&WS_CLIPSIBLINGS) SendDlgItemMessage(hwnd,IDC_STYLE_CLIPSIBLINGS,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 679 | if(pWindowInfo->style&WS_CLIPCHILDREN) SendDlgItemMessage(hwnd,IDC_STYLE_CLIPCHILDREN,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 680 | if(pWindowInfo->style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
|
---|
[3] | 681 |
|
---|
[609] | 682 | SetDlgItemText(hwnd,IDC_SETFONT,pWindowInfo->LogFont.lfFaceName);
|
---|
[3] | 683 |
|
---|
[609] | 684 | RadProperty_Window_Window_StylingOrder(hwnd,&pWindowInfo->style);
|
---|
[3] | 685 |
|
---|
| 686 |
|
---|
[609] | 687 | //////////
|
---|
| 688 | //タイプ
|
---|
| 689 | switch(pWindowInfo->type){
|
---|
| 690 | case WNDTYPE_DEFAULT:
|
---|
| 691 | SendDlgItemMessage(hwnd,IDC_DEFWINDOW,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 692 | break;
|
---|
| 693 | case WNDTYPE_MODALDLG:
|
---|
| 694 | SendDlgItemMessage(hwnd,IDC_MODALDLG,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 695 | break;
|
---|
| 696 | case WNDTYPE_MODELESSDLG:
|
---|
| 697 | SendDlgItemMessage(hwnd,IDC_MODELESSDLG,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 698 | break;
|
---|
| 699 | }
|
---|
[3] | 700 |
|
---|
| 701 |
|
---|
[609] | 702 | bInitial=0;
|
---|
| 703 | break;
|
---|
| 704 | }
|
---|
[3] | 705 | case WM_COMMAND:
|
---|
| 706 | switch(LOWORD(wParam)){
|
---|
| 707 | case IDC_RENAMEWINDOW:
|
---|
[609] | 708 | {
|
---|
| 709 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_WINDOW_RENAME),hwnd,(DLGPROC)DlgRadProperty_Window_Rename)) return 1;
|
---|
| 710 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 711 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
| 712 | SetDlgItemText(hwnd,IDC_WINDOWNAME,pWindowInfo->name);
|
---|
| 713 | SetDlgItemText(hwnd,IDC_HANDLE,pWindowInfo->HandleName);
|
---|
| 714 | return 1;
|
---|
| 715 | }
|
---|
[3] | 716 | case IDC_RENAMECAPTION:
|
---|
[609] | 717 | {
|
---|
| 718 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_RENAMECAPTION),hwnd,(DLGPROC)DlgRadProperty_Item_RenameCaption)) return 1;
|
---|
| 719 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 720 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
| 721 | SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->caption);
|
---|
| 722 | return 1;
|
---|
| 723 | }
|
---|
[3] | 724 | case IDC_SETFONT:
|
---|
[609] | 725 | {
|
---|
| 726 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 727 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
| 728 | LOGFONT lf;
|
---|
| 729 | lf=pWindowInfo->LogFont;
|
---|
| 730 | if(!SetFontDialog(hwnd,&pWindowInfo->LogFont,0)) return 1;
|
---|
[3] | 731 |
|
---|
[609] | 732 | //変更情報
|
---|
| 733 | Rad_NoticeChanging(i,RAD_UNDO_FONT,SELECT_WINDOW,(DWORD)&lf);
|
---|
[3] | 734 |
|
---|
[609] | 735 | SetDlgItemText(hwnd,IDC_SETFONT,pWindowInfo->LogFont.lfFaceName);
|
---|
| 736 | DrawRadWindow(i,pWindowInfo);
|
---|
| 737 | return 1;
|
---|
| 738 | }
|
---|
[3] | 739 | case IDC_BGCOLOR:
|
---|
| 740 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 741 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
[609] | 742 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 743 |
|
---|
| 744 | i3=SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_GETCURSEL,0,0);
|
---|
| 745 | if(i3==0){
|
---|
| 746 | //3DFACE
|
---|
| 747 |
|
---|
| 748 | //変更情報
|
---|
[609] | 749 | Rad_NoticeChanging(i,RAD_UNDO_BGCOLOR,SELECT_WINDOW,pWindowInfo->bgColor);
|
---|
[3] | 750 |
|
---|
[609] | 751 | pWindowInfo->bgColor=COLOR_3DFACE;
|
---|
[3] | 752 | }
|
---|
| 753 | else if(i3==1){
|
---|
| 754 | //色指定
|
---|
| 755 | CHOOSECOLOR cc;
|
---|
| 756 | COLORREF CusColors[16]={
|
---|
| 757 | RGB(255,255,255),
|
---|
| 758 | RGB(0,0,0),
|
---|
| 759 | RGB(128,128,128),
|
---|
| 760 | RGB(192,192,192),
|
---|
| 761 | RGB(128,0,0),
|
---|
| 762 | RGB(255,0,0),
|
---|
| 763 | RGB(128,128,0),
|
---|
| 764 | RGB(255,255,0),
|
---|
| 765 | RGB(0,128,0),
|
---|
| 766 | RGB(0,255,0),
|
---|
| 767 | RGB(0,128,128),
|
---|
| 768 | RGB(0,255,255),
|
---|
| 769 | RGB(0,0,128),
|
---|
| 770 | RGB(0,0,255),
|
---|
| 771 | RGB(128,0,128),
|
---|
| 772 | RGB(255,0,255)};
|
---|
| 773 | cc.lStructSize=sizeof(CHOOSECOLOR);
|
---|
| 774 | cc.hwndOwner=hwnd;
|
---|
[609] | 775 | if(pWindowInfo->bgColor<=0)
|
---|
| 776 | cc.rgbResult=-pWindowInfo->bgColor;
|
---|
[3] | 777 | else cc.rgbResult=RGB(255,255,255);
|
---|
| 778 | cc.lpCustColors=CusColors;
|
---|
| 779 | cc.Flags=CC_RGBINIT|CC_FULLOPEN;
|
---|
| 780 | if(!ChooseColor(&cc)){
|
---|
| 781 | //キャンセル動作
|
---|
[609] | 782 | if(pWindowInfo->bgColor==COLOR_3DFACE){
|
---|
[3] | 783 | //3DFACE
|
---|
| 784 | SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,0,0);
|
---|
| 785 | }
|
---|
[609] | 786 | else if(pWindowInfo->bgColor<=0){
|
---|
[3] | 787 | //色指定
|
---|
| 788 | SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,1,0);
|
---|
| 789 | }
|
---|
[609] | 790 | else if(pWindowInfo->bgColor>=0x1000){
|
---|
[3] | 791 | //ビットマップ指定
|
---|
[609] | 792 | SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,2+pWindowInfo->bgColor-0x1000,0);
|
---|
[3] | 793 | }
|
---|
| 794 | return 1;
|
---|
| 795 | }
|
---|
| 796 |
|
---|
| 797 | //変更情報
|
---|
[609] | 798 | Rad_NoticeChanging(i,RAD_UNDO_BGCOLOR,SELECT_WINDOW,pWindowInfo->bgColor);
|
---|
[3] | 799 |
|
---|
[609] | 800 | pWindowInfo->bgColor=-(int)cc.rgbResult;
|
---|
[3] | 801 | }
|
---|
| 802 | else{
|
---|
| 803 | //ビットマップ
|
---|
| 804 | i3-=2;
|
---|
| 805 |
|
---|
| 806 | //変更情報
|
---|
[609] | 807 | Rad_NoticeChanging(i,RAD_UNDO_BGCOLOR,SELECT_WINDOW,pWindowInfo->bgColor);
|
---|
[3] | 808 |
|
---|
[609] | 809 | pWindowInfo->bgColor=0x1000+i3;
|
---|
[3] | 810 | }
|
---|
[609] | 811 | DrawRadWindow(i,pWindowInfo);
|
---|
[3] | 812 | return 1;
|
---|
| 813 | }
|
---|
| 814 | break;
|
---|
| 815 | case IDC_WINDOWMENU:
|
---|
| 816 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 817 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
[609] | 818 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 819 |
|
---|
| 820 | //変更情報
|
---|
[609] | 821 | Rad_NoticeChanging(i,RAD_UNDO_WINDOWMENU,SELECT_WINDOW,(long)pWindowInfo->MenuID);
|
---|
[3] | 822 |
|
---|
| 823 | i3=SendDlgItemMessage(hwnd,IDC_WINDOWMENU,CB_GETCURSEL,0,0);
|
---|
[609] | 824 | if(pWindowInfo->MenuID)
|
---|
| 825 | HeapDefaultFree(pWindowInfo->MenuID);
|
---|
| 826 | if(i3==0) pWindowInfo->MenuID=0;
|
---|
[3] | 827 | else{
|
---|
[609] | 828 | pWindowInfo->MenuID=(char *)HeapAlloc(hHeap,0,SendDlgItemMessage(hwnd,IDC_WINDOWMENU,CB_GETLBTEXTLEN,i3,0)+1);
|
---|
| 829 | SendDlgItemMessage(hwnd,IDC_WINDOWMENU,CB_GETLBTEXT,i3,(long)pWindowInfo->MenuID);
|
---|
[3] | 830 | }
|
---|
[609] | 831 | DrawRadWindow(i,pWindowInfo);
|
---|
[3] | 832 | return 1;
|
---|
| 833 | }
|
---|
| 834 | break;
|
---|
| 835 | case IDC_ICONRES:
|
---|
| 836 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 837 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
[609] | 838 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 839 |
|
---|
| 840 | //変更情報
|
---|
[609] | 841 | Rad_NoticeChanging(i,RAD_UNDO_ICONRES,SELECT_WINDOW,(long)pWindowInfo->IconResName);
|
---|
[3] | 842 |
|
---|
| 843 | i3=SendDlgItemMessage(hwnd,IDC_ICONRES,CB_GETCURSEL,0,0);
|
---|
[609] | 844 | if(pWindowInfo->IconResName)
|
---|
| 845 | HeapDefaultFree(pWindowInfo->IconResName);
|
---|
| 846 | if(i3==0) pWindowInfo->IconResName=0;
|
---|
[3] | 847 | else{
|
---|
[609] | 848 | pWindowInfo->IconResName=(char *)HeapAlloc(hHeap,0,SendDlgItemMessage(hwnd,IDC_ICONRES,CB_GETLBTEXTLEN,i3,0)+1);
|
---|
| 849 | SendDlgItemMessage(hwnd,IDC_ICONRES,CB_GETLBTEXT,i3,(long)pWindowInfo->IconResName);
|
---|
[3] | 850 | }
|
---|
[609] | 851 | DrawRadWindow(i,pWindowInfo);
|
---|
[3] | 852 | return 1;
|
---|
| 853 | }
|
---|
| 854 | break;
|
---|
| 855 |
|
---|
| 856 | case IDC_WINDOWSTYLE:
|
---|
| 857 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 858 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
[609] | 859 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 860 |
|
---|
| 861 | //変更情報
|
---|
[609] | 862 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
|
---|
[3] | 863 |
|
---|
| 864 | i3=SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_GETCURSEL,0,0);
|
---|
[609] | 865 | pWindowInfo->style&=0x3FFFFFFF;
|
---|
| 866 | if(i3==1) pWindowInfo->style|=WS_POPUP;
|
---|
| 867 | else if(i3==2) pWindowInfo->style|=WS_CHILD;
|
---|
| 868 | RadProperty_Window_Window_StylingOrder(hwnd,&pWindowInfo->style);
|
---|
| 869 | DrawRadWindow(i,pWindowInfo);
|
---|
[3] | 870 | return 1;
|
---|
| 871 | }
|
---|
| 872 | break;
|
---|
| 873 | case IDC_BORDERSTYLE:
|
---|
| 874 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 875 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
[609] | 876 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 877 |
|
---|
| 878 | //変更情報
|
---|
[609] | 879 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
|
---|
[3] | 880 |
|
---|
| 881 | i3=SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_GETCURSEL,0,0);
|
---|
[609] | 882 | pWindowInfo->style&=~(WS_BORDER|WS_THICKFRAME);
|
---|
| 883 | if(i3==1) pWindowInfo->style|=WS_BORDER;
|
---|
[3] | 884 | else if(i3==2){
|
---|
[609] | 885 | pWindowInfo->style|=WS_BORDER;
|
---|
| 886 | pWindowInfo->style|=WS_THICKFRAME;
|
---|
[3] | 887 | }
|
---|
[609] | 888 | RadProperty_Window_Border_StylingOrder(hwnd,&pWindowInfo->style);
|
---|
| 889 | DrawRadWindow(i,pWindowInfo);
|
---|
[3] | 890 | return 1;
|
---|
| 891 | }
|
---|
| 892 | break;
|
---|
| 893 |
|
---|
| 894 | case IDC_STYLE_CAPTION:
|
---|
| 895 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 896 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
[609] | 897 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 898 |
|
---|
| 899 | //変更情報
|
---|
[609] | 900 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
|
---|
[3] | 901 |
|
---|
| 902 | if(SendDlgItemMessage(hwnd,IDC_STYLE_CAPTION,BM_GETCHECK,0,0))
|
---|
[609] | 903 | pWindowInfo->style|=WS_CAPTION;
|
---|
[3] | 904 | else
|
---|
[609] | 905 | pWindowInfo->style&=~WS_CAPTION;
|
---|
| 906 | RadProperty_Window_Caption_StylingOrder(hwnd,&pWindowInfo->style);
|
---|
| 907 | DrawRadWindow(i,pWindowInfo);
|
---|
[3] | 908 | return 1;
|
---|
| 909 | }
|
---|
| 910 | break;
|
---|
| 911 | case IDC_STYLE_SYSMENU:
|
---|
| 912 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 913 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
[609] | 914 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 915 |
|
---|
| 916 | //変更情報
|
---|
[609] | 917 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
|
---|
[3] | 918 |
|
---|
| 919 | if(SendDlgItemMessage(hwnd,IDC_STYLE_SYSMENU,BM_GETCHECK,0,0))
|
---|
[609] | 920 | pWindowInfo->style|=WS_SYSMENU;
|
---|
[3] | 921 | else
|
---|
[609] | 922 | pWindowInfo->style&=~WS_SYSMENU;
|
---|
| 923 | DrawRadWindow(i,pWindowInfo);
|
---|
[3] | 924 | return 1;
|
---|
| 925 | }
|
---|
| 926 | break;
|
---|
| 927 | case IDC_STYLE_MINIMIZEBOX:
|
---|
| 928 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 929 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
[609] | 930 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 931 |
|
---|
| 932 | //変更情報
|
---|
[609] | 933 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
|
---|
[3] | 934 |
|
---|
| 935 | if(SendDlgItemMessage(hwnd,IDC_STYLE_MINIMIZEBOX,BM_GETCHECK,0,0))
|
---|
[609] | 936 | pWindowInfo->style|=WS_MINIMIZEBOX;
|
---|
[3] | 937 | else
|
---|
[609] | 938 | pWindowInfo->style&=~WS_MINIMIZEBOX;
|
---|
| 939 | DrawRadWindow(i,pWindowInfo);
|
---|
[3] | 940 | return 1;
|
---|
| 941 | }
|
---|
| 942 | break;
|
---|
| 943 | case IDC_STYLE_MAXIMIZEBOX:
|
---|
| 944 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 945 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
[609] | 946 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 947 |
|
---|
| 948 | //変更情報
|
---|
[609] | 949 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
|
---|
[3] | 950 |
|
---|
| 951 | if(SendDlgItemMessage(hwnd,IDC_STYLE_MAXIMIZEBOX,BM_GETCHECK,0,0))
|
---|
[609] | 952 | pWindowInfo->style|=WS_MAXIMIZEBOX;
|
---|
[3] | 953 | else
|
---|
[609] | 954 | pWindowInfo->style&=~WS_MAXIMIZEBOX;
|
---|
| 955 | DrawRadWindow(i,pWindowInfo);
|
---|
[3] | 956 | return 1;
|
---|
| 957 | }
|
---|
| 958 | break;
|
---|
| 959 | case IDC_STYLE_MINIMIZE:
|
---|
| 960 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 961 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
[609] | 962 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 963 |
|
---|
| 964 | //変更情報
|
---|
[609] | 965 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
|
---|
[3] | 966 |
|
---|
| 967 | if(SendDlgItemMessage(hwnd,IDC_STYLE_MINIMIZE,BM_GETCHECK,0,0))
|
---|
[609] | 968 | pWindowInfo->style|=WS_MINIMIZE;
|
---|
[3] | 969 | else
|
---|
[609] | 970 | pWindowInfo->style&=~WS_MINIMIZE;
|
---|
| 971 | DrawRadWindow(i,pWindowInfo);
|
---|
[3] | 972 | return 1;
|
---|
| 973 | }
|
---|
| 974 | break;
|
---|
| 975 | case IDC_STYLE_MAXIMIZE:
|
---|
| 976 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 977 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
[609] | 978 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 979 |
|
---|
| 980 | //変更情報
|
---|
[609] | 981 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
|
---|
[3] | 982 |
|
---|
| 983 | if(SendDlgItemMessage(hwnd,IDC_STYLE_MAXIMIZE,BM_GETCHECK,0,0))
|
---|
[609] | 984 | pWindowInfo->style|=WS_MAXIMIZE;
|
---|
[3] | 985 | else
|
---|
[609] | 986 | pWindowInfo->style&=~WS_MAXIMIZE;
|
---|
| 987 | DrawRadWindow(i,pWindowInfo);
|
---|
[3] | 988 | return 1;
|
---|
| 989 | }
|
---|
| 990 | case IDC_STYLE_HSCROLLBAR:
|
---|
| 991 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 992 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
[609] | 993 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 994 |
|
---|
| 995 | //変更情報
|
---|
[609] | 996 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
|
---|
[3] | 997 |
|
---|
| 998 | if(SendDlgItemMessage(hwnd,IDC_STYLE_HSCROLLBAR,BM_GETCHECK,0,0))
|
---|
[609] | 999 | pWindowInfo->style|=WS_HSCROLL;
|
---|
[3] | 1000 | else
|
---|
[609] | 1001 | pWindowInfo->style&=~WS_HSCROLL;
|
---|
| 1002 | DrawRadWindow(i,pWindowInfo);
|
---|
[3] | 1003 | return 1;
|
---|
| 1004 | }
|
---|
| 1005 | case IDC_STYLE_VSCROLLBAR:
|
---|
| 1006 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 1007 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
[609] | 1008 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 1009 |
|
---|
| 1010 | //変更情報
|
---|
[609] | 1011 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
|
---|
[3] | 1012 |
|
---|
| 1013 | if(SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLLBAR,BM_GETCHECK,0,0))
|
---|
[609] | 1014 | pWindowInfo->style|=WS_VSCROLL;
|
---|
[3] | 1015 | else
|
---|
[609] | 1016 | pWindowInfo->style&=~WS_VSCROLL;
|
---|
| 1017 | DrawRadWindow(i,pWindowInfo);
|
---|
[3] | 1018 | return 1;
|
---|
| 1019 | }
|
---|
| 1020 | break;
|
---|
| 1021 | case IDC_STYLE_DISABLED:
|
---|
| 1022 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 1023 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
[609] | 1024 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 1025 |
|
---|
| 1026 | //変更情報
|
---|
[609] | 1027 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
|
---|
[3] | 1028 |
|
---|
| 1029 | if(SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_GETCHECK,0,0))
|
---|
[609] | 1030 | pWindowInfo->style|=WS_DISABLED;
|
---|
[3] | 1031 | else
|
---|
[609] | 1032 | pWindowInfo->style&=~WS_DISABLED;
|
---|
| 1033 | DrawRadWindow(i,pWindowInfo);
|
---|
[3] | 1034 | return 1;
|
---|
| 1035 | }
|
---|
| 1036 | break;
|
---|
| 1037 | case IDC_STYLE_CLIPSIBLINGS:
|
---|
| 1038 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 1039 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
[609] | 1040 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 1041 |
|
---|
| 1042 | //変更情報
|
---|
[609] | 1043 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
|
---|
[3] | 1044 |
|
---|
| 1045 | if(SendDlgItemMessage(hwnd,IDC_STYLE_CLIPSIBLINGS,BM_GETCHECK,0,0))
|
---|
[609] | 1046 | pWindowInfo->style|=WS_CLIPSIBLINGS;
|
---|
[3] | 1047 | else
|
---|
[609] | 1048 | pWindowInfo->style&=~WS_CLIPSIBLINGS;
|
---|
| 1049 | DrawRadWindow(i,pWindowInfo);
|
---|
[3] | 1050 | return 1;
|
---|
| 1051 | }
|
---|
| 1052 | break;
|
---|
| 1053 | case IDC_STYLE_CLIPCHILDREN:
|
---|
| 1054 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 1055 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
[609] | 1056 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 1057 |
|
---|
| 1058 | //変更情報
|
---|
[609] | 1059 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
|
---|
[3] | 1060 |
|
---|
| 1061 | if(SendDlgItemMessage(hwnd,IDC_STYLE_CLIPCHILDREN,BM_GETCHECK,0,0))
|
---|
[609] | 1062 | pWindowInfo->style|=WS_CLIPCHILDREN;
|
---|
[3] | 1063 | else
|
---|
[609] | 1064 | pWindowInfo->style&=~WS_CLIPCHILDREN;
|
---|
| 1065 | DrawRadWindow(i,pWindowInfo);
|
---|
[3] | 1066 | return 1;
|
---|
| 1067 | }
|
---|
| 1068 | break;
|
---|
| 1069 | case IDC_STYLE_VISIBLE:
|
---|
| 1070 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 1071 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
[609] | 1072 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 1073 |
|
---|
| 1074 | //変更情報
|
---|
[609] | 1075 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style);
|
---|
[3] | 1076 |
|
---|
| 1077 | if(SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_GETCHECK,0,0))
|
---|
[609] | 1078 | pWindowInfo->style|=WS_VISIBLE;
|
---|
[3] | 1079 | else
|
---|
[609] | 1080 | pWindowInfo->style&=~WS_VISIBLE;
|
---|
| 1081 | DrawRadWindow(i,pWindowInfo);
|
---|
[3] | 1082 | return 1;
|
---|
| 1083 | }
|
---|
| 1084 | break;
|
---|
| 1085 |
|
---|
| 1086 | case IDC_EXSTYLE:
|
---|
[302] | 1087 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_WINDOW_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Window_ExStyle)) return 1;
|
---|
[3] | 1088 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
[609] | 1089 | DrawRadWindow(i,GetWndInfo(MdiInfo[i].path));
|
---|
[3] | 1090 | return 1;
|
---|
| 1091 |
|
---|
| 1092 | case IDC_DEFWINDOW:
|
---|
| 1093 | case IDC_MODALDLG:
|
---|
| 1094 | case IDC_MODELESSDLG:
|
---|
| 1095 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 1096 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
[609] | 1097 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 1098 |
|
---|
| 1099 | //変更情報
|
---|
[609] | 1100 | Rad_NoticeChanging(i,RAD_UNDO_TYPE,SELECT_WINDOW,pWindowInfo->type);
|
---|
[3] | 1101 |
|
---|
| 1102 | if(SendDlgItemMessage(hwnd,IDC_DEFWINDOW,BM_GETCHECK,0,0))
|
---|
[609] | 1103 | pWindowInfo->type=WNDTYPE_DEFAULT;
|
---|
[3] | 1104 | else if(SendDlgItemMessage(hwnd,IDC_MODALDLG,BM_GETCHECK,0,0))
|
---|
[609] | 1105 | pWindowInfo->type=WNDTYPE_MODALDLG;
|
---|
[3] | 1106 | else if(SendDlgItemMessage(hwnd,IDC_MODELESSDLG,BM_GETCHECK,0,0))
|
---|
[609] | 1107 | pWindowInfo->type=WNDTYPE_MODELESSDLG;
|
---|
[3] | 1108 | return 1;
|
---|
| 1109 | }
|
---|
| 1110 | break;
|
---|
| 1111 | }
|
---|
| 1112 | break;
|
---|
| 1113 | }
|
---|
| 1114 | return 0;
|
---|
| 1115 | }
|
---|
| 1116 |
|
---|
| 1117 | BOOL CALLBACK DlgRadProperty_Item_RenameCaption(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
| 1118 | extern HANDLE hHeap;
|
---|
| 1119 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 1120 | extern PROJECTINFO ProjectInfo;
|
---|
[609] | 1121 | int i,i3;
|
---|
[3] | 1122 | char *temporary;
|
---|
| 1123 | POINTANDSIZE PointAndSize;
|
---|
| 1124 |
|
---|
| 1125 | switch(message){
|
---|
| 1126 | case WM_INITDIALOG:
|
---|
[609] | 1127 | {
|
---|
| 1128 | SetPosCenter(hwnd);
|
---|
| 1129 | i=GetWndNum(GetWindow(hClient,GW_CHILD));
|
---|
| 1130 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
| 1131 | if(MdiInfo[i].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW)
|
---|
| 1132 | SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->caption);
|
---|
| 1133 | else
|
---|
| 1134 | SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption);
|
---|
| 1135 | break;
|
---|
| 1136 | }
|
---|
[3] | 1137 | case WM_COMMAND:
|
---|
| 1138 | switch(LOWORD(wParam)){
|
---|
| 1139 | case IDOK:
|
---|
[609] | 1140 | {
|
---|
| 1141 | i=GetWndNum(GetWindow(hClient,GW_CHILD));
|
---|
| 1142 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 1143 |
|
---|
[609] | 1144 | i3=GetWindowTextLength(GetDlgItem(hwnd,IDC_CAPTION))+1;
|
---|
| 1145 | temporary=(char *)HeapAlloc(hHeap,0,i3);
|
---|
| 1146 | GetDlgItemText(hwnd,IDC_CAPTION,temporary,i3);
|
---|
| 1147 | if(MdiInfo[i].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW){
|
---|
| 1148 | if(lstrcmp(temporary,pWindowInfo->caption)==0){
|
---|
| 1149 | HeapDefaultFree(temporary);
|
---|
| 1150 | SendMessage(hwnd,WM_COMMAND,IDCANCEL,0);
|
---|
| 1151 | return 1;
|
---|
| 1152 | }
|
---|
[3] | 1153 |
|
---|
[609] | 1154 | //変更情報を更新
|
---|
| 1155 | Rad_NoticeChanging(i,RAD_UNDO_CAPTION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)pWindowInfo->caption);
|
---|
[3] | 1156 |
|
---|
[609] | 1157 | HeapDefaultFree(pWindowInfo->caption);
|
---|
| 1158 | pWindowInfo->caption=temporary;
|
---|
[3] | 1159 | }
|
---|
[609] | 1160 | else{
|
---|
| 1161 | if(lstrcmp(temporary,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption)==0){
|
---|
| 1162 | HeapDefaultFree(temporary);
|
---|
| 1163 | SendMessage(hwnd,WM_COMMAND,IDCANCEL,0);
|
---|
| 1164 | return 1;
|
---|
| 1165 | }
|
---|
[3] | 1166 |
|
---|
[609] | 1167 | //変更情報を更新
|
---|
| 1168 | Rad_NoticeChanging(i,RAD_UNDO_CAPTION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption);
|
---|
[3] | 1169 |
|
---|
[609] | 1170 | HeapDefaultFree(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption);
|
---|
| 1171 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption=temporary;
|
---|
[3] | 1172 |
|
---|
[609] | 1173 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_STATIC){
|
---|
| 1174 | //スタティック テキスト
|
---|
| 1175 | //テキストが表示できるようにサイズを拡大する
|
---|
[3] | 1176 |
|
---|
[609] | 1177 | PointAndSize.pos=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].pos;
|
---|
| 1178 | PointAndSize.size=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size;
|
---|
| 1179 | Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize);
|
---|
[3] | 1180 |
|
---|
[609] | 1181 | HFONT hFont,hOldFont;
|
---|
| 1182 | hFont=CreateFontIndirect(&pWindowInfo->LogFont);
|
---|
| 1183 | hOldFont=(HFONT)SelectObject(MdiInfo[i].MdiRadInfo->hMemDC,hFont);
|
---|
| 1184 | GetTextExtentPoint32(MdiInfo[i].MdiRadInfo->hMemDC,temporary,lstrlen(temporary),&PointAndSize.size);
|
---|
| 1185 | SelectObject(MdiInfo[i].MdiRadInfo->hMemDC,hOldFont);
|
---|
| 1186 | DeleteObject(hFont);
|
---|
[3] | 1187 |
|
---|
[609] | 1188 | //テキストの終端に余裕を持たせる
|
---|
| 1189 | PointAndSize.size.cx+=5;
|
---|
[3] | 1190 |
|
---|
[609] | 1191 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cx<PointAndSize.size.cx)
|
---|
| 1192 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cx=PointAndSize.size.cx;
|
---|
| 1193 | }
|
---|
| 1194 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_CHECKBOX){
|
---|
| 1195 | //チェック ボックス
|
---|
| 1196 | //テキストが表示できるようにサイズを拡大する
|
---|
[3] | 1197 |
|
---|
[609] | 1198 | PointAndSize.pos=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].pos;
|
---|
| 1199 | PointAndSize.size=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size;
|
---|
| 1200 | Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize);
|
---|
[3] | 1201 |
|
---|
[609] | 1202 | HFONT hFont,hOldFont;
|
---|
| 1203 | hFont=CreateFontIndirect(&pWindowInfo->LogFont);
|
---|
| 1204 | hOldFont=(HFONT)SelectObject(MdiInfo[i].MdiRadInfo->hMemDC,hFont);
|
---|
| 1205 | GetTextExtentPoint32(MdiInfo[i].MdiRadInfo->hMemDC,temporary,lstrlen(temporary),&PointAndSize.size);
|
---|
| 1206 | SelectObject(MdiInfo[i].MdiRadInfo->hMemDC,hOldFont);
|
---|
| 1207 | DeleteObject(hFont);
|
---|
[3] | 1208 |
|
---|
[609] | 1209 | //テキストの終端に余裕を持たせる
|
---|
| 1210 | PointAndSize.size.cx+=21;
|
---|
[3] | 1211 |
|
---|
[609] | 1212 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cx<PointAndSize.size.cx)
|
---|
| 1213 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cx=PointAndSize.size.cx;
|
---|
| 1214 | }
|
---|
| 1215 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_RADIOBUTTON){
|
---|
| 1216 | //ラジオ ボックス
|
---|
| 1217 | //テキストが表示できるようにサイズを拡大する
|
---|
[3] | 1218 |
|
---|
[609] | 1219 | PointAndSize.pos=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].pos;
|
---|
| 1220 | PointAndSize.size=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size;
|
---|
| 1221 | Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize);
|
---|
[3] | 1222 |
|
---|
[609] | 1223 | HFONT hFont,hOldFont;
|
---|
| 1224 | hFont=CreateFontIndirect(&pWindowInfo->LogFont);
|
---|
| 1225 | hOldFont=(HFONT)SelectObject(MdiInfo[i].MdiRadInfo->hMemDC,hFont);
|
---|
| 1226 | GetTextExtentPoint32(MdiInfo[i].MdiRadInfo->hMemDC,temporary,lstrlen(temporary),&PointAndSize.size);
|
---|
| 1227 | SelectObject(MdiInfo[i].MdiRadInfo->hMemDC,hOldFont);
|
---|
| 1228 | DeleteObject(hFont);
|
---|
[3] | 1229 |
|
---|
[609] | 1230 | //テキストの終端に余裕を持たせる
|
---|
| 1231 | PointAndSize.size.cx+=20;
|
---|
[3] | 1232 |
|
---|
[609] | 1233 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cx<PointAndSize.size.cx)
|
---|
| 1234 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cx=PointAndSize.size.cx;
|
---|
| 1235 | }
|
---|
[3] | 1236 | }
|
---|
[609] | 1237 | DrawRadWindow(i,pWindowInfo);
|
---|
| 1238 | EndDialog(hwnd,1);
|
---|
| 1239 | return 1;
|
---|
[3] | 1240 | }
|
---|
| 1241 | case IDCANCEL:
|
---|
| 1242 | EndDialog(hwnd,0);
|
---|
| 1243 | return 1;
|
---|
| 1244 | }
|
---|
| 1245 | break;
|
---|
| 1246 | }
|
---|
| 1247 | return 0;
|
---|
| 1248 | }
|
---|
| 1249 | BOOL CALLBACK DlgRadProperty_Item_RenameID(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
| 1250 | extern HANDLE hHeap;
|
---|
| 1251 | extern HWND hClient,hOwner;
|
---|
| 1252 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 1253 | extern PROJECTINFO ProjectInfo;
|
---|
[609] | 1254 | int i,i3;
|
---|
[3] | 1255 | char *temporary;
|
---|
| 1256 |
|
---|
| 1257 | switch(message){
|
---|
| 1258 | case WM_INITDIALOG:
|
---|
[609] | 1259 | {
|
---|
| 1260 | SetPosCenter(hwnd);
|
---|
| 1261 | i=GetWndNum(GetWindow(hClient,GW_CHILD));
|
---|
| 1262 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
| 1263 | SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
|
---|
| 1264 | }
|
---|
[3] | 1265 | break;
|
---|
| 1266 | case WM_COMMAND:
|
---|
| 1267 | switch(LOWORD(wParam)){
|
---|
| 1268 | case IDOK:
|
---|
[609] | 1269 | {
|
---|
| 1270 | i=GetWndNum(GetWindow(hClient,GW_CHILD));
|
---|
| 1271 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 1272 |
|
---|
[609] | 1273 | i3=GetWindowTextLength(GetDlgItem(hwnd,IDC_IDNAME))+1;
|
---|
| 1274 | if(i3==1){
|
---|
| 1275 | //MsgBox "ID名を入力して下さい。"
|
---|
| 1276 | MessageBox(hOwner,STRING_ITEM_RENAME_MUST_ID,APPLICATION_NAME,MB_OK|MB_ICONEXCLAMATION);
|
---|
| 1277 | break;
|
---|
| 1278 | }
|
---|
| 1279 | temporary=(char *)HeapAlloc(hHeap,0,i3);
|
---|
| 1280 | GetDlgItemText(hwnd,IDC_IDNAME,temporary,i3);
|
---|
| 1281 | if(lstrcmp(temporary,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName)==0){
|
---|
| 1282 | HeapDefaultFree(temporary);
|
---|
| 1283 | SendMessage(hwnd,WM_COMMAND,IDCANCEL,0);
|
---|
| 1284 | return 1;
|
---|
| 1285 | }
|
---|
[3] | 1286 |
|
---|
[609] | 1287 | //MsgBox "アイテムのID名を変更すると、ソースコード内のID名は手動で変換する必要があります。変更しますか?"
|
---|
| 1288 | if(IDCANCEL==MessageBox(hwnd,STRING_ITEM_RENAME_CHECK,APPLICATION_NAME,MB_OKCANCEL|MB_ICONEXCLAMATION)) return 1;
|
---|
[3] | 1289 |
|
---|
[609] | 1290 | //変更情報を更新
|
---|
| 1291 | Rad_NoticeChanging(i,RAD_UNDO_NAME,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
|
---|
[3] | 1292 |
|
---|
[609] | 1293 | HeapDefaultFree(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
|
---|
| 1294 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName=temporary;
|
---|
[3] | 1295 |
|
---|
[609] | 1296 | EndDialog(hwnd,1);
|
---|
| 1297 | return 1;
|
---|
| 1298 | }
|
---|
[3] | 1299 | case IDCANCEL:
|
---|
| 1300 | EndDialog(hwnd,0);
|
---|
| 1301 | return 1;
|
---|
| 1302 | }
|
---|
| 1303 | break;
|
---|
| 1304 | }
|
---|
| 1305 | return 0;
|
---|
| 1306 | }
|
---|
| 1307 | BOOL DefaultItemStyles(HWND hwnd,int WndNum,int WndInfoNum,WPARAM wParam){
|
---|
| 1308 | extern HANDLE hHeap;
|
---|
| 1309 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 1310 | extern PROJECTINFO ProjectInfo;
|
---|
| 1311 |
|
---|
[609] | 1312 | WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[WndInfoNum];
|
---|
| 1313 |
|
---|
[3] | 1314 | switch(LOWORD(wParam)){
|
---|
| 1315 | case IDC_RENAMEID:
|
---|
[302] | 1316 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_RENAMEID),hwnd,(DLGPROC)DlgRadProperty_Item_RenameID)) return 1;
|
---|
[609] | 1317 | SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].IdName);
|
---|
[3] | 1318 | return 1;
|
---|
| 1319 | case IDC_RENAMECAPTION:
|
---|
[302] | 1320 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_RENAMECAPTION),hwnd,(DLGPROC)DlgRadProperty_Item_RenameCaption)) return 1;
|
---|
[609] | 1321 | SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].caption);
|
---|
[3] | 1322 | return 1;
|
---|
| 1323 | case IDC_STYLE_DISABLED:
|
---|
| 1324 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 1325 | //変更情報
|
---|
[609] | 1326 | Rad_NoticeChanging(WndNum,RAD_UNDO_STYLE,MdiInfo[WndNum].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 1327 |
|
---|
| 1328 | if(SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_GETCHECK,0,0))
|
---|
[609] | 1329 | pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style|=WS_DISABLED;
|
---|
[3] | 1330 | else
|
---|
[609] | 1331 | pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style&=~WS_DISABLED;
|
---|
| 1332 | DrawRadWindow(WndNum,pWindowInfo);
|
---|
[3] | 1333 | return 1;
|
---|
| 1334 | }
|
---|
| 1335 | break;
|
---|
| 1336 | case IDC_STYLE_VISIBLE:
|
---|
| 1337 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 1338 | //変更情報
|
---|
[609] | 1339 | Rad_NoticeChanging(WndNum,RAD_UNDO_STYLE,MdiInfo[WndNum].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 1340 |
|
---|
| 1341 | if(SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_GETCHECK,0,0))
|
---|
[609] | 1342 | pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style|=WS_VISIBLE;
|
---|
[3] | 1343 | else
|
---|
[609] | 1344 | pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style&=~WS_VISIBLE;
|
---|
[3] | 1345 | return 1;
|
---|
| 1346 | }
|
---|
| 1347 | break;
|
---|
| 1348 | case IDC_STYLE_GROUP:
|
---|
| 1349 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 1350 | //変更情報
|
---|
[609] | 1351 | Rad_NoticeChanging(WndNum,RAD_UNDO_STYLE,MdiInfo[WndNum].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 1352 |
|
---|
| 1353 | if(SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_GETCHECK,0,0))
|
---|
[609] | 1354 | pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style|=WS_GROUP;
|
---|
[3] | 1355 | else
|
---|
[609] | 1356 | pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style&=~WS_GROUP;
|
---|
[3] | 1357 | return 1;
|
---|
| 1358 | }
|
---|
| 1359 | break;
|
---|
| 1360 | case IDC_STYLE_TABSTOP:
|
---|
| 1361 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 1362 | //変更情報
|
---|
[609] | 1363 | Rad_NoticeChanging(WndNum,RAD_UNDO_STYLE,MdiInfo[WndNum].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 1364 |
|
---|
| 1365 | if(SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_GETCHECK,0,0))
|
---|
[609] | 1366 | pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style|=WS_TABSTOP;
|
---|
[3] | 1367 | else
|
---|
[609] | 1368 | pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style&=~WS_TABSTOP;
|
---|
[3] | 1369 | return 1;
|
---|
| 1370 | }
|
---|
| 1371 | break;
|
---|
| 1372 | }
|
---|
| 1373 | return 0;
|
---|
| 1374 | }
|
---|
| 1375 | BOOL CALLBACK DlgRadProperty_Item_ExStyle(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
| 1376 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 1377 | extern PROJECTINFO ProjectInfo;
|
---|
[609] | 1378 | int i;
|
---|
[3] | 1379 |
|
---|
| 1380 | switch(message){
|
---|
| 1381 | case WM_INITDIALOG:
|
---|
[609] | 1382 | {
|
---|
| 1383 | SetPosCenter(hwnd);
|
---|
| 1384 | i=GetWndNum(GetWindow(hClient,GW_CHILD));
|
---|
| 1385 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
| 1386 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ExStyle&WS_EX_ACCEPTFILES) SendDlgItemMessage(hwnd,IDC_EXSTYLE_ACCEPTFILES,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1387 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ExStyle&WS_EX_TRANSPARENT) SendDlgItemMessage(hwnd,IDC_EXSTYLE_TRANSPARENT,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1388 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ExStyle&WS_EX_DLGMODALFRAME) SendDlgItemMessage(hwnd,IDC_EXSTYLE_DLGMODALFRAME,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1389 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ExStyle&WS_EX_CLIENTEDGE) SendDlgItemMessage(hwnd,IDC_EXSTYLE_CLIENTEDGE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1390 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ExStyle&WS_EX_STATICEDGE) SendDlgItemMessage(hwnd,IDC_EXSTYLE_STATICEDGE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1391 | break;
|
---|
| 1392 | }
|
---|
[3] | 1393 | case WM_COMMAND:
|
---|
| 1394 | switch(LOWORD(wParam)){
|
---|
| 1395 | case IDOK:
|
---|
[609] | 1396 | {
|
---|
| 1397 | i=GetWndNum(GetWindow(hClient,GW_CHILD));
|
---|
| 1398 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 1399 |
|
---|
[609] | 1400 | DWORD style;
|
---|
| 1401 | style=0;
|
---|
| 1402 | if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_ACCEPTFILES,BM_GETCHECK,0,0))
|
---|
| 1403 | style|=WS_EX_ACCEPTFILES;
|
---|
| 1404 | if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_TRANSPARENT,BM_GETCHECK,0,0))
|
---|
| 1405 | style|=WS_EX_TRANSPARENT;
|
---|
| 1406 | if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_DLGMODALFRAME,BM_GETCHECK,0,0))
|
---|
| 1407 | style|=WS_EX_DLGMODALFRAME;
|
---|
| 1408 | if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_CLIENTEDGE,BM_GETCHECK,0,0))
|
---|
| 1409 | style|=WS_EX_CLIENTEDGE;
|
---|
| 1410 | if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_STATICEDGE,BM_GETCHECK,0,0))
|
---|
| 1411 | style|=WS_EX_STATICEDGE;
|
---|
[3] | 1412 |
|
---|
[609] | 1413 | if(style==pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ExStyle){
|
---|
| 1414 | SendMessage(hwnd,WM_COMMAND,IDCANCEL,0);
|
---|
| 1415 | return 1;
|
---|
| 1416 | }
|
---|
| 1417 |
|
---|
| 1418 | //変更情報
|
---|
| 1419 | Rad_NoticeChanging(i,RAD_UNDO_EXSTYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ExStyle);
|
---|
| 1420 |
|
---|
| 1421 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ExStyle=style;
|
---|
| 1422 | EndDialog(hwnd,1);
|
---|
[3] | 1423 | return 1;
|
---|
| 1424 | }
|
---|
| 1425 | case IDCANCEL:
|
---|
| 1426 | EndDialog(hwnd,0);
|
---|
| 1427 | return 1;
|
---|
| 1428 | }
|
---|
| 1429 | break;
|
---|
| 1430 | }
|
---|
| 1431 | return 0;
|
---|
| 1432 | }
|
---|
| 1433 |
|
---|
| 1434 |
|
---|
| 1435 | /////////////////////
|
---|
| 1436 | // BUTTON プロパティ
|
---|
| 1437 |
|
---|
| 1438 | BOOL CALLBACK RadProperty_ButtonProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
| 1439 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 1440 | extern PROJECTINFO ProjectInfo;
|
---|
| 1441 | int i,i2,i3;
|
---|
| 1442 | static BOOL bInitial;
|
---|
| 1443 |
|
---|
| 1444 | switch(message){
|
---|
| 1445 | case WM_INITDIALOG:
|
---|
[609] | 1446 | {
|
---|
| 1447 | bInitial=1;
|
---|
| 1448 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 1449 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 1450 |
|
---|
[609] | 1451 | SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
|
---|
| 1452 | SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption);
|
---|
[3] | 1453 |
|
---|
| 1454 |
|
---|
[609] | 1455 | ////////////
|
---|
| 1456 | //スタイル
|
---|
[3] | 1457 |
|
---|
[609] | 1458 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1459 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1460 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1461 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
|
---|
[3] | 1462 |
|
---|
[609] | 1463 | if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_OWNERDRAW)==BS_OWNERDRAW) SendDlgItemMessage(hwnd,IDC_BS_OWNERDRAW,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1464 | else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_DEFPUSHBUTTON) SendDlgItemMessage(hwnd,IDC_BS_DEFPUSHBUTTON,BM_SETCHECK,BST_CHECKED,0);
|
---|
[3] | 1465 |
|
---|
[609] | 1466 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_ICON) SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1467 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_BITMAP) SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1468 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_MULTILINE) SendDlgItemMessage(hwnd,IDC_BS_MULTILINE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1469 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_NOTIFY) SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_SETCHECK,BST_CHECKED,0);
|
---|
[3] | 1470 |
|
---|
| 1471 |
|
---|
[609] | 1472 | //////////////////
|
---|
| 1473 | // 水平方向の配置
|
---|
| 1474 | //////////////////
|
---|
[3] | 1475 |
|
---|
[609] | 1476 | //"デフォルト"
|
---|
| 1477 | SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_DEFAULT);
|
---|
| 1478 | //"左端"
|
---|
| 1479 | SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_LEFT);
|
---|
| 1480 | //"右端"
|
---|
| 1481 | SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_RIGHT);
|
---|
| 1482 | //"中央"
|
---|
| 1483 | SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_CENTER);
|
---|
[3] | 1484 |
|
---|
[609] | 1485 | //ビットを考慮してBS_CENTERを最初に比較する
|
---|
| 1486 | if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_CENTER)==BS_CENTER) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,3,0);
|
---|
| 1487 | else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_LEFT) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,1,0);
|
---|
| 1488 | else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_RIGHT) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,2,0);
|
---|
| 1489 | else SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,0,0);
|
---|
[3] | 1490 |
|
---|
| 1491 |
|
---|
[609] | 1492 | //////////////////
|
---|
| 1493 | // 垂直方向の配置
|
---|
| 1494 | //////////////////
|
---|
[3] | 1495 |
|
---|
[609] | 1496 | //"デフォルト"
|
---|
| 1497 | SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_DEFAULT);
|
---|
| 1498 | //"上端"
|
---|
| 1499 | SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_TOP);
|
---|
| 1500 | //"下端"
|
---|
| 1501 | SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_BOTTOM);
|
---|
| 1502 | //"中央"
|
---|
| 1503 | SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_CENTER);
|
---|
[3] | 1504 |
|
---|
[609] | 1505 | //ビットを考慮してBS_VCENTERを最初に比較する
|
---|
| 1506 | if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_VCENTER)==BS_VCENTER) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,3,0);
|
---|
| 1507 | else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_TOP) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,1,0);
|
---|
| 1508 | else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_BOTTOM) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,2,0);
|
---|
| 1509 | else SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,0,0);
|
---|
[3] | 1510 |
|
---|
| 1511 |
|
---|
[609] | 1512 | bInitial=0;
|
---|
| 1513 | break;
|
---|
| 1514 | }
|
---|
[3] | 1515 | case WM_COMMAND:
|
---|
[609] | 1516 | {
|
---|
| 1517 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 1518 | if(i==-1) return 1;
|
---|
| 1519 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 1520 | WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[i2];
|
---|
[3] | 1521 |
|
---|
[609] | 1522 | //共通スタイル
|
---|
| 1523 | if(bInitial==0){
|
---|
| 1524 | if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
|
---|
| 1525 | }
|
---|
[3] | 1526 |
|
---|
[609] | 1527 | switch(LOWORD(wParam)){
|
---|
| 1528 | case IDC_BS_DEFPUSHBUTTON:
|
---|
| 1529 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 1530 | //変更情報
|
---|
| 1531 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 1532 |
|
---|
[609] | 1533 | if(SendDlgItemMessage(hwnd,IDC_BS_DEFPUSHBUTTON,BM_GETCHECK,0,0)){
|
---|
| 1534 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_OWNERDRAW;
|
---|
| 1535 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_DEFPUSHBUTTON;
|
---|
| 1536 | SendDlgItemMessage(hwnd,IDC_BS_OWNERDRAW,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
| 1537 | }
|
---|
| 1538 | else
|
---|
| 1539 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_DEFPUSHBUTTON;
|
---|
| 1540 | DrawRadWindow(i,pWindowInfo);
|
---|
| 1541 | return 1;
|
---|
| 1542 | }
|
---|
| 1543 | break;
|
---|
| 1544 | case IDC_BS_OWNERDRAW:
|
---|
| 1545 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 1546 | //変更情報
|
---|
| 1547 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 1548 |
|
---|
[609] | 1549 | if(SendDlgItemMessage(hwnd,IDC_BS_OWNERDRAW,BM_GETCHECK,0,0)){
|
---|
| 1550 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_DEFPUSHBUTTON;
|
---|
| 1551 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_OWNERDRAW;
|
---|
| 1552 | SendDlgItemMessage(hwnd,IDC_BS_DEFPUSHBUTTON,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
| 1553 | }
|
---|
| 1554 | else
|
---|
| 1555 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_OWNERDRAW;
|
---|
| 1556 | DrawRadWindow(i,pWindowInfo);
|
---|
| 1557 | return 1;
|
---|
[3] | 1558 | }
|
---|
[609] | 1559 | break;
|
---|
| 1560 | case IDC_BS_ICON:
|
---|
| 1561 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 1562 | //変更情報
|
---|
| 1563 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 1564 |
|
---|
[609] | 1565 | if(SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_GETCHECK,0,0)){
|
---|
| 1566 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_ICON;
|
---|
| 1567 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_BITMAP;
|
---|
| 1568 | SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
| 1569 | }
|
---|
| 1570 | else
|
---|
| 1571 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_ICON;
|
---|
| 1572 | DrawRadWindow(i,pWindowInfo);
|
---|
| 1573 | return 1;
|
---|
[3] | 1574 | }
|
---|
[609] | 1575 | break;
|
---|
| 1576 | case IDC_BS_BITMAP:
|
---|
| 1577 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 1578 | //変更情報
|
---|
| 1579 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 1580 |
|
---|
[609] | 1581 | if(SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_GETCHECK,0,0)){
|
---|
| 1582 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_BITMAP;
|
---|
| 1583 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_ICON;
|
---|
| 1584 | SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
| 1585 | }
|
---|
| 1586 | else
|
---|
| 1587 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_BITMAP;
|
---|
| 1588 | DrawRadWindow(i,pWindowInfo);
|
---|
| 1589 | return 1;
|
---|
[3] | 1590 | }
|
---|
[609] | 1591 | break;
|
---|
| 1592 | case IDC_BS_MULTILINE:
|
---|
| 1593 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 1594 | //変更情報
|
---|
| 1595 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 1596 |
|
---|
[609] | 1597 | if(SendDlgItemMessage(hwnd,IDC_BS_MULTILINE,BM_GETCHECK,0,0))
|
---|
| 1598 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_MULTILINE;
|
---|
| 1599 | else
|
---|
| 1600 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_MULTILINE;
|
---|
| 1601 | DrawRadWindow(i,pWindowInfo);
|
---|
| 1602 | return 1;
|
---|
[3] | 1603 | }
|
---|
[609] | 1604 | break;
|
---|
| 1605 | case IDC_BS_NOTIFY:
|
---|
| 1606 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 1607 | //変更情報
|
---|
| 1608 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 1609 |
|
---|
[609] | 1610 | if(SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_GETCHECK,0,0))
|
---|
| 1611 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_NOTIFY;
|
---|
| 1612 | else
|
---|
| 1613 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_NOTIFY;
|
---|
| 1614 | return 1;
|
---|
| 1615 | }
|
---|
| 1616 | break;
|
---|
[3] | 1617 |
|
---|
[609] | 1618 | case IDC_BS_HPOS:
|
---|
| 1619 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 1620 | //変更情報
|
---|
| 1621 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 1622 |
|
---|
[609] | 1623 | i3=SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_GETCURSEL,0,0);
|
---|
| 1624 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(BS_LEFT|BS_RIGHT|BS_CENTER);
|
---|
| 1625 | if(i3==1) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_LEFT;
|
---|
| 1626 | else if(i3==2) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_RIGHT;
|
---|
| 1627 | else if(i3==3) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_CENTER;
|
---|
| 1628 | DrawRadWindow(i,pWindowInfo);
|
---|
| 1629 | return 1;
|
---|
| 1630 | }
|
---|
| 1631 | break;
|
---|
| 1632 | case IDC_BS_VPOS:
|
---|
| 1633 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 1634 | //変更情報
|
---|
| 1635 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 1636 |
|
---|
[609] | 1637 | i3=SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_GETCURSEL,0,0);
|
---|
| 1638 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(BS_TOP|BS_BOTTOM|BS_VCENTER);
|
---|
| 1639 | if(i3==1) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_TOP;
|
---|
| 1640 | else if(i3==2) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_BOTTOM;
|
---|
| 1641 | else if(i3==3) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_VCENTER;
|
---|
| 1642 | DrawRadWindow(i,pWindowInfo);
|
---|
| 1643 | return 1;
|
---|
| 1644 | }
|
---|
| 1645 | break;
|
---|
[3] | 1646 |
|
---|
[609] | 1647 | case IDC_EXSTYLE:
|
---|
| 1648 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1;
|
---|
| 1649 | DrawRadWindow(i,pWindowInfo);
|
---|
[3] | 1650 | return 1;
|
---|
[609] | 1651 | }
|
---|
| 1652 | break;
|
---|
[3] | 1653 | }
|
---|
| 1654 | }
|
---|
| 1655 | return 0;
|
---|
| 1656 | }
|
---|
| 1657 |
|
---|
| 1658 |
|
---|
| 1659 | ////////////////////////
|
---|
| 1660 | // CHECKBOX プロパティ
|
---|
| 1661 | BOOL CALLBACK RadProperty_CheckBoxProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
| 1662 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 1663 | extern PROJECTINFO ProjectInfo;
|
---|
| 1664 | int i,i2,i3;
|
---|
| 1665 | static BOOL bInitial;
|
---|
| 1666 |
|
---|
| 1667 | switch(message){
|
---|
| 1668 | case WM_INITDIALOG:
|
---|
[609] | 1669 | {
|
---|
| 1670 | bInitial=1;
|
---|
| 1671 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 1672 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 1673 |
|
---|
[609] | 1674 | SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
|
---|
| 1675 | SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption);
|
---|
[3] | 1676 |
|
---|
| 1677 |
|
---|
[609] | 1678 | ////////////
|
---|
| 1679 | //スタイル
|
---|
[3] | 1680 |
|
---|
[609] | 1681 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1682 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1683 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1684 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
|
---|
[3] | 1685 |
|
---|
[609] | 1686 | if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_AUTOCHECKBOX)==BS_AUTOCHECKBOX) SendDlgItemMessage(hwnd,IDC_BS_AUTO,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1687 | if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_AUTO3STATE)==BS_AUTO3STATE){
|
---|
| 1688 | SendDlgItemMessage(hwnd,IDC_BS_AUTO,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1689 | SendDlgItemMessage(hwnd,IDC_BS_3STATE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1690 | }
|
---|
| 1691 | if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_3STATE)==BS_3STATE) SendDlgItemMessage(hwnd,IDC_BS_3STATE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1692 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_PUSHLIKE) SendDlgItemMessage(hwnd,IDC_BS_PUSHLIKE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1693 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_LEFTTEXT) SendDlgItemMessage(hwnd,IDC_BS_LEFTTEXT,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1694 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_ICON) SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1695 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_BITMAP) SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1696 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_MULTILINE) SendDlgItemMessage(hwnd,IDC_BS_MULTILINE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1697 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_NOTIFY) SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_SETCHECK,BST_CHECKED,0);
|
---|
[3] | 1698 |
|
---|
| 1699 |
|
---|
[609] | 1700 | //////////////////
|
---|
| 1701 | // 水平方向の配置
|
---|
| 1702 | //////////////////
|
---|
[3] | 1703 |
|
---|
[609] | 1704 | //"デフォルト"
|
---|
| 1705 | SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_DEFAULT);
|
---|
| 1706 | //"左端"
|
---|
| 1707 | SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_LEFT);
|
---|
| 1708 | //"右端"
|
---|
| 1709 | SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_RIGHT);
|
---|
| 1710 | //"中央"
|
---|
| 1711 | SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_CENTER);
|
---|
[3] | 1712 |
|
---|
[609] | 1713 | //ビットを考慮してBS_CENTERを最初に比較する
|
---|
| 1714 | if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_CENTER)==BS_CENTER) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,3,0);
|
---|
| 1715 | else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_LEFT) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,1,0);
|
---|
| 1716 | else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_RIGHT) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,2,0);
|
---|
| 1717 | else SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,0,0);
|
---|
[3] | 1718 |
|
---|
| 1719 |
|
---|
[609] | 1720 | //////////////////
|
---|
| 1721 | // 垂直方向の配置
|
---|
| 1722 | //////////////////
|
---|
[3] | 1723 |
|
---|
[609] | 1724 | //"デフォルト"
|
---|
| 1725 | SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_DEFAULT);
|
---|
| 1726 | //"上端"
|
---|
| 1727 | SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_TOP);
|
---|
| 1728 | //"下端"
|
---|
| 1729 | SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_BOTTOM);
|
---|
| 1730 | //"中央"
|
---|
| 1731 | SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_CENTER);
|
---|
[3] | 1732 |
|
---|
[609] | 1733 | //ビットを考慮してBS_VCENTERを最初に比較する
|
---|
| 1734 | if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_VCENTER)==BS_VCENTER) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,3,0);
|
---|
| 1735 | else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_TOP) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,1,0);
|
---|
| 1736 | else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_BOTTOM) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,2,0);
|
---|
| 1737 | else SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,0,0);
|
---|
[3] | 1738 |
|
---|
| 1739 |
|
---|
[609] | 1740 | bInitial=0;
|
---|
| 1741 | break;
|
---|
| 1742 | }
|
---|
[3] | 1743 | case WM_COMMAND:
|
---|
[609] | 1744 | {
|
---|
| 1745 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 1746 | if(i==-1) return 1;
|
---|
| 1747 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 1748 | WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[i2];
|
---|
[3] | 1749 |
|
---|
[609] | 1750 | //共通スタイル
|
---|
| 1751 | if(bInitial==0){
|
---|
| 1752 | if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
|
---|
| 1753 | }
|
---|
[3] | 1754 |
|
---|
[609] | 1755 | switch(LOWORD(wParam)){
|
---|
| 1756 | case IDC_BS_AUTO:
|
---|
| 1757 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 1758 | //変更情報
|
---|
| 1759 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 1760 |
|
---|
[609] | 1761 | if(SendDlgItemMessage(hwnd,IDC_BS_AUTO,BM_GETCHECK,0,0)){
|
---|
| 1762 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x04){
|
---|
| 1763 | //3state
|
---|
| 1764 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=0xFFFFFFF0;
|
---|
| 1765 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_AUTO3STATE;
|
---|
| 1766 | }
|
---|
| 1767 | else{
|
---|
| 1768 | //2state
|
---|
| 1769 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=0xFFFFFFF0;
|
---|
| 1770 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_AUTOCHECKBOX;
|
---|
| 1771 | }
|
---|
[3] | 1772 | }
|
---|
| 1773 | else{
|
---|
[609] | 1774 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x04){
|
---|
| 1775 | //3state
|
---|
| 1776 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=0xFFFFFFF0;
|
---|
| 1777 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_3STATE;
|
---|
| 1778 | }
|
---|
| 1779 | else{
|
---|
| 1780 | //2state
|
---|
| 1781 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=0xFFFFFFF0;
|
---|
| 1782 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_CHECKBOX;
|
---|
| 1783 | }
|
---|
[3] | 1784 | }
|
---|
[609] | 1785 | return 1;
|
---|
[3] | 1786 | }
|
---|
[609] | 1787 | break;
|
---|
| 1788 | case IDC_BS_3STATE:
|
---|
| 1789 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 1790 | //変更情報
|
---|
| 1791 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 1792 |
|
---|
| 1793 | if(SendDlgItemMessage(hwnd,IDC_BS_3STATE,BM_GETCHECK,0,0)){
|
---|
| 1794 | if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0F)==BS_CHECKBOX){
|
---|
| 1795 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=0xFFFFFFF0;
|
---|
| 1796 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_3STATE;
|
---|
| 1797 | }
|
---|
| 1798 | else if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0F)==BS_AUTOCHECKBOX){
|
---|
| 1799 | //自動チェック
|
---|
| 1800 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=0xFFFFFFF0;
|
---|
| 1801 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_AUTO3STATE;
|
---|
| 1802 | }
|
---|
[3] | 1803 | }
|
---|
| 1804 | else{
|
---|
[609] | 1805 | if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0F)==BS_3STATE){
|
---|
| 1806 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=0xFFFFFFF0;
|
---|
| 1807 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_CHECKBOX;
|
---|
| 1808 | }
|
---|
| 1809 | else if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0F)==BS_AUTO3STATE){
|
---|
| 1810 | //自動チェック
|
---|
| 1811 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=0xFFFFFFF0;
|
---|
| 1812 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_AUTOCHECKBOX;
|
---|
| 1813 | }
|
---|
[3] | 1814 | }
|
---|
[609] | 1815 | return 1;
|
---|
[3] | 1816 | }
|
---|
[609] | 1817 | break;
|
---|
| 1818 | case IDC_BS_PUSHLIKE:
|
---|
| 1819 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 1820 | //変更情報
|
---|
| 1821 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 1822 |
|
---|
[609] | 1823 | if(SendDlgItemMessage(hwnd,IDC_BS_PUSHLIKE,BM_GETCHECK,0,0))
|
---|
| 1824 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_PUSHLIKE;
|
---|
| 1825 | else
|
---|
| 1826 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_PUSHLIKE;
|
---|
| 1827 | DrawRadWindow(i,pWindowInfo);
|
---|
| 1828 | return 1;
|
---|
| 1829 | }
|
---|
| 1830 | break;
|
---|
| 1831 | case IDC_BS_LEFTTEXT:
|
---|
| 1832 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 1833 | //変更情報
|
---|
| 1834 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 1835 |
|
---|
| 1836 | if(SendDlgItemMessage(hwnd,IDC_BS_LEFTTEXT,BM_GETCHECK,0,0))
|
---|
| 1837 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_LEFTTEXT;
|
---|
| 1838 | else
|
---|
| 1839 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_LEFTTEXT;
|
---|
| 1840 | DrawRadWindow(i,pWindowInfo);
|
---|
| 1841 | return 1;
|
---|
| 1842 | }
|
---|
| 1843 | break;
|
---|
| 1844 | case IDC_BS_ICON:
|
---|
| 1845 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 1846 | //変更情報
|
---|
| 1847 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 1848 |
|
---|
| 1849 | if(SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_GETCHECK,0,0)){
|
---|
| 1850 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_ICON;
|
---|
| 1851 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_BITMAP;
|
---|
| 1852 | SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
[3] | 1853 | }
|
---|
[609] | 1854 | else
|
---|
| 1855 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_ICON;
|
---|
| 1856 | DrawRadWindow(i,pWindowInfo);
|
---|
| 1857 | return 1;
|
---|
[3] | 1858 | }
|
---|
[609] | 1859 | break;
|
---|
| 1860 | case IDC_BS_BITMAP:
|
---|
| 1861 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 1862 | //変更情報
|
---|
| 1863 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 1864 |
|
---|
| 1865 | if(SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_GETCHECK,0,0)){
|
---|
| 1866 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_BITMAP;
|
---|
| 1867 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_ICON;
|
---|
| 1868 | SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
[3] | 1869 | }
|
---|
[609] | 1870 | else
|
---|
| 1871 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_BITMAP;
|
---|
| 1872 | DrawRadWindow(i,pWindowInfo);
|
---|
| 1873 | return 1;
|
---|
[3] | 1874 | }
|
---|
[609] | 1875 | break;
|
---|
| 1876 | case IDC_BS_MULTILINE:
|
---|
| 1877 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 1878 | //変更情報
|
---|
| 1879 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 1880 |
|
---|
[609] | 1881 | if(SendDlgItemMessage(hwnd,IDC_BS_MULTILINE,BM_GETCHECK,0,0))
|
---|
| 1882 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_MULTILINE;
|
---|
| 1883 | else
|
---|
| 1884 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_MULTILINE;
|
---|
| 1885 | DrawRadWindow(i,pWindowInfo);
|
---|
| 1886 | return 1;
|
---|
[3] | 1887 | }
|
---|
[609] | 1888 | break;
|
---|
| 1889 | case IDC_BS_NOTIFY:
|
---|
| 1890 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 1891 | //変更情報
|
---|
| 1892 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 1893 |
|
---|
[609] | 1894 | if(SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_GETCHECK,0,0))
|
---|
| 1895 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_NOTIFY;
|
---|
| 1896 | else
|
---|
| 1897 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_NOTIFY;
|
---|
| 1898 | return 1;
|
---|
[3] | 1899 | }
|
---|
[609] | 1900 | break;
|
---|
[3] | 1901 |
|
---|
[609] | 1902 | case IDC_BS_HPOS:
|
---|
| 1903 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 1904 | //変更情報
|
---|
| 1905 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 1906 |
|
---|
[609] | 1907 | i3=SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_GETCURSEL,0,0);
|
---|
| 1908 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(BS_LEFT|BS_RIGHT|BS_CENTER);
|
---|
| 1909 | if(i3==1) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_LEFT;
|
---|
| 1910 | else if(i3==2) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_RIGHT;
|
---|
| 1911 | else if(i3==3) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_CENTER;
|
---|
| 1912 | DrawRadWindow(i,pWindowInfo);
|
---|
| 1913 | return 1;
|
---|
| 1914 | }
|
---|
| 1915 | break;
|
---|
| 1916 | case IDC_BS_VPOS:
|
---|
| 1917 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 1918 | //変更情報
|
---|
| 1919 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 1920 |
|
---|
[609] | 1921 | i3=SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_GETCURSEL,0,0);
|
---|
| 1922 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(BS_TOP|BS_BOTTOM|BS_VCENTER);
|
---|
| 1923 | if(i3==1) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_TOP;
|
---|
| 1924 | else if(i3==2) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_BOTTOM;
|
---|
| 1925 | else if(i3==3) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_VCENTER;
|
---|
| 1926 | DrawRadWindow(i,pWindowInfo);
|
---|
| 1927 | return 1;
|
---|
| 1928 | }
|
---|
| 1929 | break;
|
---|
[3] | 1930 |
|
---|
[609] | 1931 | case IDC_EXSTYLE:
|
---|
| 1932 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1;
|
---|
| 1933 | DrawRadWindow(i,pWindowInfo);
|
---|
[3] | 1934 | return 1;
|
---|
[609] | 1935 | }
|
---|
[3] | 1936 | }
|
---|
| 1937 | }
|
---|
| 1938 | return 0;
|
---|
| 1939 | }
|
---|
| 1940 |
|
---|
| 1941 |
|
---|
| 1942 | ///////////////////////
|
---|
| 1943 | // COMBOBOX プロパティ
|
---|
| 1944 |
|
---|
| 1945 | void RadProperty_ComboBox_StylingOrder(HWND hwnd,DWORD *style){
|
---|
| 1946 | if(!(*style&(CBS_OWNERDRAWFIXED|CBS_OWNERDRAWVARIABLE))){
|
---|
| 1947 | *style&=~(CBS_HASSTRINGS);
|
---|
| 1948 | SendDlgItemMessage(hwnd,IDC_CBS_HASSTRINGS,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
| 1949 | EnableWindow(GetDlgItem(hwnd,IDC_CBS_HASSTRINGS),0);
|
---|
| 1950 | }
|
---|
| 1951 | else EnableWindow(GetDlgItem(hwnd,IDC_CBS_HASSTRINGS),1);
|
---|
| 1952 | }
|
---|
| 1953 | BOOL CALLBACK RadProperty_ComboBoxProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
| 1954 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 1955 | extern PROJECTINFO ProjectInfo;
|
---|
| 1956 | int i,i2,i3;
|
---|
| 1957 | static BOOL bInitial;
|
---|
| 1958 |
|
---|
| 1959 | switch(message){
|
---|
| 1960 | case WM_INITDIALOG:
|
---|
[609] | 1961 | {
|
---|
| 1962 | bInitial=1;
|
---|
| 1963 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 1964 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 1965 |
|
---|
[609] | 1966 | SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
|
---|
[3] | 1967 |
|
---|
| 1968 |
|
---|
[609] | 1969 | /////////////////////////////////
|
---|
| 1970 | // スタイル
|
---|
| 1971 | ////////////
|
---|
[3] | 1972 |
|
---|
[609] | 1973 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1974 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1975 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1976 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
|
---|
[3] | 1977 |
|
---|
[609] | 1978 | ////////
|
---|
| 1979 | // 選択
|
---|
| 1980 | ////////
|
---|
[3] | 1981 |
|
---|
[609] | 1982 | //"デフォルト"
|
---|
| 1983 | SendDlgItemMessage(hwnd,IDC_CBS_TYPE,CB_ADDSTRING,0,(long)STRING_DEFAULT);
|
---|
| 1984 | //"ドロップ ダウン"
|
---|
| 1985 | SendDlgItemMessage(hwnd,IDC_CBS_TYPE,CB_ADDSTRING,0,(long)STRING_COMBOBOXPROP_STYLE_DROPDOWN);
|
---|
| 1986 | //"ドロップ ダウン リスト"
|
---|
| 1987 | SendDlgItemMessage(hwnd,IDC_CBS_TYPE,CB_ADDSTRING,0,(long)STRING_COMBOBOXPROP_STYLE_DROPDOWNLIST);
|
---|
[3] | 1988 |
|
---|
[609] | 1989 | //ビットを考慮してCBS_DROPDOWNLISTを最初に比較する
|
---|
| 1990 | if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_DROPDOWNLIST)==CBS_DROPDOWNLIST) SendDlgItemMessage(hwnd,IDC_CBS_TYPE,CB_SETCURSEL,2,0);
|
---|
| 1991 | else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_SIMPLE) SendDlgItemMessage(hwnd,IDC_CBS_TYPE,CB_SETCURSEL,0,0);
|
---|
| 1992 | else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_DROPDOWN) SendDlgItemMessage(hwnd,IDC_CBS_TYPE,CB_SETCURSEL,1,0);
|
---|
[3] | 1993 |
|
---|
| 1994 |
|
---|
[609] | 1995 | ////////////////
|
---|
| 1996 | // オーナー描画
|
---|
| 1997 | ////////////////
|
---|
[3] | 1998 |
|
---|
[609] | 1999 | //"なし"
|
---|
| 2000 | SendDlgItemMessage(hwnd,IDC_CBS_OWNERDRAW,CB_ADDSTRING,0,(long)STRING_NONE_);
|
---|
| 2001 | //"固定"
|
---|
| 2002 | SendDlgItemMessage(hwnd,IDC_CBS_OWNERDRAW,CB_ADDSTRING,0,(long)STRING_OWNERDRAW_FIXED);
|
---|
| 2003 | //"可変"
|
---|
| 2004 | SendDlgItemMessage(hwnd,IDC_CBS_OWNERDRAW,CB_ADDSTRING,0,(long)STRING_OWNERDRAW_VARIABLE);
|
---|
[3] | 2005 |
|
---|
[609] | 2006 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_OWNERDRAWFIXED) SendDlgItemMessage(hwnd,IDC_CBS_OWNERDRAW,CB_SETCURSEL,1,0);
|
---|
| 2007 | else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_OWNERDRAWVARIABLE) SendDlgItemMessage(hwnd,IDC_CBS_OWNERDRAW,CB_SETCURSEL,2,0);
|
---|
| 2008 | else SendDlgItemMessage(hwnd,IDC_CBS_OWNERDRAW,CB_SETCURSEL,0,0);
|
---|
[3] | 2009 |
|
---|
[609] | 2010 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_HASSTRINGS) SendDlgItemMessage(hwnd,IDC_CBS_HASSTRINGS,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2011 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_SORT) SendDlgItemMessage(hwnd,IDC_CBS_SORT,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2012 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_NOINTEGRALHEIGHT) SendDlgItemMessage(hwnd,IDC_CBS_NOINTEGRALHEIGHT,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2013 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_OEMCONVERT) SendDlgItemMessage(hwnd,IDC_CBS_OEMCONVERT,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2014 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VSCROLL) SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLL,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2015 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_AUTOHSCROLL) SendDlgItemMessage(hwnd,IDC_CBS_AUTOHSCROLL,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2016 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_DISABLENOSCROLL) SendDlgItemMessage(hwnd,IDC_CBS_DISABLENOSCROLL,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2017 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_UPPERCASE) SendDlgItemMessage(hwnd,IDC_CBS_UPPERCASE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2018 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_LOWERCASE) SendDlgItemMessage(hwnd,IDC_CBS_LOWERCASE,BM_SETCHECK,BST_CHECKED,0);
|
---|
[3] | 2019 |
|
---|
[609] | 2020 | RadProperty_ComboBox_StylingOrder(hwnd,&pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 2021 |
|
---|
| 2022 |
|
---|
[609] | 2023 | bInitial=0;
|
---|
| 2024 | break;
|
---|
| 2025 | }
|
---|
[3] | 2026 | case WM_COMMAND:
|
---|
[609] | 2027 | {
|
---|
| 2028 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 2029 | if(i==-1) return 1;
|
---|
| 2030 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 2031 | WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[i2];
|
---|
[3] | 2032 |
|
---|
[609] | 2033 | //共通スタイル
|
---|
| 2034 | if(bInitial==0){
|
---|
| 2035 | if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
|
---|
| 2036 | }
|
---|
[3] | 2037 |
|
---|
[609] | 2038 | switch(LOWORD(wParam)){
|
---|
| 2039 | case IDC_CBS_TYPE:
|
---|
| 2040 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 2041 | //変更情報
|
---|
| 2042 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 2043 |
|
---|
[609] | 2044 | i3=SendDlgItemMessage(hwnd,IDC_CBS_TYPE,CB_GETCURSEL,0,0);
|
---|
| 2045 | //CBS_DROPDOWNLIST=CBS_SIMPLE | CBS_DROPDOWN
|
---|
| 2046 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(CBS_DROPDOWNLIST);
|
---|
| 2047 | if(i3==0) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_SIMPLE;
|
---|
| 2048 | else if(i3==1) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_DROPDOWN;
|
---|
| 2049 | else if(i3==2) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_DROPDOWNLIST;
|
---|
[3] | 2050 |
|
---|
[609] | 2051 | DrawRadWindow(i,pWindowInfo);
|
---|
| 2052 | return 1;
|
---|
| 2053 | }
|
---|
| 2054 | break;
|
---|
| 2055 | case IDC_CBS_OWNERDRAW:
|
---|
| 2056 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 2057 | //変更情報
|
---|
| 2058 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 2059 |
|
---|
[609] | 2060 | i3=SendDlgItemMessage(hwnd,IDC_CBS_OWNERDRAW,CB_GETCURSEL,0,0);
|
---|
| 2061 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(CBS_OWNERDRAWFIXED|CBS_OWNERDRAWVARIABLE);
|
---|
| 2062 | if(i3==1) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_OWNERDRAWFIXED;
|
---|
| 2063 | else if(i3==2) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_OWNERDRAWVARIABLE;
|
---|
[3] | 2064 |
|
---|
[609] | 2065 | RadProperty_ComboBox_StylingOrder(hwnd,&pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 2066 | return 1;
|
---|
| 2067 | }
|
---|
| 2068 | break;
|
---|
[3] | 2069 |
|
---|
[609] | 2070 | case IDC_CBS_HASSTRINGS:
|
---|
| 2071 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2072 | //変更情報
|
---|
| 2073 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 2074 |
|
---|
[609] | 2075 | if(SendDlgItemMessage(hwnd,IDC_CBS_HASSTRINGS,BM_GETCHECK,0,0))
|
---|
| 2076 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_HASSTRINGS;
|
---|
| 2077 | else
|
---|
| 2078 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~CBS_HASSTRINGS;
|
---|
| 2079 | return 1;
|
---|
| 2080 | }
|
---|
| 2081 | break;
|
---|
| 2082 | case IDC_CBS_SORT:
|
---|
| 2083 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2084 | //変更情報
|
---|
| 2085 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 2086 |
|
---|
[609] | 2087 | if(SendDlgItemMessage(hwnd,IDC_CBS_SORT,BM_GETCHECK,0,0))
|
---|
| 2088 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_SORT;
|
---|
| 2089 | else
|
---|
| 2090 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~CBS_SORT;
|
---|
| 2091 | return 1;
|
---|
| 2092 | }
|
---|
| 2093 | break;
|
---|
| 2094 | case IDC_CBS_NOINTEGRALHEIGHT:
|
---|
| 2095 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2096 | //変更情報
|
---|
| 2097 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 2098 |
|
---|
[609] | 2099 | if(SendDlgItemMessage(hwnd,IDC_CBS_NOINTEGRALHEIGHT,BM_GETCHECK,0,0))
|
---|
| 2100 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_NOINTEGRALHEIGHT;
|
---|
| 2101 | else
|
---|
| 2102 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~CBS_NOINTEGRALHEIGHT;
|
---|
| 2103 | return 1;
|
---|
| 2104 | }
|
---|
| 2105 | break;
|
---|
| 2106 | case IDC_CBS_OEMCONVERT:
|
---|
| 2107 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2108 | //変更情報
|
---|
| 2109 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 2110 |
|
---|
[609] | 2111 | if(SendDlgItemMessage(hwnd,IDC_CBS_OEMCONVERT,BM_GETCHECK,0,0))
|
---|
| 2112 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_OEMCONVERT;
|
---|
| 2113 | else
|
---|
| 2114 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~CBS_OEMCONVERT;
|
---|
| 2115 | return 1;
|
---|
| 2116 | }
|
---|
| 2117 | break;
|
---|
| 2118 | case IDC_STYLE_VSCROLL:
|
---|
| 2119 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2120 | //変更情報
|
---|
| 2121 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 2122 |
|
---|
[609] | 2123 | if(SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLL,BM_GETCHECK,0,0))
|
---|
| 2124 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=WS_VSCROLL;
|
---|
| 2125 | else
|
---|
| 2126 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~WS_VSCROLL;
|
---|
| 2127 | DrawRadWindow(i,pWindowInfo);
|
---|
| 2128 | return 1;
|
---|
| 2129 | }
|
---|
| 2130 | break;
|
---|
| 2131 | case IDC_CBS_AUTOHSCROLL:
|
---|
| 2132 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2133 | //変更情報
|
---|
| 2134 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 2135 |
|
---|
[609] | 2136 | if(SendDlgItemMessage(hwnd,IDC_CBS_AUTOHSCROLL,BM_GETCHECK,0,0))
|
---|
| 2137 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_AUTOHSCROLL;
|
---|
| 2138 | else
|
---|
| 2139 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~CBS_AUTOHSCROLL;
|
---|
| 2140 | return 1;
|
---|
| 2141 | }
|
---|
| 2142 | break;
|
---|
| 2143 | case IDC_CBS_DISABLENOSCROLL:
|
---|
| 2144 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2145 | //変更情報
|
---|
| 2146 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 2147 |
|
---|
[609] | 2148 | if(SendDlgItemMessage(hwnd,IDC_CBS_DISABLENOSCROLL,BM_GETCHECK,0,0))
|
---|
| 2149 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_DISABLENOSCROLL;
|
---|
| 2150 | else
|
---|
| 2151 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~CBS_DISABLENOSCROLL;
|
---|
| 2152 | DrawRadWindow(i,pWindowInfo);
|
---|
| 2153 | return 1;
|
---|
| 2154 | }
|
---|
| 2155 | break;
|
---|
| 2156 | case IDC_CBS_UPPERCASE:
|
---|
| 2157 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2158 | //変更情報
|
---|
| 2159 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 2160 |
|
---|
[609] | 2161 | if(SendDlgItemMessage(hwnd,IDC_CBS_UPPERCASE,BM_GETCHECK,0,0))
|
---|
| 2162 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_UPPERCASE;
|
---|
| 2163 | else
|
---|
| 2164 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~CBS_UPPERCASE;
|
---|
| 2165 | return 1;
|
---|
| 2166 | }
|
---|
| 2167 | break;
|
---|
| 2168 | case IDC_CBS_LOWERCASE:
|
---|
| 2169 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2170 | //変更情報
|
---|
| 2171 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 2172 |
|
---|
[609] | 2173 | if(SendDlgItemMessage(hwnd,IDC_CBS_LOWERCASE,BM_GETCHECK,0,0))
|
---|
| 2174 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_LOWERCASE;
|
---|
| 2175 | else
|
---|
| 2176 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~CBS_LOWERCASE;
|
---|
| 2177 | return 1;
|
---|
| 2178 | }
|
---|
| 2179 | break;
|
---|
[3] | 2180 |
|
---|
[609] | 2181 | case IDC_EXSTYLE:
|
---|
| 2182 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1;
|
---|
| 2183 | DrawRadWindow(i,pWindowInfo);
|
---|
[3] | 2184 | return 1;
|
---|
[609] | 2185 | }
|
---|
| 2186 | break;
|
---|
[3] | 2187 | }
|
---|
| 2188 | }
|
---|
| 2189 | return 0;
|
---|
| 2190 | }
|
---|
| 2191 |
|
---|
| 2192 |
|
---|
| 2193 | /////////////////////
|
---|
| 2194 | // EDIT プロパティ
|
---|
| 2195 |
|
---|
| 2196 | void RadProperty_Edit_StylingOrder(HWND hwnd,DWORD *style){
|
---|
| 2197 | if(*style&ES_MULTILINE){
|
---|
| 2198 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_HSCROLL),1);
|
---|
| 2199 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_VSCROLL),1);
|
---|
| 2200 | EnableWindow(GetDlgItem(hwnd,IDC_ES_AUTOVSCROLL),1);
|
---|
| 2201 |
|
---|
| 2202 | *style&=~(ES_PASSWORD);
|
---|
| 2203 | SendDlgItemMessage(hwnd,IDC_ES_PASSWORD,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
| 2204 | EnableWindow(GetDlgItem(hwnd,IDC_ES_PASSWORD),0);
|
---|
| 2205 | }
|
---|
| 2206 | else{
|
---|
| 2207 | EnableWindow(GetDlgItem(hwnd,IDC_ES_PASSWORD),1);
|
---|
| 2208 |
|
---|
| 2209 | *style&=~(WS_HSCROLL|WS_VSCROLL|ES_AUTOVSCROLL);
|
---|
| 2210 | SendDlgItemMessage(hwnd,IDC_STYLE_HSCROLL,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
| 2211 | SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLL,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
| 2212 | SendDlgItemMessage(hwnd,IDC_ES_AUTOVSCROLL,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
| 2213 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_HSCROLL),0);
|
---|
| 2214 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_VSCROLL),0);
|
---|
| 2215 | EnableWindow(GetDlgItem(hwnd,IDC_ES_AUTOVSCROLL),0);
|
---|
| 2216 | }
|
---|
| 2217 | }
|
---|
| 2218 | BOOL CALLBACK RadProperty_EditProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
| 2219 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 2220 | extern PROJECTINFO ProjectInfo;
|
---|
| 2221 | int i,i2,i3;
|
---|
| 2222 | static BOOL bInitial;
|
---|
| 2223 |
|
---|
| 2224 | switch(message){
|
---|
| 2225 | case WM_INITDIALOG:
|
---|
[609] | 2226 | {
|
---|
| 2227 | bInitial=1;
|
---|
| 2228 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 2229 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 2230 |
|
---|
[609] | 2231 | SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
|
---|
| 2232 | SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption);
|
---|
[3] | 2233 |
|
---|
| 2234 |
|
---|
[609] | 2235 | ////////////
|
---|
| 2236 | // スタイル
|
---|
| 2237 | ////////////
|
---|
[3] | 2238 |
|
---|
[609] | 2239 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2240 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2241 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2242 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
|
---|
[3] | 2243 |
|
---|
[609] | 2244 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_MULTILINE) SendDlgItemMessage(hwnd,IDC_ES_MULTILINE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2245 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_NUMBER) SendDlgItemMessage(hwnd,IDC_ES_NUMBER,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2246 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_HSCROLL) SendDlgItemMessage(hwnd,IDC_STYLE_HSCROLL,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2247 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_AUTOHSCROLL) SendDlgItemMessage(hwnd,IDC_ES_AUTOHSCROLL,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2248 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VSCROLL) SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLL,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2249 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_AUTOVSCROLL) SendDlgItemMessage(hwnd,IDC_ES_AUTOVSCROLL,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2250 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_PASSWORD) SendDlgItemMessage(hwnd,IDC_ES_PASSWORD,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2251 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_NOHIDESEL) SendDlgItemMessage(hwnd,IDC_ES_NOHIDESEL,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2252 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_OEMCONVERT) SendDlgItemMessage(hwnd,IDC_ES_OEMCONVERT,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2253 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_WANTRETURN) SendDlgItemMessage(hwnd,IDC_ES_WANTRETURN,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2254 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_UPPERCASE) SendDlgItemMessage(hwnd,IDC_ES_UPPERCASE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2255 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_LOWERCASE) SendDlgItemMessage(hwnd,IDC_ES_LOWERCASE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2256 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_READONLY) SendDlgItemMessage(hwnd,IDC_ES_READONLY,BM_SETCHECK,BST_CHECKED,0);
|
---|
[3] | 2257 |
|
---|
| 2258 |
|
---|
[609] | 2259 | //////////////////
|
---|
| 2260 | // テキストの配置
|
---|
| 2261 | //////////////////
|
---|
[3] | 2262 |
|
---|
[609] | 2263 | //"左端"
|
---|
| 2264 | SendDlgItemMessage(hwnd,IDC_ES_TEXTPOS,CB_ADDSTRING,0,(long)STRING_LEFT);
|
---|
| 2265 | //"中央"
|
---|
| 2266 | SendDlgItemMessage(hwnd,IDC_ES_TEXTPOS,CB_ADDSTRING,0,(long)STRING_CENTER);
|
---|
| 2267 | //"右端"
|
---|
| 2268 | SendDlgItemMessage(hwnd,IDC_ES_TEXTPOS,CB_ADDSTRING,0,(long)STRING_RIGHT);
|
---|
[3] | 2269 |
|
---|
[609] | 2270 | //ビットを考慮してES_LEFTを最後に検討する
|
---|
| 2271 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_CENTER) SendDlgItemMessage(hwnd,IDC_ES_TEXTPOS,CB_SETCURSEL,1,0);
|
---|
| 2272 | else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_RIGHT) SendDlgItemMessage(hwnd,IDC_ES_TEXTPOS,CB_SETCURSEL,2,0);
|
---|
| 2273 | else SendDlgItemMessage(hwnd,IDC_ES_TEXTPOS,CB_SETCURSEL,0,0);
|
---|
[3] | 2274 |
|
---|
[609] | 2275 | RadProperty_Edit_StylingOrder(hwnd,&pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 2276 |
|
---|
| 2277 |
|
---|
[609] | 2278 | bInitial=0;
|
---|
| 2279 | break;
|
---|
| 2280 | }
|
---|
[3] | 2281 | case WM_COMMAND:
|
---|
[609] | 2282 | {
|
---|
| 2283 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 2284 | if(i==-1) return 1;
|
---|
| 2285 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 2286 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 2287 |
|
---|
[609] | 2288 | //共通スタイル
|
---|
| 2289 | if(bInitial==0){
|
---|
| 2290 | if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
|
---|
| 2291 | }
|
---|
[3] | 2292 |
|
---|
[609] | 2293 | switch(LOWORD(wParam)){
|
---|
| 2294 | case IDC_ES_MULTILINE:
|
---|
| 2295 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2296 | //変更情報
|
---|
| 2297 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 2298 |
|
---|
[609] | 2299 | if(SendDlgItemMessage(hwnd,IDC_ES_MULTILINE,BM_GETCHECK,0,0))
|
---|
| 2300 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_MULTILINE;
|
---|
| 2301 | else
|
---|
| 2302 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_MULTILINE;
|
---|
| 2303 | RadProperty_Edit_StylingOrder(hwnd,&pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 2304 | DrawRadWindow(i,pWindowInfo);
|
---|
| 2305 | return 1;
|
---|
| 2306 | }
|
---|
| 2307 | break;
|
---|
| 2308 | case IDC_ES_NUMBER:
|
---|
| 2309 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2310 | //変更情報
|
---|
| 2311 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 2312 |
|
---|
[609] | 2313 | if(SendDlgItemMessage(hwnd,IDC_ES_NUMBER,BM_GETCHECK,0,0))
|
---|
| 2314 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_NUMBER;
|
---|
| 2315 | else
|
---|
| 2316 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_NUMBER;
|
---|
| 2317 | return 1;
|
---|
| 2318 | }
|
---|
| 2319 | break;
|
---|
| 2320 | case IDC_STYLE_HSCROLL:
|
---|
| 2321 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2322 | //変更情報
|
---|
| 2323 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 2324 |
|
---|
[609] | 2325 | if(SendDlgItemMessage(hwnd,IDC_STYLE_HSCROLL,BM_GETCHECK,0,0))
|
---|
| 2326 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=WS_HSCROLL;
|
---|
| 2327 | else
|
---|
| 2328 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~WS_HSCROLL;
|
---|
| 2329 | DrawRadWindow(i,pWindowInfo);
|
---|
| 2330 | return 1;
|
---|
| 2331 | }
|
---|
| 2332 | break;
|
---|
| 2333 | case IDC_ES_AUTOHSCROLL:
|
---|
| 2334 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2335 | //変更情報
|
---|
| 2336 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 2337 |
|
---|
[609] | 2338 | if(SendDlgItemMessage(hwnd,IDC_ES_AUTOHSCROLL,BM_GETCHECK,0,0))
|
---|
| 2339 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_AUTOHSCROLL;
|
---|
| 2340 | else
|
---|
| 2341 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_AUTOHSCROLL;
|
---|
| 2342 | DrawRadWindow(i,pWindowInfo);
|
---|
| 2343 | return 1;
|
---|
| 2344 | }
|
---|
| 2345 | break;
|
---|
| 2346 | case IDC_STYLE_VSCROLL:
|
---|
| 2347 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2348 | //変更情報
|
---|
| 2349 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 2350 |
|
---|
[609] | 2351 | if(SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLL,BM_GETCHECK,0,0))
|
---|
| 2352 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=WS_VSCROLL;
|
---|
| 2353 | else
|
---|
| 2354 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~WS_VSCROLL;
|
---|
| 2355 | DrawRadWindow(i,pWindowInfo);
|
---|
| 2356 | return 1;
|
---|
| 2357 | }
|
---|
| 2358 | break;
|
---|
| 2359 | case IDC_ES_AUTOVSCROLL:
|
---|
| 2360 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2361 | //変更情報
|
---|
| 2362 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 2363 |
|
---|
[609] | 2364 | if(SendDlgItemMessage(hwnd,IDC_ES_AUTOVSCROLL,BM_GETCHECK,0,0))
|
---|
| 2365 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_AUTOVSCROLL;
|
---|
| 2366 | else
|
---|
| 2367 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_AUTOVSCROLL;
|
---|
| 2368 | DrawRadWindow(i,pWindowInfo);
|
---|
| 2369 | return 1;
|
---|
| 2370 | }
|
---|
| 2371 | break;
|
---|
| 2372 | case IDC_ES_PASSWORD:
|
---|
| 2373 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2374 | //変更情報
|
---|
| 2375 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 2376 |
|
---|
[609] | 2377 | if(SendDlgItemMessage(hwnd,IDC_ES_PASSWORD,BM_GETCHECK,0,0))
|
---|
| 2378 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_PASSWORD;
|
---|
| 2379 | else
|
---|
| 2380 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_PASSWORD;
|
---|
| 2381 | DrawRadWindow(i,pWindowInfo);
|
---|
| 2382 | return 1;
|
---|
| 2383 | }
|
---|
| 2384 | break;
|
---|
| 2385 | case IDC_ES_NOHIDESEL:
|
---|
| 2386 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2387 | //変更情報
|
---|
| 2388 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 2389 |
|
---|
[609] | 2390 | if(SendDlgItemMessage(hwnd,IDC_ES_NOHIDESEL,BM_GETCHECK,0,0))
|
---|
| 2391 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_NOHIDESEL;
|
---|
| 2392 | else
|
---|
| 2393 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_NOHIDESEL;
|
---|
| 2394 | DrawRadWindow(i,pWindowInfo);
|
---|
| 2395 | return 1;
|
---|
| 2396 | }
|
---|
| 2397 | break;
|
---|
| 2398 | case IDC_ES_OEMCONVERT:
|
---|
| 2399 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2400 | //変更情報
|
---|
| 2401 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 2402 |
|
---|
[609] | 2403 | if(SendDlgItemMessage(hwnd,IDC_ES_OEMCONVERT,BM_GETCHECK,0,0))
|
---|
| 2404 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_OEMCONVERT;
|
---|
| 2405 | else
|
---|
| 2406 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_OEMCONVERT;
|
---|
| 2407 | DrawRadWindow(i,pWindowInfo);
|
---|
| 2408 | return 1;
|
---|
| 2409 | }
|
---|
| 2410 | break;
|
---|
| 2411 | case IDC_ES_WANTRETURN:
|
---|
| 2412 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2413 | //変更情報
|
---|
| 2414 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 2415 |
|
---|
[609] | 2416 | if(SendDlgItemMessage(hwnd,IDC_ES_WANTRETURN,BM_GETCHECK,0,0))
|
---|
| 2417 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_WANTRETURN;
|
---|
| 2418 | else
|
---|
| 2419 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_WANTRETURN;
|
---|
| 2420 | DrawRadWindow(i,pWindowInfo);
|
---|
| 2421 | return 1;
|
---|
| 2422 | }
|
---|
| 2423 | break;
|
---|
| 2424 | case IDC_ES_UPPERCASE:
|
---|
| 2425 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2426 | //変更情報
|
---|
| 2427 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 2428 |
|
---|
[609] | 2429 | if(SendDlgItemMessage(hwnd,IDC_ES_UPPERCASE,BM_GETCHECK,0,0)){
|
---|
| 2430 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_LOWERCASE;
|
---|
| 2431 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_UPPERCASE;
|
---|
| 2432 | SendDlgItemMessage(hwnd,IDC_ES_LOWERCASE,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
| 2433 | }
|
---|
| 2434 | else
|
---|
| 2435 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_UPPERCASE;
|
---|
| 2436 | DrawRadWindow(i,pWindowInfo);
|
---|
| 2437 | return 1;
|
---|
| 2438 | }
|
---|
| 2439 | break;
|
---|
| 2440 | case IDC_ES_LOWERCASE:
|
---|
| 2441 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2442 | //変更情報
|
---|
| 2443 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 2444 |
|
---|
[609] | 2445 | if(SendDlgItemMessage(hwnd,IDC_ES_LOWERCASE,BM_GETCHECK,0,0)){
|
---|
| 2446 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_UPPERCASE;
|
---|
| 2447 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_LOWERCASE;
|
---|
| 2448 | SendDlgItemMessage(hwnd,IDC_ES_UPPERCASE,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
| 2449 | }
|
---|
| 2450 | else
|
---|
| 2451 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_LOWERCASE;
|
---|
| 2452 | DrawRadWindow(i,pWindowInfo);
|
---|
| 2453 | return 1;
|
---|
[3] | 2454 | }
|
---|
[609] | 2455 | break;
|
---|
| 2456 | case IDC_ES_READONLY:
|
---|
| 2457 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2458 | //変更情報
|
---|
| 2459 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 2460 |
|
---|
[609] | 2461 | if(SendDlgItemMessage(hwnd,IDC_ES_READONLY,BM_GETCHECK,0,0))
|
---|
| 2462 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_READONLY;
|
---|
| 2463 | else
|
---|
| 2464 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_READONLY;
|
---|
| 2465 | DrawRadWindow(i,pWindowInfo);
|
---|
| 2466 | return 1;
|
---|
[3] | 2467 | }
|
---|
[609] | 2468 | break;
|
---|
[3] | 2469 |
|
---|
[609] | 2470 | case IDC_ES_TEXTPOS:
|
---|
| 2471 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 2472 | //変更情報
|
---|
| 2473 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 2474 |
|
---|
[609] | 2475 | i3=SendDlgItemMessage(hwnd,IDC_ES_TEXTPOS,CB_GETCURSEL,0,0);
|
---|
| 2476 | //ES_LEFT=0
|
---|
| 2477 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(ES_CENTER|ES_RIGHT);
|
---|
| 2478 | if(i3==1) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_CENTER;
|
---|
| 2479 | else if(i3==2) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_RIGHT;
|
---|
| 2480 | DrawRadWindow(i,pWindowInfo);
|
---|
| 2481 | return 1;
|
---|
| 2482 | }
|
---|
| 2483 | break;
|
---|
[3] | 2484 |
|
---|
[609] | 2485 | case IDC_EXSTYLE:
|
---|
| 2486 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1;
|
---|
| 2487 | DrawRadWindow(i,pWindowInfo);
|
---|
[3] | 2488 | return 1;
|
---|
[609] | 2489 | }
|
---|
| 2490 | break;
|
---|
[3] | 2491 | }
|
---|
| 2492 | }
|
---|
| 2493 | return 0;
|
---|
| 2494 | }
|
---|
| 2495 |
|
---|
| 2496 |
|
---|
| 2497 | ////////////////////////
|
---|
| 2498 | // GROUPBOX プロパティ
|
---|
| 2499 |
|
---|
| 2500 | BOOL CALLBACK RadProperty_GroupBoxProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
| 2501 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 2502 | extern PROJECTINFO ProjectInfo;
|
---|
| 2503 | int i,i2,i3;
|
---|
| 2504 | static BOOL bInitial;
|
---|
| 2505 |
|
---|
| 2506 | switch(message){
|
---|
| 2507 | case WM_INITDIALOG:
|
---|
[609] | 2508 | {
|
---|
| 2509 | bInitial=1;
|
---|
| 2510 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 2511 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 2512 |
|
---|
[609] | 2513 | SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
|
---|
| 2514 | SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption);
|
---|
[3] | 2515 |
|
---|
| 2516 |
|
---|
[609] | 2517 | /////////////////////////////
|
---|
| 2518 | // スタイル
|
---|
| 2519 | ////////////
|
---|
[3] | 2520 |
|
---|
[609] | 2521 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2522 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2523 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2524 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
|
---|
[3] | 2525 |
|
---|
| 2526 |
|
---|
[609] | 2527 | //////////////////
|
---|
| 2528 | // 水平方向の配置
|
---|
| 2529 | //////////////////
|
---|
[3] | 2530 |
|
---|
[609] | 2531 | //"デフォルト"
|
---|
| 2532 | SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_ADDSTRING,0,(long)STRING_DEFAULT);
|
---|
| 2533 | //"左端"
|
---|
| 2534 | SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_ADDSTRING,0,(long)STRING_LEFT);
|
---|
| 2535 | //"右端"
|
---|
| 2536 | SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_ADDSTRING,0,(long)STRING_RIGHT);
|
---|
| 2537 | //"中央"
|
---|
| 2538 | SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_ADDSTRING,0,(long)STRING_CENTER);
|
---|
[3] | 2539 |
|
---|
[609] | 2540 | //ビットを考慮してBS_CENTERを最初に検討する
|
---|
| 2541 | if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_CENTER)==BS_CENTER) SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_SETCURSEL,3,0);
|
---|
| 2542 | else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_LEFT) SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_SETCURSEL,1,0);
|
---|
| 2543 | else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_RIGHT) SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_SETCURSEL,2,0);
|
---|
| 2544 | else SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_SETCURSEL,0,0);
|
---|
[3] | 2545 |
|
---|
[609] | 2546 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_ICON) SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2547 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_BITMAP) SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2548 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_NOTIFY) SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_SETCHECK,BST_CHECKED,0);
|
---|
[3] | 2549 |
|
---|
| 2550 |
|
---|
[609] | 2551 | bInitial=0;
|
---|
| 2552 | break;
|
---|
| 2553 | }
|
---|
[3] | 2554 | case WM_COMMAND:
|
---|
[609] | 2555 | {
|
---|
| 2556 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 2557 | if(i==-1) return 1;
|
---|
| 2558 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 2559 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 2560 |
|
---|
[609] | 2561 | //共通スタイル
|
---|
| 2562 | if(bInitial==0){
|
---|
| 2563 | if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
|
---|
| 2564 | }
|
---|
[3] | 2565 |
|
---|
[609] | 2566 | switch(LOWORD(wParam)){
|
---|
| 2567 | case IDC_BS_POSITION:
|
---|
| 2568 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 2569 | //変更情報
|
---|
| 2570 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 2571 |
|
---|
[609] | 2572 | i3=SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_GETCURSEL,0,0);
|
---|
| 2573 | //BS_CENTER=BS_LEFT | BS_RIGHT
|
---|
| 2574 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(BS_CENTER);
|
---|
| 2575 | if(i3==1) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_LEFT;
|
---|
| 2576 | else if(i3==2) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_RIGHT;
|
---|
| 2577 | else if(i3==3) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_CENTER;
|
---|
| 2578 | DrawRadWindow(i,pWindowInfo);
|
---|
| 2579 | return 1;
|
---|
| 2580 | }
|
---|
| 2581 | break;
|
---|
[3] | 2582 |
|
---|
[609] | 2583 | case IDC_BS_ICON:
|
---|
| 2584 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2585 | //変更情報
|
---|
| 2586 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 2587 |
|
---|
[609] | 2588 | if(SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_GETCHECK,0,0))
|
---|
| 2589 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_ICON;
|
---|
| 2590 | else
|
---|
| 2591 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_ICON;
|
---|
| 2592 | DrawRadWindow(i,pWindowInfo);
|
---|
| 2593 | return 1;
|
---|
| 2594 | }
|
---|
| 2595 | break;
|
---|
| 2596 | case IDC_BS_BITMAP:
|
---|
| 2597 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2598 | //変更情報
|
---|
| 2599 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 2600 |
|
---|
[609] | 2601 | if(SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_GETCHECK,0,0))
|
---|
| 2602 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_BITMAP;
|
---|
| 2603 | else
|
---|
| 2604 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_BITMAP;
|
---|
| 2605 | DrawRadWindow(i,pWindowInfo);
|
---|
| 2606 | return 1;
|
---|
| 2607 | }
|
---|
| 2608 | break;
|
---|
| 2609 | case IDC_BS_NOTIFY:
|
---|
| 2610 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2611 | //変更情報
|
---|
| 2612 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 2613 |
|
---|
[609] | 2614 | if(SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_GETCHECK,0,0))
|
---|
| 2615 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_NOTIFY;
|
---|
| 2616 | else
|
---|
| 2617 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_NOTIFY;
|
---|
| 2618 | return 1;
|
---|
| 2619 | }
|
---|
| 2620 | break;
|
---|
[3] | 2621 |
|
---|
[609] | 2622 | case IDC_EXSTYLE:
|
---|
| 2623 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1;
|
---|
| 2624 | DrawRadWindow(i,pWindowInfo);
|
---|
[3] | 2625 | return 1;
|
---|
[609] | 2626 | }
|
---|
| 2627 | break;
|
---|
[3] | 2628 | }
|
---|
| 2629 | }
|
---|
| 2630 | return 0;
|
---|
| 2631 | }
|
---|
| 2632 |
|
---|
| 2633 |
|
---|
| 2634 | ////////////////////////
|
---|
| 2635 | // IMAGEBOX プロパティ
|
---|
| 2636 |
|
---|
| 2637 | void RadProperty_ImageBox_StylingOrder(HWND hwnd,DWORD *style){
|
---|
| 2638 | if((*style&0x000F)==SS_ICON||
|
---|
| 2639 | (*style&0x000F)==SS_BITMAP){
|
---|
| 2640 | EnableWindow(GetDlgItem(hwnd,IDC_PATH),1);
|
---|
| 2641 | EnableWindow(GetDlgItem(hwnd,IDC_CHANGEPATH),1);
|
---|
| 2642 | EnableWindow(GetDlgItem(hwnd,IDC_SS_CENTERIMAGE),1);
|
---|
| 2643 | EnableWindow(GetDlgItem(hwnd,IDC_SS_RIGHTJUST),1);
|
---|
| 2644 | }
|
---|
| 2645 | else{
|
---|
| 2646 | EnableWindow(GetDlgItem(hwnd,IDC_PATH),0);
|
---|
| 2647 | EnableWindow(GetDlgItem(hwnd,IDC_CHANGEPATH),0);
|
---|
| 2648 | EnableWindow(GetDlgItem(hwnd,IDC_SS_CENTERIMAGE),0);
|
---|
| 2649 | EnableWindow(GetDlgItem(hwnd,IDC_SS_RIGHTJUST),0);
|
---|
| 2650 | }
|
---|
| 2651 | }
|
---|
| 2652 | BOOL CALLBACK RadProperty_ImageBoxProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
| 2653 | extern HANDLE hHeap;
|
---|
| 2654 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 2655 | extern PROJECTINFO ProjectInfo;
|
---|
| 2656 | int i,i2,i3;
|
---|
| 2657 | char temporary[MAX_PATH];
|
---|
| 2658 | static BOOL bInitial;
|
---|
| 2659 |
|
---|
| 2660 | switch(message){
|
---|
| 2661 | case WM_INITDIALOG:
|
---|
[609] | 2662 | {
|
---|
| 2663 | bInitial=1;
|
---|
| 2664 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 2665 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 2666 |
|
---|
[609] | 2667 | SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
|
---|
[3] | 2668 |
|
---|
| 2669 |
|
---|
[609] | 2670 | /////////////////////////////
|
---|
| 2671 | // スタイル
|
---|
| 2672 | ////////////
|
---|
[3] | 2673 |
|
---|
[609] | 2674 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2675 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2676 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2677 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
|
---|
[3] | 2678 |
|
---|
[609] | 2679 | //////////
|
---|
| 2680 | // タイプ
|
---|
| 2681 | //////////
|
---|
[3] | 2682 |
|
---|
[609] | 2683 | //"フレーム(黒)"
|
---|
| 2684 | SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_FRAME_BLACK);
|
---|
| 2685 | //"フレーム(灰色)"
|
---|
| 2686 | SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_FRAME_GRAY);
|
---|
| 2687 | //"フレーム(白)"
|
---|
| 2688 | SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_FRAME_WHITE);
|
---|
| 2689 | //"フレーム(縁取り)"
|
---|
| 2690 | SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_FRAME_ETCHED);
|
---|
| 2691 | //"四角形(黒)"
|
---|
| 2692 | SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_RECT_BLACK);
|
---|
| 2693 | //"四角形(灰色)"
|
---|
| 2694 | SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_RECT_GRAY);
|
---|
| 2695 | //"四角形(白)"
|
---|
| 2696 | SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_RECT_WHITE);
|
---|
| 2697 | //"アイコン"
|
---|
| 2698 | SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_ICON);
|
---|
| 2699 | //"ビットマップ"
|
---|
| 2700 | SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_BITMAP);
|
---|
[3] | 2701 |
|
---|
[609] | 2702 | if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_BLACKFRAME) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,0,0);
|
---|
| 2703 | else if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_GRAYFRAME) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,1,0);
|
---|
| 2704 | else if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_WHITEFRAME) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,2,0);
|
---|
| 2705 | else if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000001F)==SS_ETCHEDFRAME) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,3,0);
|
---|
| 2706 | else if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_BLACKRECT) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,4,0);
|
---|
| 2707 | else if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_GRAYRECT) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,5,0);
|
---|
| 2708 | else if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_WHITERECT) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,6,0);
|
---|
| 2709 | if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_ICON||
|
---|
| 2710 | (pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_BITMAP){
|
---|
| 2711 | if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_ICON) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,7,0);
|
---|
| 2712 | else if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_BITMAP) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,8,0);
|
---|
[3] | 2713 |
|
---|
[609] | 2714 | //リソース/ファイル スイッチチェックを表示
|
---|
| 2715 | ShowWindow(GetDlgItem(hwnd,IDC_FILE),SW_SHOW);
|
---|
| 2716 | ShowWindow(GetDlgItem(hwnd,IDC_RESOURCE),SW_SHOW);
|
---|
| 2717 |
|
---|
| 2718 | //イメージ状態テキストを表示
|
---|
| 2719 | ShowWindow(GetDlgItem(hwnd,IDC_IMAGE_SITUATION),SW_SHOW);
|
---|
[3] | 2720 |
|
---|
[609] | 2721 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.type==IMGTYPE_FILE){
|
---|
| 2722 | //ファイル指定を表示
|
---|
| 2723 | ShowWindow(GetDlgItem(hwnd,IDC_PATH),SW_SHOW);
|
---|
| 2724 | ShowWindow(GetDlgItem(hwnd,IDC_CHANGEPATH),SW_SHOW);
|
---|
| 2725 | SetDlgItemText(hwnd,IDC_PATH,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.path);
|
---|
[3] | 2726 |
|
---|
[609] | 2727 | //イメージ状態テキスト
|
---|
| 2728 | //"ファイル指定:"
|
---|
| 2729 | SetDlgItemText(hwnd,IDC_IMAGE_SITUATION,STRING_IMAGEBOXPROP_STYLE_FROMFILE);
|
---|
[3] | 2730 |
|
---|
[609] | 2731 | SendDlgItemMessage(hwnd,IDC_FILE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2732 | }
|
---|
| 2733 | else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.type==IMGTYPE_RES){
|
---|
| 2734 | //リソース指定を表示
|
---|
| 2735 | ShowWindow(GetDlgItem(hwnd,IDC_RESCOMBO),SW_SHOW);
|
---|
[3] | 2736 |
|
---|
[609] | 2737 | //イメージ状態テキスト
|
---|
| 2738 | //"リソース指定:"
|
---|
| 2739 | SetDlgItemText(hwnd,IDC_IMAGE_SITUATION,STRING_IMAGEBOXPROP_STYLE_FROMRESOURCE);
|
---|
[3] | 2740 |
|
---|
[609] | 2741 | SendDlgItemMessage(hwnd,IDC_RESOURCE,BM_SETCHECK,BST_CHECKED,0);
|
---|
[3] | 2742 |
|
---|
[609] | 2743 | SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_RESETCONTENT,0,0);
|
---|
[3] | 2744 |
|
---|
[609] | 2745 | if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_ICON){
|
---|
| 2746 | //アイコンリソースをコンボボックスに挿入
|
---|
| 2747 | for(i3=0;i3<ProjectInfo.res.NumberOfIconRes;i3++)
|
---|
| 2748 | SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_ADDSTRING,0,(long)ProjectInfo.res.pIconResInfo[i3].IdName);
|
---|
| 2749 | }
|
---|
| 2750 | else if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_BITMAP){
|
---|
| 2751 | //ビットマップリソースをコンボボックスに挿入
|
---|
| 2752 | for(i3=0;i3<ProjectInfo.res.NumberOfBitmapRes;i3++)
|
---|
| 2753 | SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_ADDSTRING,0,(long)ProjectInfo.res.pBitmapResInfo[i3].IdName);
|
---|
| 2754 | }
|
---|
| 2755 |
|
---|
| 2756 | //リストから選択
|
---|
| 2757 | i3=SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_FINDSTRING,0,(long)pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.path);
|
---|
| 2758 | SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_SETCURSEL,i3,0);
|
---|
[3] | 2759 | }
|
---|
| 2760 | }
|
---|
| 2761 |
|
---|
[609] | 2762 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&SS_NOTIFY) SendDlgItemMessage(hwnd,IDC_SS_NOTIFY,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2763 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&SS_CENTERIMAGE) SendDlgItemMessage(hwnd,IDC_SS_CENTERIMAGE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2764 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&SS_RIGHTJUST) SendDlgItemMessage(hwnd,IDC_SS_RIGHTJUST,BM_SETCHECK,BST_CHECKED,0);
|
---|
[3] | 2765 |
|
---|
[609] | 2766 | RadProperty_ImageBox_StylingOrder(hwnd,&pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 2767 |
|
---|
[609] | 2768 | bInitial=0;
|
---|
| 2769 | break;
|
---|
| 2770 | }
|
---|
[3] | 2771 | case WM_COMMAND:
|
---|
[609] | 2772 | {
|
---|
| 2773 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 2774 | if(i==-1) return 1;
|
---|
| 2775 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 2776 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 2777 |
|
---|
[609] | 2778 | //共通スタイル
|
---|
| 2779 | if(bInitial==0){
|
---|
| 2780 | if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
|
---|
| 2781 | }
|
---|
[3] | 2782 |
|
---|
[609] | 2783 | switch(LOWORD(wParam)){
|
---|
| 2784 | case IDC_IMAGE_TYPE:
|
---|
| 2785 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 2786 | //変更情報
|
---|
| 2787 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 2788 |
|
---|
[609] | 2789 | i3=SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_GETCURSEL,0,0);
|
---|
| 2790 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(0x0000001F);
|
---|
| 2791 | if(i3==0) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_BLACKFRAME;
|
---|
| 2792 | else if(i3==1) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_GRAYFRAME;
|
---|
| 2793 | else if(i3==2) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_WHITEFRAME;
|
---|
| 2794 | else if(i3==3) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_ETCHEDFRAME;
|
---|
| 2795 | else if(i3==4) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_BLACKRECT;
|
---|
| 2796 | else if(i3==5) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_GRAYRECT;
|
---|
| 2797 | else if(i3==6) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_WHITERECT;
|
---|
| 2798 | else if(i3==7) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_ICON;
|
---|
| 2799 | else if(i3==8) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_BITMAP;
|
---|
[3] | 2800 |
|
---|
[609] | 2801 | if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_ICON||
|
---|
| 2802 | (pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_BITMAP){
|
---|
| 2803 | //リソース/ファイル スイッチチェックを表示
|
---|
| 2804 | ShowWindow(GetDlgItem(hwnd,IDC_FILE),SW_SHOW);
|
---|
| 2805 | ShowWindow(GetDlgItem(hwnd,IDC_RESOURCE),SW_SHOW);
|
---|
[3] | 2806 |
|
---|
[609] | 2807 | //イメージ状態テキストを表示
|
---|
| 2808 | ShowWindow(GetDlgItem(hwnd,IDC_IMAGE_SITUATION),SW_SHOW);
|
---|
[3] | 2809 |
|
---|
[609] | 2810 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.type==IMGTYPE_FILE){
|
---|
| 2811 | //ファイル指定を表示
|
---|
| 2812 | ShowWindow(GetDlgItem(hwnd,IDC_PATH),SW_SHOW);
|
---|
| 2813 | ShowWindow(GetDlgItem(hwnd,IDC_CHANGEPATH),SW_SHOW);
|
---|
| 2814 | SetDlgItemText(hwnd,IDC_PATH,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.path);
|
---|
[3] | 2815 |
|
---|
[609] | 2816 | //イメージ状態テキスト
|
---|
| 2817 | //"ファイル指定:"
|
---|
| 2818 | SetDlgItemText(hwnd,IDC_IMAGE_SITUATION,STRING_IMAGEBOXPROP_STYLE_FROMFILE);
|
---|
[3] | 2819 |
|
---|
[609] | 2820 | SendDlgItemMessage(hwnd,IDC_FILE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2821 | }
|
---|
| 2822 | else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.type==IMGTYPE_RES){
|
---|
| 2823 | //リソース指定を表示
|
---|
| 2824 | ShowWindow(GetDlgItem(hwnd,IDC_RESCOMBO),SW_SHOW);
|
---|
[3] | 2825 |
|
---|
[609] | 2826 | //イメージ状態テキスト
|
---|
| 2827 | //"リソース指定:"
|
---|
| 2828 | SetDlgItemText(hwnd,IDC_IMAGE_SITUATION,STRING_IMAGEBOXPROP_STYLE_FROMRESOURCE);
|
---|
[3] | 2829 |
|
---|
[609] | 2830 | SendDlgItemMessage(hwnd,IDC_RESOURCE,BM_SETCHECK,BST_CHECKED,0);
|
---|
[3] | 2831 |
|
---|
[609] | 2832 | SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_RESETCONTENT,0,0);
|
---|
[3] | 2833 |
|
---|
[609] | 2834 | if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_ICON){
|
---|
| 2835 | //アイコンリソースをコンボボックスに挿入
|
---|
| 2836 | for(i3=0;i3<ProjectInfo.res.NumberOfIconRes;i3++){
|
---|
| 2837 | SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_ADDSTRING,0,(long)ProjectInfo.res.pIconResInfo[i3].IdName);
|
---|
[3] | 2838 |
|
---|
[609] | 2839 | if(lstrcmp(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.path,ProjectInfo.res.pIconResInfo[i3].IdName)==0)
|
---|
| 2840 | SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_SETCURSEL,i3,0);
|
---|
| 2841 | }
|
---|
[3] | 2842 | }
|
---|
[609] | 2843 | else if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_BITMAP){
|
---|
| 2844 | //ビットマップリソースをコンボボックスに挿入
|
---|
| 2845 | for(i3=0;i3<ProjectInfo.res.NumberOfBitmapRes;i3++){
|
---|
| 2846 | SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_ADDSTRING,0,(long)ProjectInfo.res.pBitmapResInfo[i3].IdName);
|
---|
[3] | 2847 |
|
---|
[609] | 2848 | if(lstrcmp(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.path,ProjectInfo.res.pBitmapResInfo[i3].IdName)==0)
|
---|
| 2849 | SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_SETCURSEL,i3,0);
|
---|
| 2850 | }
|
---|
[3] | 2851 | }
|
---|
| 2852 | }
|
---|
| 2853 | }
|
---|
[609] | 2854 | else{
|
---|
| 2855 | //リソース/ファイル スイッチチェックを非表示
|
---|
| 2856 | ShowWindow(GetDlgItem(hwnd,IDC_FILE),SW_HIDE);
|
---|
| 2857 | ShowWindow(GetDlgItem(hwnd,IDC_RESOURCE),SW_HIDE);
|
---|
[3] | 2858 |
|
---|
[609] | 2859 | //イメージ状態テキストを非表示
|
---|
| 2860 | ShowWindow(GetDlgItem(hwnd,IDC_IMAGE_SITUATION),SW_HIDE);
|
---|
[3] | 2861 |
|
---|
[609] | 2862 | //ファイル指定を非表示
|
---|
| 2863 | ShowWindow(GetDlgItem(hwnd,IDC_PATH),SW_HIDE);
|
---|
| 2864 | ShowWindow(GetDlgItem(hwnd,IDC_CHANGEPATH),SW_HIDE);
|
---|
[3] | 2865 |
|
---|
[609] | 2866 | //リソース指定を非表示
|
---|
| 2867 | ShowWindow(GetDlgItem(hwnd,IDC_RESCOMBO),SW_HIDE);
|
---|
| 2868 | }
|
---|
| 2869 |
|
---|
| 2870 | RadProperty_ImageBox_StylingOrder(hwnd,&pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 2871 | DrawRadWindow(i,pWindowInfo);
|
---|
| 2872 | return 1;
|
---|
[3] | 2873 | }
|
---|
| 2874 | break;
|
---|
| 2875 |
|
---|
[609] | 2876 | case IDC_FILE:
|
---|
| 2877 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.type==IMGTYPE_FILE){
|
---|
| 2878 | //変更無し
|
---|
| 2879 | break;
|
---|
| 2880 | }
|
---|
[3] | 2881 |
|
---|
[609] | 2882 | //変更情報
|
---|
| 2883 | Rad_NoticeChanging(i,RAD_UNDO_IMAGESTATE,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo);
|
---|
[3] | 2884 |
|
---|
[609] | 2885 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.type=IMGTYPE_FILE;
|
---|
[3] | 2886 |
|
---|
[609] | 2887 | //ファイル指定を表示
|
---|
| 2888 | ShowWindow(GetDlgItem(hwnd,IDC_PATH),SW_SHOW);
|
---|
| 2889 | ShowWindow(GetDlgItem(hwnd,IDC_CHANGEPATH),SW_SHOW);
|
---|
| 2890 | SetDlgItemText(hwnd,IDC_PATH,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.path);
|
---|
[3] | 2891 |
|
---|
[609] | 2892 | //リソース指定を非表示
|
---|
| 2893 | ShowWindow(GetDlgItem(hwnd,IDC_RESCOMBO),SW_HIDE);
|
---|
[3] | 2894 |
|
---|
[609] | 2895 | //イメージ状態テキスト
|
---|
| 2896 | //"ファイル指定:"
|
---|
| 2897 | SetDlgItemText(hwnd,IDC_IMAGE_SITUATION,STRING_IMAGEBOXPROP_STYLE_FROMFILE);
|
---|
[3] | 2898 |
|
---|
[609] | 2899 | SendDlgItemMessage(hwnd,IDC_FILE,BM_SETCHECK,BST_CHECKED,0);
|
---|
[3] | 2900 | break;
|
---|
| 2901 |
|
---|
[609] | 2902 | case IDC_RESOURCE:
|
---|
| 2903 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.type==IMGTYPE_RES){
|
---|
| 2904 | //変更無し
|
---|
| 2905 | break;
|
---|
| 2906 | }
|
---|
[3] | 2907 |
|
---|
[609] | 2908 | //変更情報
|
---|
| 2909 | Rad_NoticeChanging(i,RAD_UNDO_IMAGESTATE,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo);
|
---|
[3] | 2910 |
|
---|
[609] | 2911 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.type=IMGTYPE_RES;
|
---|
[3] | 2912 |
|
---|
[609] | 2913 | //ファイル指定を非表示
|
---|
| 2914 | ShowWindow(GetDlgItem(hwnd,IDC_PATH),SW_HIDE);
|
---|
| 2915 | ShowWindow(GetDlgItem(hwnd,IDC_CHANGEPATH),SW_HIDE);
|
---|
[3] | 2916 |
|
---|
[609] | 2917 | //リソース指定を表示
|
---|
| 2918 | ShowWindow(GetDlgItem(hwnd,IDC_RESCOMBO),SW_SHOW);
|
---|
[3] | 2919 |
|
---|
[609] | 2920 | //イメージ状態テキスト
|
---|
| 2921 | //"リソース指定:"
|
---|
| 2922 | SetDlgItemText(hwnd,IDC_IMAGE_SITUATION,STRING_IMAGEBOXPROP_STYLE_FROMRESOURCE);
|
---|
[3] | 2923 |
|
---|
[609] | 2924 | SendDlgItemMessage(hwnd,IDC_RESOURCE,BM_SETCHECK,BST_CHECKED,0);
|
---|
[3] | 2925 |
|
---|
[609] | 2926 | SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_RESETCONTENT,0,0);
|
---|
[3] | 2927 |
|
---|
[609] | 2928 | if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_ICON){
|
---|
| 2929 | //アイコンリソースをコンボボックスに挿入
|
---|
| 2930 | for(i3=0;i3<ProjectInfo.res.NumberOfIconRes;i3++)
|
---|
| 2931 | SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_ADDSTRING,0,(long)ProjectInfo.res.pIconResInfo[i3].IdName);
|
---|
| 2932 | }
|
---|
| 2933 | else if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_BITMAP){
|
---|
| 2934 | //ビットマップリソースをコンボボックスに挿入
|
---|
| 2935 | for(i3=0;i3<ProjectInfo.res.NumberOfBitmapRes;i3++)
|
---|
| 2936 | SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_ADDSTRING,0,(long)ProjectInfo.res.pBitmapResInfo[i3].IdName);
|
---|
| 2937 | }
|
---|
| 2938 | break;
|
---|
[3] | 2939 |
|
---|
[609] | 2940 | case IDC_RESCOMBO:
|
---|
| 2941 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 2942 | //変更情報
|
---|
| 2943 | Rad_NoticeChanging(i,RAD_UNDO_IMAGESTATE,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo);
|
---|
[3] | 2944 |
|
---|
[609] | 2945 | i3=SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_GETCURSEL,0,0);
|
---|
| 2946 | SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_GETLBTEXT,i3,(long)temporary);
|
---|
[3] | 2947 |
|
---|
[609] | 2948 | HeapDefaultFree(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.path);
|
---|
| 2949 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.path=(char *)HeapAlloc(hHeap,0,lstrlen(temporary)+1);
|
---|
| 2950 | lstrcpy(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.path,temporary);
|
---|
[3] | 2951 |
|
---|
[609] | 2952 | DrawRadWindow(i,pWindowInfo);
|
---|
| 2953 | }
|
---|
| 2954 | break;
|
---|
| 2955 |
|
---|
| 2956 | case IDC_CHANGEPATH:
|
---|
| 2957 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2958 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.type==IMGTYPE_FILE){
|
---|
| 2959 | if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x000F)==SS_ICON){
|
---|
| 2960 | extern LPSTR IconFileFilter;
|
---|
| 2961 | //"アイコン ファイルを指定して下さい"
|
---|
| 2962 | if(!GetFilePathDialog(hwnd,temporary,IconFileFilter,STRING_IMAGEBOXPROP_GETPATH_ICON,1)) return 1;
|
---|
| 2963 | }
|
---|
| 2964 | else if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x000F)==SS_BITMAP){
|
---|
| 2965 | extern LPSTR BitmapFileFilter;
|
---|
| 2966 | //"ビットマップ ファイルを指定して下さい"
|
---|
| 2967 | if(!GetFilePathDialog(hwnd,temporary,BitmapFileFilter,STRING_IMAGEBOXPROP_GETPATH_BITMAP,1)) return 1;
|
---|
| 2968 | }
|
---|
| 2969 |
|
---|
| 2970 | //変更情報
|
---|
| 2971 | Rad_NoticeChanging(i,RAD_UNDO_IMAGESTATE,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo);
|
---|
| 2972 |
|
---|
| 2973 | GetRelationalPath(temporary,ProjectInfo.dir);
|
---|
| 2974 | HeapDefaultFree(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.path);
|
---|
| 2975 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.path=(char *)HeapAlloc(hHeap,0,lstrlen(temporary)+1);
|
---|
| 2976 | lstrcpy(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.path,temporary);
|
---|
| 2977 |
|
---|
| 2978 | SetDlgItemText(hwnd,IDC_PATH,temporary);
|
---|
| 2979 | DrawRadWindow(i,pWindowInfo);
|
---|
[3] | 2980 | }
|
---|
[609] | 2981 | return 1;
|
---|
| 2982 | }
|
---|
| 2983 | break;
|
---|
[3] | 2984 |
|
---|
[609] | 2985 | case IDC_SS_NOTIFY:
|
---|
| 2986 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
[3] | 2987 | //変更情報
|
---|
[609] | 2988 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 2989 |
|
---|
[609] | 2990 | if(SendDlgItemMessage(hwnd,IDC_SS_NOTIFY,BM_GETCHECK,0,0))
|
---|
| 2991 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_NOTIFY;
|
---|
| 2992 | else
|
---|
| 2993 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~SS_NOTIFY;
|
---|
| 2994 | return 1;
|
---|
| 2995 | }
|
---|
| 2996 | break;
|
---|
| 2997 | case IDC_SS_CENTERIMAGE:
|
---|
| 2998 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2999 | //変更情報
|
---|
| 3000 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 3001 |
|
---|
[609] | 3002 | if(SendDlgItemMessage(hwnd,IDC_SS_CENTERIMAGE,BM_GETCHECK,0,0))
|
---|
| 3003 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_CENTERIMAGE;
|
---|
| 3004 | else
|
---|
| 3005 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~SS_CENTERIMAGE;
|
---|
| 3006 | return 1;
|
---|
[3] | 3007 | }
|
---|
[609] | 3008 | break;
|
---|
| 3009 | case IDC_SS_RIGHTJUST:
|
---|
| 3010 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3011 | //変更情報
|
---|
| 3012 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 3013 |
|
---|
[609] | 3014 | if(SendDlgItemMessage(hwnd,IDC_SS_RIGHTJUST,BM_GETCHECK,0,0))
|
---|
| 3015 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_RIGHTJUST;
|
---|
| 3016 | else
|
---|
| 3017 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~SS_RIGHTJUST;
|
---|
| 3018 | return 1;
|
---|
| 3019 | }
|
---|
| 3020 | break;
|
---|
[3] | 3021 |
|
---|
[609] | 3022 | case IDC_EXSTYLE:
|
---|
| 3023 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1;
|
---|
| 3024 | DrawRadWindow(i,pWindowInfo);
|
---|
[3] | 3025 | return 1;
|
---|
[609] | 3026 | }
|
---|
| 3027 | break;
|
---|
[3] | 3028 | }
|
---|
| 3029 | }
|
---|
| 3030 | return 0;
|
---|
| 3031 | }
|
---|
| 3032 |
|
---|
| 3033 |
|
---|
| 3034 | ////////////////////////
|
---|
| 3035 | // LISTVIEW プロパティ
|
---|
| 3036 | BOOL CALLBACK RadProperty_ListViewProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
| 3037 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 3038 | extern PROJECTINFO ProjectInfo;
|
---|
| 3039 | int i,i2,i3;
|
---|
| 3040 | static BOOL bInitial;
|
---|
| 3041 |
|
---|
| 3042 | switch(message){
|
---|
| 3043 | case WM_INITDIALOG:
|
---|
[609] | 3044 | {
|
---|
| 3045 | bInitial=1;
|
---|
| 3046 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 3047 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 3048 |
|
---|
[609] | 3049 | SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
|
---|
[3] | 3050 |
|
---|
| 3051 |
|
---|
[609] | 3052 | /////////////////////////
|
---|
| 3053 | // スタイル
|
---|
| 3054 | ////////////
|
---|
[3] | 3055 |
|
---|
[609] | 3056 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3057 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3058 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3059 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
|
---|
[3] | 3060 |
|
---|
[609] | 3061 | ////////
|
---|
| 3062 | // 表示
|
---|
| 3063 | ////////
|
---|
[3] | 3064 |
|
---|
[609] | 3065 | //"アイコン"
|
---|
| 3066 | SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_ADDSTRING,0,(long)STRING_LISTVIEWPROP_STYLE_ICON);
|
---|
| 3067 | //"小さいアイコン"
|
---|
| 3068 | SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_ADDSTRING,0,(long)STRING_LISTVIEWPROP_STYLE_SMALLICON);
|
---|
| 3069 | //"リスト"
|
---|
| 3070 | SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_ADDSTRING,0,(long)STRING_LISTVIEWPROP_STYLE_LIST);
|
---|
| 3071 | //"レポート"
|
---|
| 3072 | SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_ADDSTRING,0,(long)STRING_LISTVIEWPROP_STYLE_REPORT);
|
---|
[3] | 3073 |
|
---|
[609] | 3074 | //ビットを考慮してLVS_LISTを最初に比較する
|
---|
| 3075 | if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_LIST)==LVS_LIST) SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_SETCURSEL,2,0);
|
---|
| 3076 | else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_SMALLICON) SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_SETCURSEL,1,0);
|
---|
| 3077 | else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_REPORT) SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_SETCURSEL,3,0);
|
---|
| 3078 | else SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_SETCURSEL,0,0);
|
---|
[3] | 3079 |
|
---|
| 3080 |
|
---|
[609] | 3081 | ////////
|
---|
| 3082 | // 配置
|
---|
| 3083 | ////////
|
---|
[3] | 3084 |
|
---|
[609] | 3085 | //"上端"
|
---|
| 3086 | SendDlgItemMessage(hwnd,IDC_LVS_POSITION,CB_ADDSTRING,0,(long)STRING_TOP);
|
---|
| 3087 | //"左端"
|
---|
| 3088 | SendDlgItemMessage(hwnd,IDC_LVS_POSITION,CB_ADDSTRING,0,(long)STRING_LEFT);
|
---|
[3] | 3089 |
|
---|
[609] | 3090 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_ALIGNLEFT) SendDlgItemMessage(hwnd,IDC_LVS_POSITION,CB_SETCURSEL,1,0);
|
---|
| 3091 | else SendDlgItemMessage(hwnd,IDC_LVS_POSITION,CB_SETCURSEL,0,0);
|
---|
[3] | 3092 |
|
---|
| 3093 |
|
---|
[609] | 3094 | //////////
|
---|
| 3095 | // ソート
|
---|
| 3096 | //////////
|
---|
[3] | 3097 |
|
---|
[609] | 3098 | //"なし"
|
---|
| 3099 | SendDlgItemMessage(hwnd,IDC_LVS_SORT,CB_ADDSTRING,0,(long)STRING_NONE_);
|
---|
| 3100 | //"昇順"
|
---|
| 3101 | SendDlgItemMessage(hwnd,IDC_LVS_SORT,CB_ADDSTRING,0,(long)STRING_SORT_ASCENDING);
|
---|
| 3102 | //"降順"
|
---|
| 3103 | SendDlgItemMessage(hwnd,IDC_LVS_SORT,CB_ADDSTRING,0,(long)STRING_SORT_DESCENDING);
|
---|
[3] | 3104 |
|
---|
[609] | 3105 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_SORTASCENDING) SendDlgItemMessage(hwnd,IDC_LVS_SORT,CB_SETCURSEL,1,0);
|
---|
| 3106 | else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_SORTDESCENDING) SendDlgItemMessage(hwnd,IDC_LVS_SORT,CB_SETCURSEL,2,0);
|
---|
| 3107 | else SendDlgItemMessage(hwnd,IDC_LVS_SORT,CB_SETCURSEL,0,0);
|
---|
[3] | 3108 |
|
---|
[609] | 3109 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_SINGLESEL) SendDlgItemMessage(hwnd,IDC_LVS_SINGLESEL,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3110 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_AUTOARRANGE) SendDlgItemMessage(hwnd,IDC_LVS_AUTOARRANGE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3111 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_NOLABELWRAP) SendDlgItemMessage(hwnd,IDC_LVS_NOLABELWRAP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3112 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_EDITLABELS) SendDlgItemMessage(hwnd,IDC_LVS_EDITLABELS,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3113 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_NOSCROLL) SendDlgItemMessage(hwnd,IDC_LVS_NOSCROLL,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3114 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_NOCOLUMNHEADER) SendDlgItemMessage(hwnd,IDC_LVS_NOCOLUMNHEADER,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3115 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_NOSORTHEADER) SendDlgItemMessage(hwnd,IDC_LVS_NOSORTHEADER,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3116 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_SHOWSELALWAYS) SendDlgItemMessage(hwnd,IDC_LVS_SHOWSELALWAYS,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3117 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_OWNERDRAWFIXED) SendDlgItemMessage(hwnd,IDC_LVS_OWNERDRAWFIXED,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3118 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_SHAREIMAGELISTS) SendDlgItemMessage(hwnd,IDC_LVS_SHAREIMAGELISTS,BM_SETCHECK,BST_CHECKED,0);
|
---|
[3] | 3119 |
|
---|
| 3120 |
|
---|
[609] | 3121 | bInitial=0;
|
---|
| 3122 | break;
|
---|
| 3123 | }
|
---|
[3] | 3124 | case WM_COMMAND:
|
---|
[609] | 3125 | {
|
---|
| 3126 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 3127 | if(i==-1) return 1;
|
---|
| 3128 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 3129 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 3130 |
|
---|
[609] | 3131 | //共通スタイル
|
---|
| 3132 | if(bInitial==0){
|
---|
| 3133 | if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
|
---|
| 3134 | }
|
---|
[3] | 3135 |
|
---|
[609] | 3136 | switch(LOWORD(wParam)){
|
---|
| 3137 | case IDC_LVS_VIEW:
|
---|
| 3138 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 3139 | //変更情報
|
---|
| 3140 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 3141 |
|
---|
[609] | 3142 | i3=SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_GETCURSEL,0,0);
|
---|
| 3143 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(LVS_SMALLICON|LVS_LIST|LVS_REPORT);
|
---|
| 3144 | if(i3==1) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_SMALLICON;
|
---|
| 3145 | else if(i3==2) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_LIST;
|
---|
| 3146 | else if(i3==3) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_REPORT;
|
---|
| 3147 | DrawRadWindow(i,pWindowInfo);
|
---|
| 3148 | return 1;
|
---|
| 3149 | }
|
---|
| 3150 | break;
|
---|
| 3151 | case IDC_LVS_POSITION:
|
---|
| 3152 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 3153 | //変更情報
|
---|
| 3154 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 3155 |
|
---|
[609] | 3156 | i3=SendDlgItemMessage(hwnd,IDC_LVS_POSITION,CB_GETCURSEL,0,0);
|
---|
| 3157 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(LVS_ALIGNLEFT);
|
---|
| 3158 | if(i3==1) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_ALIGNLEFT;
|
---|
| 3159 | return 1;
|
---|
| 3160 | }
|
---|
| 3161 | break;
|
---|
| 3162 | case IDC_LVS_SORT:
|
---|
| 3163 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 3164 | //変更情報
|
---|
| 3165 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 3166 |
|
---|
[609] | 3167 | i3=SendDlgItemMessage(hwnd,IDC_LVS_SORT,CB_GETCURSEL,0,0);
|
---|
| 3168 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(LVS_SORTASCENDING|LVS_SORTDESCENDING);
|
---|
| 3169 | if(i3==1) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_SORTASCENDING;
|
---|
| 3170 | else if(i3==2) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_SORTDESCENDING;
|
---|
| 3171 | return 1;
|
---|
| 3172 | }
|
---|
| 3173 | break;
|
---|
[3] | 3174 |
|
---|
[609] | 3175 | case IDC_LVS_SINGLESEL:
|
---|
| 3176 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3177 | //変更情報
|
---|
| 3178 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 3179 |
|
---|
[609] | 3180 | if(SendDlgItemMessage(hwnd,IDC_LVS_SINGLESEL,BM_GETCHECK,0,0))
|
---|
| 3181 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_SINGLESEL;
|
---|
| 3182 | else
|
---|
| 3183 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LVS_SINGLESEL;
|
---|
| 3184 | return 1;
|
---|
| 3185 | }
|
---|
| 3186 | break;
|
---|
| 3187 | case IDC_LVS_AUTOARRANGE:
|
---|
| 3188 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3189 | //変更情報
|
---|
| 3190 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 3191 |
|
---|
[609] | 3192 | if(SendDlgItemMessage(hwnd,IDC_LVS_AUTOARRANGE,BM_GETCHECK,0,0))
|
---|
| 3193 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_AUTOARRANGE;
|
---|
| 3194 | else
|
---|
| 3195 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LVS_AUTOARRANGE;
|
---|
| 3196 | return 1;
|
---|
| 3197 | }
|
---|
| 3198 | break;
|
---|
| 3199 | case IDC_LVS_NOLABELWRAP:
|
---|
| 3200 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3201 | //変更情報
|
---|
| 3202 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 3203 |
|
---|
[609] | 3204 | if(SendDlgItemMessage(hwnd,IDC_LVS_NOLABELWRAP,BM_GETCHECK,0,0))
|
---|
| 3205 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_NOLABELWRAP;
|
---|
| 3206 | else
|
---|
| 3207 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LVS_NOLABELWRAP;
|
---|
| 3208 | return 1;
|
---|
| 3209 | }
|
---|
| 3210 | break;
|
---|
| 3211 | case IDC_LVS_EDITLABELS:
|
---|
| 3212 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3213 | //変更情報
|
---|
| 3214 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 3215 |
|
---|
[609] | 3216 | if(SendDlgItemMessage(hwnd,IDC_LVS_EDITLABELS,BM_GETCHECK,0,0))
|
---|
| 3217 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_EDITLABELS;
|
---|
| 3218 | else
|
---|
| 3219 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LVS_EDITLABELS;
|
---|
| 3220 | return 1;
|
---|
| 3221 | }
|
---|
| 3222 | break;
|
---|
| 3223 | case IDC_LVS_NOSCROLL:
|
---|
| 3224 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3225 | //変更情報
|
---|
| 3226 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 3227 |
|
---|
[609] | 3228 | if(SendDlgItemMessage(hwnd,IDC_LVS_NOSCROLL,BM_GETCHECK,0,0))
|
---|
| 3229 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_NOSCROLL;
|
---|
| 3230 | else
|
---|
| 3231 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LVS_NOSCROLL;
|
---|
| 3232 | DrawRadWindow(i,pWindowInfo);
|
---|
| 3233 | return 1;
|
---|
| 3234 | }
|
---|
| 3235 | break;
|
---|
| 3236 | case IDC_LVS_NOCOLUMNHEADER:
|
---|
| 3237 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3238 | //変更情報
|
---|
| 3239 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 3240 |
|
---|
[609] | 3241 | if(SendDlgItemMessage(hwnd,IDC_LVS_NOCOLUMNHEADER,BM_GETCHECK,0,0))
|
---|
| 3242 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_NOCOLUMNHEADER;
|
---|
| 3243 | else
|
---|
| 3244 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LVS_NOCOLUMNHEADER;
|
---|
| 3245 | return 1;
|
---|
| 3246 | }
|
---|
| 3247 | break;
|
---|
| 3248 | case IDC_LVS_NOSORTHEADER:
|
---|
| 3249 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3250 | //変更情報
|
---|
| 3251 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 3252 |
|
---|
[609] | 3253 | if(SendDlgItemMessage(hwnd,IDC_LVS_NOSORTHEADER,BM_GETCHECK,0,0))
|
---|
| 3254 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_NOSORTHEADER;
|
---|
| 3255 | else
|
---|
| 3256 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LVS_NOSORTHEADER;
|
---|
| 3257 | return 1;
|
---|
| 3258 | }
|
---|
| 3259 | break;
|
---|
| 3260 | case IDC_LVS_SHOWSELALWAYS:
|
---|
| 3261 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3262 | //変更情報
|
---|
| 3263 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 3264 |
|
---|
[609] | 3265 | if(SendDlgItemMessage(hwnd,IDC_LVS_SHOWSELALWAYS,BM_GETCHECK,0,0))
|
---|
| 3266 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_SHOWSELALWAYS;
|
---|
| 3267 | else
|
---|
| 3268 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LVS_SHOWSELALWAYS;
|
---|
| 3269 | return 1;
|
---|
| 3270 | }
|
---|
| 3271 | break;
|
---|
| 3272 | case IDC_LVS_OWNERDRAWFIXED:
|
---|
| 3273 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3274 | //変更情報
|
---|
| 3275 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 3276 |
|
---|
[609] | 3277 | if(SendDlgItemMessage(hwnd,IDC_LVS_OWNERDRAWFIXED,BM_GETCHECK,0,0))
|
---|
| 3278 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_OWNERDRAWFIXED;
|
---|
| 3279 | else
|
---|
| 3280 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LVS_OWNERDRAWFIXED;
|
---|
| 3281 | return 1;
|
---|
| 3282 | }
|
---|
| 3283 | break;
|
---|
| 3284 | case IDC_LVS_SHAREIMAGELISTS:
|
---|
| 3285 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3286 | //変更情報
|
---|
| 3287 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 3288 |
|
---|
[609] | 3289 | if(SendDlgItemMessage(hwnd,IDC_LVS_SHAREIMAGELISTS,BM_GETCHECK,0,0))
|
---|
| 3290 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_SHAREIMAGELISTS;
|
---|
| 3291 | else
|
---|
| 3292 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LVS_SHAREIMAGELISTS;
|
---|
| 3293 | return 1;
|
---|
| 3294 | }
|
---|
| 3295 | break;
|
---|
[3] | 3296 |
|
---|
[609] | 3297 | case IDC_EXSTYLE:
|
---|
| 3298 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1;
|
---|
| 3299 | DrawRadWindow(i,pWindowInfo);
|
---|
[3] | 3300 | return 1;
|
---|
[609] | 3301 | }
|
---|
| 3302 | break;
|
---|
[3] | 3303 | }
|
---|
| 3304 | }
|
---|
| 3305 | return 0;
|
---|
| 3306 | }
|
---|
| 3307 |
|
---|
| 3308 |
|
---|
| 3309 | ///////////////////////
|
---|
| 3310 | // LISTBOX プロパティ
|
---|
| 3311 |
|
---|
| 3312 | void RadProperty_ListBox_StylingOrder(HWND hwnd,DWORD *style){
|
---|
| 3313 | if(*style&LBS_OWNERDRAWVARIABLE){
|
---|
| 3314 | *style&=~(LBS_MULTICOLUMN);
|
---|
| 3315 | SendDlgItemMessage(hwnd,IDC_LBS_MULTICOLUMN,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
| 3316 | EnableWindow(GetDlgItem(hwnd,IDC_LBS_MULTICOLUMN),0);
|
---|
| 3317 | }
|
---|
| 3318 | else
|
---|
| 3319 | EnableWindow(GetDlgItem(hwnd,IDC_LBS_MULTICOLUMN),1);
|
---|
| 3320 |
|
---|
| 3321 | if(!(*style&(LBS_OWNERDRAWFIXED|LBS_OWNERDRAWVARIABLE))){
|
---|
| 3322 | *style&=~(LBS_HASSTRINGS);
|
---|
| 3323 | SendDlgItemMessage(hwnd,IDC_LBS_HASSTRINGS,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
| 3324 | EnableWindow(GetDlgItem(hwnd,IDC_LBS_HASSTRINGS),0);
|
---|
| 3325 | }
|
---|
| 3326 | else
|
---|
| 3327 | EnableWindow(GetDlgItem(hwnd,IDC_LBS_HASSTRINGS),1);
|
---|
| 3328 | }
|
---|
| 3329 | BOOL CALLBACK RadProperty_ListBoxProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
| 3330 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 3331 | extern PROJECTINFO ProjectInfo;
|
---|
| 3332 | int i,i2,i3;
|
---|
| 3333 | static BOOL bInitial;
|
---|
| 3334 |
|
---|
| 3335 | switch(message){
|
---|
| 3336 | case WM_INITDIALOG:
|
---|
[609] | 3337 | {
|
---|
| 3338 | bInitial=1;
|
---|
| 3339 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 3340 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 3341 |
|
---|
[609] | 3342 | SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
|
---|
[3] | 3343 |
|
---|
| 3344 |
|
---|
[609] | 3345 | ////////////////////////
|
---|
| 3346 | // スタイル
|
---|
| 3347 | ////////////
|
---|
[3] | 3348 |
|
---|
[609] | 3349 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3350 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3351 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3352 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
|
---|
[3] | 3353 |
|
---|
[609] | 3354 | ////////
|
---|
| 3355 | // 選択
|
---|
| 3356 | ////////
|
---|
[3] | 3357 |
|
---|
[609] | 3358 | //"シングル"
|
---|
| 3359 | SendDlgItemMessage(hwnd,IDC_LBS_SELECT,CB_ADDSTRING,0,(long)STRING_LISTBOXPROP_STYLE_SEL_SINGLE);
|
---|
| 3360 | //"マルチ"
|
---|
| 3361 | SendDlgItemMessage(hwnd,IDC_LBS_SELECT,CB_ADDSTRING,0,(long)STRING_LISTBOXPROP_STYLE_SEL_MULTI);
|
---|
| 3362 | //"拡張"
|
---|
| 3363 | SendDlgItemMessage(hwnd,IDC_LBS_SELECT,CB_ADDSTRING,0,(long)STRING_LISTBOXPROP_STYLE_SEL_EXTENDED);
|
---|
| 3364 | //"なし"
|
---|
| 3365 | SendDlgItemMessage(hwnd,IDC_LBS_SELECT,CB_ADDSTRING,0,(long)STRING_NONE_);
|
---|
[3] | 3366 |
|
---|
[609] | 3367 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_MULTIPLESEL) SendDlgItemMessage(hwnd,IDC_LBS_SELECT,CB_SETCURSEL,1,0);
|
---|
| 3368 | else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_EXTENDEDSEL) SendDlgItemMessage(hwnd,IDC_LBS_SELECT,CB_SETCURSEL,2,0);
|
---|
| 3369 | else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_NOSEL) SendDlgItemMessage(hwnd,IDC_LBS_SELECT,CB_SETCURSEL,3,0);
|
---|
| 3370 | else SendDlgItemMessage(hwnd,IDC_LBS_SELECT,CB_SETCURSEL,0,0);
|
---|
[3] | 3371 |
|
---|
| 3372 |
|
---|
[609] | 3373 | ////////////////
|
---|
| 3374 | // オーナー描画
|
---|
| 3375 | ////////////////
|
---|
[3] | 3376 |
|
---|
[609] | 3377 | //"なし"
|
---|
| 3378 | SendDlgItemMessage(hwnd,IDC_LBS_OWNERDRAW,CB_ADDSTRING,0,(long)STRING_NONE_);
|
---|
| 3379 | //"固定"
|
---|
| 3380 | SendDlgItemMessage(hwnd,IDC_LBS_OWNERDRAW,CB_ADDSTRING,0,(long)STRING_OWNERDRAW_FIXED);
|
---|
| 3381 | //"可変"
|
---|
| 3382 | SendDlgItemMessage(hwnd,IDC_LBS_OWNERDRAW,CB_ADDSTRING,0,(long)STRING_OWNERDRAW_VARIABLE);
|
---|
[3] | 3383 |
|
---|
[609] | 3384 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_OWNERDRAWFIXED) SendDlgItemMessage(hwnd,IDC_LBS_OWNERDRAW,CB_SETCURSEL,1,0);
|
---|
| 3385 | else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_OWNERDRAWVARIABLE) SendDlgItemMessage(hwnd,IDC_LBS_OWNERDRAW,CB_SETCURSEL,2,0);
|
---|
| 3386 | else SendDlgItemMessage(hwnd,IDC_LBS_OWNERDRAW,CB_SETCURSEL,0,0);
|
---|
[3] | 3387 |
|
---|
[609] | 3388 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_HASSTRINGS) SendDlgItemMessage(hwnd,IDC_LBS_HASSTRINGS,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3389 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_SORT) SendDlgItemMessage(hwnd,IDC_LBS_SORT,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3390 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_NOTIFY) SendDlgItemMessage(hwnd,IDC_LBS_NOTIFY,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3391 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_MULTICOLUMN) SendDlgItemMessage(hwnd,IDC_LBS_MULTICOLUMN,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3392 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_HSCROLL) SendDlgItemMessage(hwnd,IDC_STYLE_HSCROLL,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3393 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VSCROLL) SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLL,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3394 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_DISABLENOSCROLL) SendDlgItemMessage(hwnd,IDC_LBS_DISABLENOSCROLL,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3395 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_NOREDRAW) SendDlgItemMessage(hwnd,IDC_LBS_NOREDRAW,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3396 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_USETABSTOPS) SendDlgItemMessage(hwnd,IDC_LBS_USETABSTOPS,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3397 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_WANTKEYBOARDINPUT) SendDlgItemMessage(hwnd,IDC_LBS_WANTKEYBOARDINPUT,BM_SETCHECK,BST_CHECKED,0);
|
---|
[3] | 3398 |
|
---|
[609] | 3399 | RadProperty_ListBox_StylingOrder(hwnd,&pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 3400 |
|
---|
| 3401 |
|
---|
[609] | 3402 | bInitial=0;
|
---|
| 3403 | break;
|
---|
| 3404 | }
|
---|
[3] | 3405 | case WM_COMMAND:
|
---|
[609] | 3406 | {
|
---|
| 3407 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 3408 | if(i==-1) return 1;
|
---|
| 3409 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 3410 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 3411 |
|
---|
[609] | 3412 | //共通スタイル
|
---|
| 3413 | if(bInitial==0){
|
---|
| 3414 | if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
|
---|
| 3415 | }
|
---|
[3] | 3416 |
|
---|
[609] | 3417 | switch(LOWORD(wParam)){
|
---|
| 3418 | case IDC_LBS_SELECT:
|
---|
| 3419 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 3420 | //変更情報
|
---|
| 3421 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 3422 |
|
---|
[609] | 3423 | i3=SendDlgItemMessage(hwnd,IDC_LBS_SELECT,CB_GETCURSEL,0,0);
|
---|
| 3424 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(LBS_MULTIPLESEL|LBS_EXTENDEDSEL|LBS_NOSEL);
|
---|
| 3425 | if(i3==1) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_MULTIPLESEL;
|
---|
| 3426 | else if(i3==2) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_EXTENDEDSEL;
|
---|
| 3427 | else if(i3==3) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_NOSEL;
|
---|
| 3428 | return 1;
|
---|
| 3429 | }
|
---|
| 3430 | break;
|
---|
| 3431 | case IDC_LBS_OWNERDRAW:
|
---|
| 3432 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 3433 | //変更情報
|
---|
| 3434 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 3435 |
|
---|
[609] | 3436 | i3=SendDlgItemMessage(hwnd,IDC_LBS_OWNERDRAW,CB_GETCURSEL,0,0);
|
---|
| 3437 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(LBS_OWNERDRAWFIXED|LBS_OWNERDRAWVARIABLE);
|
---|
| 3438 | if(i3==1) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_OWNERDRAWFIXED;
|
---|
| 3439 | else if(i3==2) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_OWNERDRAWVARIABLE;
|
---|
[3] | 3440 |
|
---|
[609] | 3441 | RadProperty_ListBox_StylingOrder(hwnd,&pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 3442 | return 1;
|
---|
| 3443 | }
|
---|
| 3444 | break;
|
---|
[3] | 3445 |
|
---|
[609] | 3446 | case IDC_LBS_HASSTRINGS:
|
---|
| 3447 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3448 | //変更情報
|
---|
| 3449 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 3450 |
|
---|
[609] | 3451 | if(SendDlgItemMessage(hwnd,IDC_LBS_HASSTRINGS,BM_GETCHECK,0,0))
|
---|
| 3452 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_HASSTRINGS;
|
---|
| 3453 | else
|
---|
| 3454 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LBS_HASSTRINGS;
|
---|
| 3455 | return 1;
|
---|
| 3456 | }
|
---|
| 3457 | break;
|
---|
| 3458 | case IDC_LBS_SORT:
|
---|
| 3459 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3460 | //変更情報
|
---|
| 3461 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 3462 |
|
---|
[609] | 3463 | if(SendDlgItemMessage(hwnd,IDC_LBS_SORT,BM_GETCHECK,0,0))
|
---|
| 3464 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_SORT;
|
---|
| 3465 | else
|
---|
| 3466 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LBS_SORT;
|
---|
| 3467 | return 1;
|
---|
| 3468 | }
|
---|
| 3469 | break;
|
---|
| 3470 | case IDC_LBS_NOTIFY:
|
---|
| 3471 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3472 | //変更情報
|
---|
| 3473 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 3474 |
|
---|
[609] | 3475 | if(SendDlgItemMessage(hwnd,IDC_LBS_NOTIFY,BM_GETCHECK,0,0))
|
---|
| 3476 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_NOTIFY;
|
---|
| 3477 | else
|
---|
| 3478 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LBS_NOTIFY;
|
---|
| 3479 | return 1;
|
---|
| 3480 | }
|
---|
| 3481 | break;
|
---|
| 3482 | case IDC_LBS_MULTICOLUMN:
|
---|
| 3483 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3484 | //変更情報
|
---|
| 3485 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 3486 |
|
---|
[609] | 3487 | if(SendDlgItemMessage(hwnd,IDC_LBS_MULTICOLUMN,BM_GETCHECK,0,0))
|
---|
| 3488 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_MULTICOLUMN;
|
---|
| 3489 | else
|
---|
| 3490 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LBS_MULTICOLUMN;
|
---|
| 3491 | return 1;
|
---|
| 3492 | }
|
---|
| 3493 | break;
|
---|
| 3494 | case IDC_STYLE_HSCROLL:
|
---|
| 3495 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3496 | //変更情報
|
---|
| 3497 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 3498 |
|
---|
[609] | 3499 | if(SendDlgItemMessage(hwnd,IDC_STYLE_HSCROLL,BM_GETCHECK,0,0))
|
---|
| 3500 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=WS_HSCROLL;
|
---|
| 3501 | else
|
---|
| 3502 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~WS_HSCROLL;
|
---|
| 3503 | DrawRadWindow(i,pWindowInfo);
|
---|
| 3504 | return 1;
|
---|
| 3505 | }
|
---|
| 3506 | break;
|
---|
| 3507 | case IDC_STYLE_VSCROLL:
|
---|
| 3508 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3509 | //変更情報
|
---|
| 3510 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 3511 |
|
---|
[609] | 3512 | if(SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLL,BM_GETCHECK,0,0))
|
---|
| 3513 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=WS_VSCROLL;
|
---|
| 3514 | else
|
---|
| 3515 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~WS_VSCROLL;
|
---|
| 3516 | DrawRadWindow(i,pWindowInfo);
|
---|
| 3517 | return 1;
|
---|
| 3518 | }
|
---|
| 3519 | break;
|
---|
| 3520 | case IDC_LBS_DISABLENOSCROLL:
|
---|
| 3521 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3522 | //変更情報
|
---|
| 3523 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 3524 |
|
---|
[609] | 3525 | if(SendDlgItemMessage(hwnd,IDC_LBS_DISABLENOSCROLL,BM_GETCHECK,0,0))
|
---|
| 3526 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_DISABLENOSCROLL;
|
---|
| 3527 | else
|
---|
| 3528 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LBS_DISABLENOSCROLL;
|
---|
| 3529 | DrawRadWindow(i,pWindowInfo);
|
---|
| 3530 | return 1;
|
---|
| 3531 | }
|
---|
| 3532 | break;
|
---|
| 3533 | case IDC_LBS_NOREDRAW:
|
---|
| 3534 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3535 | //変更情報
|
---|
| 3536 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 3537 |
|
---|
[609] | 3538 | if(SendDlgItemMessage(hwnd,IDC_LBS_NOREDRAW,BM_GETCHECK,0,0))
|
---|
| 3539 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_NOREDRAW;
|
---|
| 3540 | else
|
---|
| 3541 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LBS_NOREDRAW;
|
---|
| 3542 | return 1;
|
---|
| 3543 | }
|
---|
| 3544 | break;
|
---|
| 3545 | case IDC_LBS_USETABSTOPS:
|
---|
| 3546 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3547 | //変更情報
|
---|
| 3548 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 3549 |
|
---|
[609] | 3550 | if(SendDlgItemMessage(hwnd,IDC_LBS_USETABSTOPS,BM_GETCHECK,0,0))
|
---|
| 3551 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_USETABSTOPS;
|
---|
| 3552 | else
|
---|
| 3553 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LBS_USETABSTOPS;
|
---|
| 3554 | return 1;
|
---|
| 3555 | }
|
---|
| 3556 | break;
|
---|
| 3557 | case IDC_LBS_WANTKEYBOARDINPUT:
|
---|
| 3558 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3559 | //変更情報
|
---|
| 3560 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 3561 |
|
---|
[609] | 3562 | if(SendDlgItemMessage(hwnd,IDC_LBS_WANTKEYBOARDINPUT,BM_GETCHECK,0,0))
|
---|
| 3563 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_WANTKEYBOARDINPUT;
|
---|
| 3564 | else
|
---|
| 3565 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LBS_WANTKEYBOARDINPUT;
|
---|
| 3566 | return 1;
|
---|
| 3567 | }
|
---|
| 3568 | break;
|
---|
[3] | 3569 |
|
---|
[609] | 3570 | case IDC_EXSTYLE:
|
---|
| 3571 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1;
|
---|
| 3572 | DrawRadWindow(i,pWindowInfo);
|
---|
[3] | 3573 | return 1;
|
---|
[609] | 3574 | }
|
---|
| 3575 | break;
|
---|
[3] | 3576 | }
|
---|
| 3577 | }
|
---|
| 3578 | return 0;
|
---|
| 3579 | }
|
---|
| 3580 |
|
---|
| 3581 |
|
---|
| 3582 | ///////////////////////////
|
---|
| 3583 | // PROGRESSBAR プロパティ
|
---|
| 3584 | BOOL CALLBACK RadProperty_ProgressBarProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
| 3585 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 3586 | extern PROJECTINFO ProjectInfo;
|
---|
| 3587 | int i,i2;
|
---|
| 3588 | static BOOL bInitial;
|
---|
| 3589 |
|
---|
| 3590 | switch(message){
|
---|
| 3591 | case WM_INITDIALOG:
|
---|
[609] | 3592 | {
|
---|
| 3593 | bInitial=1;
|
---|
| 3594 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 3595 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 3596 |
|
---|
[609] | 3597 | SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
|
---|
| 3598 | SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption);
|
---|
[3] | 3599 |
|
---|
| 3600 |
|
---|
[609] | 3601 | ////////////
|
---|
| 3602 | //スタイル
|
---|
[3] | 3603 |
|
---|
[609] | 3604 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3605 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3606 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3607 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
|
---|
[3] | 3608 |
|
---|
[609] | 3609 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&PBS_VERTICAL) SendDlgItemMessage(hwnd,IDC_PBS_VERTICAL,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3610 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&PBS_SMOOTH) SendDlgItemMessage(hwnd,IDC_PBS_SMOOTH,BM_SETCHECK,BST_CHECKED,0);
|
---|
[3] | 3611 |
|
---|
| 3612 |
|
---|
[609] | 3613 | bInitial=0;
|
---|
| 3614 | break;
|
---|
| 3615 | }
|
---|
[3] | 3616 | case WM_COMMAND:
|
---|
[609] | 3617 | {
|
---|
| 3618 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 3619 | if(i==-1) return 1;
|
---|
| 3620 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 3621 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 3622 |
|
---|
[609] | 3623 | //共通スタイル
|
---|
| 3624 | if(bInitial==0){
|
---|
| 3625 | if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
|
---|
| 3626 | }
|
---|
[3] | 3627 |
|
---|
[609] | 3628 | switch(LOWORD(wParam)){
|
---|
| 3629 | case IDC_PBS_VERTICAL:
|
---|
| 3630 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3631 | //変更情報
|
---|
| 3632 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 3633 |
|
---|
[609] | 3634 | if(SendDlgItemMessage(hwnd,IDC_PBS_VERTICAL,BM_GETCHECK,0,0))
|
---|
| 3635 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=PBS_VERTICAL;
|
---|
| 3636 | else
|
---|
| 3637 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~PBS_VERTICAL;
|
---|
| 3638 | DrawRadWindow(i,pWindowInfo);
|
---|
| 3639 | return 1;
|
---|
| 3640 | }
|
---|
| 3641 | break;
|
---|
| 3642 | case IDC_PBS_SMOOTH:
|
---|
| 3643 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3644 | //変更情報
|
---|
| 3645 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 3646 |
|
---|
[609] | 3647 | if(SendDlgItemMessage(hwnd,IDC_PBS_SMOOTH,BM_GETCHECK,0,0))
|
---|
| 3648 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=PBS_SMOOTH;
|
---|
| 3649 | else
|
---|
| 3650 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~PBS_SMOOTH;
|
---|
| 3651 | DrawRadWindow(i,pWindowInfo);
|
---|
| 3652 | return 1;
|
---|
| 3653 | }
|
---|
| 3654 | break;
|
---|
[3] | 3655 |
|
---|
[609] | 3656 | case IDC_EXSTYLE:
|
---|
| 3657 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1;
|
---|
| 3658 | DrawRadWindow(i,pWindowInfo);
|
---|
[3] | 3659 | return 1;
|
---|
[609] | 3660 | }
|
---|
[3] | 3661 | }
|
---|
| 3662 | }
|
---|
| 3663 | return 0;
|
---|
| 3664 | }
|
---|
| 3665 |
|
---|
| 3666 |
|
---|
| 3667 | ///////////////////////////
|
---|
| 3668 | // RADIOBUTTON プロパティ
|
---|
| 3669 |
|
---|
| 3670 | BOOL CALLBACK RadProperty_RadioButtonProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
| 3671 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 3672 | extern PROJECTINFO ProjectInfo;
|
---|
| 3673 | int i,i2,i3;
|
---|
| 3674 | static BOOL bInitial;
|
---|
| 3675 |
|
---|
| 3676 | switch(message){
|
---|
| 3677 | case WM_INITDIALOG:
|
---|
[609] | 3678 | {
|
---|
| 3679 | bInitial=1;
|
---|
| 3680 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 3681 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 3682 |
|
---|
[609] | 3683 | SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
|
---|
| 3684 | SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption);
|
---|
[3] | 3685 |
|
---|
| 3686 |
|
---|
[609] | 3687 | /////////////////////////
|
---|
| 3688 | // スタイル
|
---|
| 3689 | ////////////
|
---|
[3] | 3690 |
|
---|
[609] | 3691 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3692 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3693 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3694 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
|
---|
[3] | 3695 |
|
---|
[609] | 3696 | if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_AUTORADIOBUTTON)==BS_AUTORADIOBUTTON) SendDlgItemMessage(hwnd,IDC_BS_AUTO,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3697 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_PUSHLIKE) SendDlgItemMessage(hwnd,IDC_BS_PUSHLIKE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3698 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_LEFTTEXT) SendDlgItemMessage(hwnd,IDC_BS_LEFTTEXT,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3699 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_ICON) SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3700 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_BITMAP) SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3701 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_MULTILINE) SendDlgItemMessage(hwnd,IDC_BS_MULTILINE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3702 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_NOTIFY) SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_SETCHECK,BST_CHECKED,0);
|
---|
[3] | 3703 |
|
---|
| 3704 |
|
---|
[609] | 3705 | //////////////////
|
---|
| 3706 | // 水平方向の配置
|
---|
| 3707 | //////////////////
|
---|
[3] | 3708 |
|
---|
[609] | 3709 | //"デフォルト"
|
---|
| 3710 | SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_DEFAULT);
|
---|
| 3711 | //"左端"
|
---|
| 3712 | SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_LEFT);
|
---|
| 3713 | //"右端"
|
---|
| 3714 | SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_RIGHT);
|
---|
| 3715 | //"中央"
|
---|
| 3716 | SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_CENTER);
|
---|
[3] | 3717 |
|
---|
[609] | 3718 | //ビットを考慮してBS_CENTERを最初に比較する
|
---|
| 3719 | if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_CENTER)==BS_CENTER) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,3,0);
|
---|
| 3720 | else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_LEFT) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,1,0);
|
---|
| 3721 | else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_RIGHT) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,2,0);
|
---|
| 3722 | else SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,0,0);
|
---|
[3] | 3723 |
|
---|
| 3724 |
|
---|
[609] | 3725 | //////////////////
|
---|
| 3726 | // 垂直方向の配置
|
---|
| 3727 | //////////////////
|
---|
[3] | 3728 |
|
---|
[609] | 3729 | //"デフォルト"
|
---|
| 3730 | SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_DEFAULT);
|
---|
| 3731 | //"上端"
|
---|
| 3732 | SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_TOP);
|
---|
| 3733 | //"下端"
|
---|
| 3734 | SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_BOTTOM);
|
---|
| 3735 | //"中央"
|
---|
| 3736 | SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_CENTER);
|
---|
[3] | 3737 |
|
---|
[609] | 3738 | //ビットを考慮してBS_VCENTERを最初に比較する
|
---|
| 3739 | if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_VCENTER)==BS_VCENTER) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,3,0);
|
---|
| 3740 | else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_TOP) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,1,0);
|
---|
| 3741 | else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_BOTTOM) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,2,0);
|
---|
| 3742 | else SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,0,0);
|
---|
[3] | 3743 |
|
---|
| 3744 |
|
---|
[609] | 3745 | bInitial=0;
|
---|
| 3746 | break;
|
---|
| 3747 | }
|
---|
[3] | 3748 | case WM_COMMAND:
|
---|
[609] | 3749 | {
|
---|
| 3750 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 3751 | if(i==-1) return 1;
|
---|
| 3752 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 3753 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 3754 |
|
---|
[609] | 3755 | //共通スタイル
|
---|
| 3756 | if(bInitial==0){
|
---|
| 3757 | if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
|
---|
| 3758 | }
|
---|
[3] | 3759 |
|
---|
[609] | 3760 | switch(LOWORD(wParam)){
|
---|
| 3761 | case IDC_BS_AUTO:
|
---|
| 3762 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3763 | //変更情報
|
---|
| 3764 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 3765 |
|
---|
[609] | 3766 | if(SendDlgItemMessage(hwnd,IDC_BS_AUTO,BM_GETCHECK,0,0)){
|
---|
| 3767 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=0xFFFFFFF0;
|
---|
| 3768 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_AUTORADIOBUTTON;
|
---|
| 3769 | }
|
---|
| 3770 | else{
|
---|
| 3771 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=0xFFFFFFF0;
|
---|
| 3772 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_RADIOBUTTON;
|
---|
| 3773 | }
|
---|
| 3774 | return 1;
|
---|
| 3775 | }
|
---|
| 3776 | break;
|
---|
| 3777 | case IDC_BS_PUSHLIKE:
|
---|
| 3778 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3779 | //変更情報
|
---|
| 3780 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 3781 |
|
---|
[609] | 3782 | if(SendDlgItemMessage(hwnd,IDC_BS_PUSHLIKE,BM_GETCHECK,0,0))
|
---|
| 3783 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_PUSHLIKE;
|
---|
| 3784 | else
|
---|
| 3785 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_PUSHLIKE;
|
---|
| 3786 | DrawRadWindow(i,pWindowInfo);
|
---|
| 3787 | return 1;
|
---|
[3] | 3788 | }
|
---|
[609] | 3789 | break;
|
---|
| 3790 | case IDC_BS_LEFTTEXT:
|
---|
| 3791 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3792 | //変更情報
|
---|
| 3793 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 3794 |
|
---|
| 3795 | if(SendDlgItemMessage(hwnd,IDC_BS_LEFTTEXT,BM_GETCHECK,0,0))
|
---|
| 3796 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_LEFTTEXT;
|
---|
| 3797 | else
|
---|
| 3798 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_LEFTTEXT;
|
---|
| 3799 | DrawRadWindow(i,pWindowInfo);
|
---|
| 3800 | return 1;
|
---|
[3] | 3801 | }
|
---|
[609] | 3802 | break;
|
---|
| 3803 | case IDC_BS_ICON:
|
---|
| 3804 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3805 | //変更情報
|
---|
| 3806 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 3807 |
|
---|
[609] | 3808 | if(SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_GETCHECK,0,0)){
|
---|
| 3809 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_ICON;
|
---|
| 3810 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_BITMAP;
|
---|
| 3811 | SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
| 3812 | }
|
---|
| 3813 | else
|
---|
| 3814 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_ICON;
|
---|
| 3815 | DrawRadWindow(i,pWindowInfo);
|
---|
| 3816 | return 1;
|
---|
| 3817 | }
|
---|
| 3818 | break;
|
---|
| 3819 | case IDC_BS_BITMAP:
|
---|
| 3820 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3821 | //変更情報
|
---|
| 3822 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 3823 |
|
---|
[609] | 3824 | if(SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_GETCHECK,0,0)){
|
---|
| 3825 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_BITMAP;
|
---|
| 3826 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_ICON;
|
---|
| 3827 | SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
| 3828 | }
|
---|
| 3829 | else
|
---|
| 3830 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_BITMAP;
|
---|
| 3831 | DrawRadWindow(i,pWindowInfo);
|
---|
| 3832 | return 1;
|
---|
| 3833 | }
|
---|
| 3834 | break;
|
---|
| 3835 | case IDC_BS_MULTILINE:
|
---|
| 3836 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3837 | //変更情報
|
---|
| 3838 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 3839 |
|
---|
[609] | 3840 | if(SendDlgItemMessage(hwnd,IDC_BS_MULTILINE,BM_GETCHECK,0,0))
|
---|
| 3841 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_MULTILINE;
|
---|
| 3842 | else
|
---|
| 3843 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_MULTILINE;
|
---|
| 3844 | DrawRadWindow(i,pWindowInfo);
|
---|
| 3845 | return 1;
|
---|
[3] | 3846 | }
|
---|
[609] | 3847 | break;
|
---|
| 3848 | case IDC_BS_NOTIFY:
|
---|
| 3849 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3850 | //変更情報
|
---|
| 3851 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 3852 |
|
---|
[609] | 3853 | if(SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_GETCHECK,0,0))
|
---|
| 3854 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_NOTIFY;
|
---|
| 3855 | else
|
---|
| 3856 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_NOTIFY;
|
---|
| 3857 | return 1;
|
---|
[3] | 3858 | }
|
---|
[609] | 3859 | break;
|
---|
[3] | 3860 |
|
---|
[609] | 3861 | case IDC_BS_HPOS:
|
---|
| 3862 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 3863 | //変更情報
|
---|
| 3864 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 3865 |
|
---|
[609] | 3866 | i3=SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_GETCURSEL,0,0);
|
---|
| 3867 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(BS_LEFT|BS_RIGHT|BS_CENTER);
|
---|
| 3868 | if(i3==1) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_LEFT;
|
---|
| 3869 | else if(i3==2) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_RIGHT;
|
---|
| 3870 | else if(i3==3) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_CENTER;
|
---|
| 3871 | DrawRadWindow(i,pWindowInfo);
|
---|
| 3872 | return 1;
|
---|
| 3873 | }
|
---|
| 3874 | break;
|
---|
| 3875 | case IDC_BS_VPOS:
|
---|
| 3876 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 3877 | //変更情報
|
---|
| 3878 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 3879 |
|
---|
[609] | 3880 | i3=SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_GETCURSEL,0,0);
|
---|
| 3881 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(BS_TOP|BS_BOTTOM|BS_VCENTER);
|
---|
| 3882 | if(i3==1) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_TOP;
|
---|
| 3883 | else if(i3==2) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_BOTTOM;
|
---|
| 3884 | else if(i3==3) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_VCENTER;
|
---|
| 3885 | DrawRadWindow(i,pWindowInfo);
|
---|
| 3886 | return 1;
|
---|
| 3887 | }
|
---|
| 3888 | break;
|
---|
[3] | 3889 |
|
---|
[609] | 3890 | case IDC_EXSTYLE:
|
---|
| 3891 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1;
|
---|
| 3892 | DrawRadWindow(i,pWindowInfo);
|
---|
[3] | 3893 | return 1;
|
---|
[609] | 3894 | }
|
---|
| 3895 | break;
|
---|
[3] | 3896 | }
|
---|
| 3897 | }
|
---|
| 3898 | return 0;
|
---|
| 3899 | }
|
---|
| 3900 |
|
---|
| 3901 |
|
---|
| 3902 | /////////////////////////
|
---|
| 3903 | // SCROLLBAR プロパティ
|
---|
| 3904 |
|
---|
| 3905 | BOOL CALLBACK RadProperty_ScrollBarProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
| 3906 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 3907 | extern PROJECTINFO ProjectInfo;
|
---|
| 3908 | int i,i2,i3;
|
---|
| 3909 | static BOOL bInitial;
|
---|
| 3910 |
|
---|
| 3911 | switch(message){
|
---|
| 3912 | case WM_INITDIALOG:
|
---|
[609] | 3913 | {
|
---|
| 3914 | bInitial=1;
|
---|
| 3915 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 3916 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 3917 |
|
---|
[609] | 3918 | SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
|
---|
[3] | 3919 |
|
---|
| 3920 |
|
---|
[609] | 3921 | ////////////////////////
|
---|
| 3922 | // スタイル
|
---|
| 3923 | ////////////
|
---|
[3] | 3924 |
|
---|
[609] | 3925 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3926 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3927 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3928 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
|
---|
[3] | 3929 |
|
---|
| 3930 |
|
---|
[609] | 3931 | ////////
|
---|
| 3932 | // 配置
|
---|
| 3933 | ////////
|
---|
[3] | 3934 |
|
---|
[609] | 3935 | //"指定無し"
|
---|
| 3936 | SendDlgItemMessage(hwnd,IDC_SBS_POSITION,CB_ADDSTRING,0,(long)STRING_SCROLLBARPROP_STYLE_FREE);
|
---|
| 3937 | //"上/左"
|
---|
| 3938 | SendDlgItemMessage(hwnd,IDC_SBS_POSITION,CB_ADDSTRING,0,(long)STRING_SCROLLBARPROP_STYLE_TOPORLEFT);
|
---|
| 3939 | //"下/右"
|
---|
| 3940 | SendDlgItemMessage(hwnd,IDC_SBS_POSITION,CB_ADDSTRING,0,(long)STRING_SCROLLBARPROP_STYLE_BOTTOMORRIGHT);
|
---|
[3] | 3941 |
|
---|
[609] | 3942 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&SBS_TOPALIGN) SendDlgItemMessage(hwnd,IDC_SBS_POSITION,CB_SETCURSEL,1,0);
|
---|
| 3943 | else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&SBS_BOTTOMALIGN) SendDlgItemMessage(hwnd,IDC_SBS_POSITION,CB_SETCURSEL,2,0);
|
---|
| 3944 | else SendDlgItemMessage(hwnd,IDC_SBS_POSITION,CB_SETCURSEL,0,0);
|
---|
[3] | 3945 |
|
---|
| 3946 |
|
---|
[609] | 3947 | bInitial=0;
|
---|
| 3948 | break;
|
---|
| 3949 | }
|
---|
[3] | 3950 | case WM_COMMAND:
|
---|
[609] | 3951 | {
|
---|
| 3952 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 3953 | if(i==-1) return 1;
|
---|
| 3954 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 3955 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 3956 |
|
---|
[609] | 3957 | //共通スタイル
|
---|
| 3958 | if(bInitial==0){
|
---|
| 3959 | if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
|
---|
| 3960 | }
|
---|
[3] | 3961 |
|
---|
[609] | 3962 | switch(LOWORD(wParam)){
|
---|
| 3963 | case IDC_SBS_POSITION:
|
---|
| 3964 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 3965 | //変更情報
|
---|
| 3966 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 3967 |
|
---|
[609] | 3968 | i3=SendDlgItemMessage(hwnd,IDC_SBS_POSITION,CB_GETCURSEL,0,0);
|
---|
| 3969 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(SBS_TOPALIGN|SBS_BOTTOMALIGN);
|
---|
| 3970 | if(i3==1) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SBS_TOPALIGN;
|
---|
| 3971 | else if(i3==2) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SBS_BOTTOMALIGN;
|
---|
| 3972 | return 1;
|
---|
| 3973 | }
|
---|
| 3974 | break;
|
---|
[3] | 3975 |
|
---|
[609] | 3976 | case IDC_EXSTYLE:
|
---|
| 3977 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1;
|
---|
| 3978 | DrawRadWindow(i,pWindowInfo);
|
---|
[3] | 3979 | return 1;
|
---|
[609] | 3980 | }
|
---|
| 3981 | break;
|
---|
[3] | 3982 | }
|
---|
| 3983 | }
|
---|
| 3984 | return 0;
|
---|
| 3985 | }
|
---|
| 3986 |
|
---|
| 3987 |
|
---|
| 3988 | //////////////////////
|
---|
| 3989 | // STATIC プロパティ
|
---|
| 3990 |
|
---|
| 3991 | BOOL CALLBACK RadProperty_StaticProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
| 3992 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 3993 | extern PROJECTINFO ProjectInfo;
|
---|
| 3994 | int i,i2,i3;
|
---|
| 3995 | static BOOL bInitial;
|
---|
| 3996 |
|
---|
| 3997 | switch(message){
|
---|
| 3998 | case WM_INITDIALOG:
|
---|
[609] | 3999 | {
|
---|
| 4000 | bInitial=1;
|
---|
| 4001 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 4002 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 4003 |
|
---|
[609] | 4004 | SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
|
---|
| 4005 | SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption);
|
---|
[3] | 4006 |
|
---|
| 4007 |
|
---|
[609] | 4008 | ////////////////////////
|
---|
| 4009 | // スタイル
|
---|
| 4010 | ////////////
|
---|
[3] | 4011 |
|
---|
[609] | 4012 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4013 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4014 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4015 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
|
---|
[3] | 4016 |
|
---|
[609] | 4017 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&SS_NOPREFIX) SendDlgItemMessage(hwnd,IDC_SS_NOPREFIX,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4018 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&SS_LEFTNOWORDWRAP) SendDlgItemMessage(hwnd,IDC_SS_LEFTNOWORDWRAP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4019 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&SS_NOTIFY) SendDlgItemMessage(hwnd,IDC_SS_NOTIFY,BM_SETCHECK,BST_CHECKED,0);
|
---|
[3] | 4020 |
|
---|
| 4021 |
|
---|
[609] | 4022 | //////////////////
|
---|
| 4023 | // テキストの配置
|
---|
| 4024 | //////////////////
|
---|
[3] | 4025 |
|
---|
[609] | 4026 | //"左端"
|
---|
| 4027 | SendDlgItemMessage(hwnd,IDC_SS_TEXTPOS,CB_ADDSTRING,0,(long)STRING_LEFT);
|
---|
| 4028 | //"中央"
|
---|
| 4029 | SendDlgItemMessage(hwnd,IDC_SS_TEXTPOS,CB_ADDSTRING,0,(long)STRING_CENTER);
|
---|
| 4030 | //"右端"
|
---|
| 4031 | SendDlgItemMessage(hwnd,IDC_SS_TEXTPOS,CB_ADDSTRING,0,(long)STRING_RIGHT);
|
---|
[3] | 4032 |
|
---|
[609] | 4033 | //ビットを考慮してSS_LEFTを最後に検討する
|
---|
| 4034 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&SS_CENTER) SendDlgItemMessage(hwnd,IDC_SS_TEXTPOS,CB_SETCURSEL,1,0);
|
---|
| 4035 | else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&SS_RIGHT) SendDlgItemMessage(hwnd,IDC_SS_TEXTPOS,CB_SETCURSEL,2,0);
|
---|
| 4036 | else SendDlgItemMessage(hwnd,IDC_SS_TEXTPOS,CB_SETCURSEL,0,0);
|
---|
[3] | 4037 |
|
---|
| 4038 |
|
---|
[609] | 4039 | bInitial=0;
|
---|
| 4040 | break;
|
---|
| 4041 | }
|
---|
[3] | 4042 | case WM_COMMAND:
|
---|
[609] | 4043 | {
|
---|
| 4044 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 4045 | if(i==-1) return 1;
|
---|
| 4046 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 4047 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 4048 |
|
---|
[609] | 4049 | //共通スタイル
|
---|
| 4050 | if(bInitial==0){
|
---|
| 4051 | if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
|
---|
| 4052 | }
|
---|
[3] | 4053 |
|
---|
[609] | 4054 | switch(LOWORD(wParam)){
|
---|
| 4055 | case IDC_SS_NOPREFIX:
|
---|
| 4056 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 4057 | //変更情報
|
---|
| 4058 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 4059 |
|
---|
[609] | 4060 | if(SendDlgItemMessage(hwnd,IDC_SS_NOPREFIX,BM_GETCHECK,0,0))
|
---|
| 4061 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_NOPREFIX;
|
---|
| 4062 | else
|
---|
| 4063 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~SS_NOPREFIX;
|
---|
| 4064 | return 1;
|
---|
| 4065 | }
|
---|
| 4066 | break;
|
---|
| 4067 | case IDC_SS_LEFTNOWORDWRAP:
|
---|
| 4068 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 4069 | //変更情報
|
---|
| 4070 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 4071 |
|
---|
[609] | 4072 | if(SendDlgItemMessage(hwnd,IDC_SS_LEFTNOWORDWRAP,BM_GETCHECK,0,0))
|
---|
| 4073 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_LEFTNOWORDWRAP;
|
---|
| 4074 | else
|
---|
| 4075 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~SS_LEFTNOWORDWRAP;
|
---|
[3] | 4076 |
|
---|
[609] | 4077 | DrawRadWindow(i,pWindowInfo);
|
---|
| 4078 | return 1;
|
---|
| 4079 | }
|
---|
| 4080 | break;
|
---|
| 4081 | case IDC_SS_NOTIFY:
|
---|
| 4082 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 4083 | //変更情報
|
---|
| 4084 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 4085 |
|
---|
[609] | 4086 | if(SendDlgItemMessage(hwnd,IDC_SS_NOTIFY,BM_GETCHECK,0,0))
|
---|
| 4087 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_NOTIFY;
|
---|
| 4088 | else
|
---|
| 4089 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~SS_NOTIFY;
|
---|
| 4090 | return 1;
|
---|
| 4091 | }
|
---|
| 4092 | break;
|
---|
[3] | 4093 |
|
---|
[609] | 4094 | case IDC_SS_TEXTPOS:
|
---|
| 4095 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 4096 | //変更情報
|
---|
| 4097 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 4098 |
|
---|
[609] | 4099 | i3=SendDlgItemMessage(hwnd,IDC_SS_TEXTPOS,CB_GETCURSEL,0,0);
|
---|
| 4100 | //SS_LEFT=0
|
---|
| 4101 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(SS_CENTER|SS_RIGHT);
|
---|
| 4102 | if(i3==1) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_CENTER;
|
---|
| 4103 | else if(i3==2) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_RIGHT;
|
---|
| 4104 | DrawRadWindow(i,pWindowInfo);
|
---|
| 4105 | return 1;
|
---|
| 4106 | }
|
---|
| 4107 | break;
|
---|
[3] | 4108 |
|
---|
[609] | 4109 | case IDC_EXSTYLE:
|
---|
| 4110 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1;
|
---|
| 4111 | DrawRadWindow(i,pWindowInfo);
|
---|
[3] | 4112 | return 1;
|
---|
[609] | 4113 | }
|
---|
| 4114 | break;
|
---|
[3] | 4115 | }
|
---|
| 4116 | }
|
---|
| 4117 | return 0;
|
---|
| 4118 | }
|
---|
| 4119 |
|
---|
| 4120 |
|
---|
| 4121 | ////////////////////////
|
---|
| 4122 | // TRACKBAR プロパティ
|
---|
| 4123 | BOOL CALLBACK RadProperty_TrackBarProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
| 4124 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 4125 | extern PROJECTINFO ProjectInfo;
|
---|
| 4126 | int i,i2,i3;
|
---|
| 4127 | static BOOL bInitial;
|
---|
| 4128 |
|
---|
| 4129 | switch(message){
|
---|
| 4130 | case WM_INITDIALOG:
|
---|
[609] | 4131 | {
|
---|
| 4132 | bInitial=1;
|
---|
| 4133 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 4134 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 4135 |
|
---|
[609] | 4136 | SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
|
---|
[3] | 4137 |
|
---|
| 4138 |
|
---|
[609] | 4139 | ///////////////////////////
|
---|
| 4140 | // スタイル
|
---|
| 4141 | ////////////
|
---|
[3] | 4142 |
|
---|
[609] | 4143 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4144 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4145 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4146 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
|
---|
[3] | 4147 |
|
---|
| 4148 |
|
---|
[609] | 4149 | ////////
|
---|
| 4150 | // 表示
|
---|
| 4151 | ////////
|
---|
[3] | 4152 |
|
---|
[609] | 4153 | //"水平方向"
|
---|
| 4154 | SendDlgItemMessage(hwnd,IDC_TBS_SITUATION,CB_ADDSTRING,0,(long)STRING_DIRECTION_HORIZONTAL);
|
---|
| 4155 | //"垂直方向"
|
---|
| 4156 | SendDlgItemMessage(hwnd,IDC_TBS_SITUATION,CB_ADDSTRING,0,(long)STRING_DIRECTION_VERTICAL);
|
---|
[3] | 4157 |
|
---|
[609] | 4158 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TBS_VERT) SendDlgItemMessage(hwnd,IDC_TBS_SITUATION,CB_SETCURSEL,1,0);
|
---|
| 4159 | else SendDlgItemMessage(hwnd,IDC_TBS_SITUATION,CB_SETCURSEL,0,0);
|
---|
[3] | 4160 |
|
---|
| 4161 |
|
---|
[609] | 4162 | ////////////
|
---|
| 4163 | // ポイント
|
---|
| 4164 | ////////////
|
---|
[3] | 4165 |
|
---|
[609] | 4166 | //"両方"
|
---|
| 4167 | SendDlgItemMessage(hwnd,IDC_TBS_POINT,CB_ADDSTRING,0,(long)STRING_TRACKBARPROP_STYLE_POSITION_BOTH);
|
---|
| 4168 | //"上/左"
|
---|
| 4169 | SendDlgItemMessage(hwnd,IDC_TBS_POINT,CB_ADDSTRING,0,(long)STRING_TRACKBARPROP_STYLE_POSITION_TOPORLEFT);
|
---|
| 4170 | //"下/右"
|
---|
| 4171 | SendDlgItemMessage(hwnd,IDC_TBS_POINT,CB_ADDSTRING,0,(long)STRING_TRACKBARPROP_STYLE_POSITION_BOTTOMORRIGHT);
|
---|
[3] | 4172 |
|
---|
[609] | 4173 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TBS_BOTH) SendDlgItemMessage(hwnd,IDC_TBS_POINT,CB_SETCURSEL,0,0);
|
---|
| 4174 | else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TBS_TOP) SendDlgItemMessage(hwnd,IDC_TBS_POINT,CB_SETCURSEL,1,0);
|
---|
| 4175 | else SendDlgItemMessage(hwnd,IDC_TBS_POINT,CB_SETCURSEL,2,0);
|
---|
[3] | 4176 |
|
---|
[609] | 4177 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TBS_NOTICKS) SendDlgItemMessage(hwnd,IDC_TBS_NOTICKS,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4178 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TBS_AUTOTICKS) SendDlgItemMessage(hwnd,IDC_TBS_AUTOTICKS,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4179 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TBS_ENABLESELRANGE) SendDlgItemMessage(hwnd,IDC_TBS_ENABLESELRANGE,BM_SETCHECK,BST_CHECKED,0);
|
---|
[3] | 4180 |
|
---|
| 4181 |
|
---|
[609] | 4182 | bInitial=0;
|
---|
| 4183 | break;
|
---|
| 4184 | }
|
---|
[3] | 4185 | case WM_COMMAND:
|
---|
[609] | 4186 | {
|
---|
| 4187 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 4188 | if(i==-1) return 1;
|
---|
| 4189 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 4190 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 4191 |
|
---|
[609] | 4192 | //共通スタイル
|
---|
| 4193 | if(bInitial==0){
|
---|
| 4194 | if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
|
---|
| 4195 | }
|
---|
[3] | 4196 |
|
---|
[609] | 4197 | switch(LOWORD(wParam)){
|
---|
| 4198 | case IDC_TBS_SITUATION:
|
---|
| 4199 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 4200 | //変更情報
|
---|
| 4201 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 4202 |
|
---|
[609] | 4203 | i3=SendDlgItemMessage(hwnd,IDC_TBS_SITUATION,CB_GETCURSEL,0,0);
|
---|
| 4204 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TBS_VERT;
|
---|
| 4205 | if(i3==1) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TBS_VERT;
|
---|
| 4206 | DrawRadWindow(i,pWindowInfo);
|
---|
| 4207 | return 1;
|
---|
| 4208 | }
|
---|
| 4209 | break;
|
---|
| 4210 | case IDC_TBS_POINT:
|
---|
| 4211 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 4212 | //変更情報
|
---|
| 4213 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 4214 |
|
---|
[609] | 4215 | i3=SendDlgItemMessage(hwnd,IDC_TBS_POINT,CB_GETCURSEL,0,0);
|
---|
| 4216 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(TBS_BOTH|TBS_TOP);
|
---|
| 4217 | if(i3==0) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TBS_BOTH;
|
---|
| 4218 | else if(i3==1) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TBS_TOP;
|
---|
| 4219 | DrawRadWindow(i,pWindowInfo);
|
---|
| 4220 | return 1;
|
---|
| 4221 | }
|
---|
| 4222 | break;
|
---|
[3] | 4223 |
|
---|
[609] | 4224 | case IDC_TBS_NOTICKS:
|
---|
| 4225 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 4226 | //変更情報
|
---|
| 4227 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 4228 |
|
---|
[609] | 4229 | if(SendDlgItemMessage(hwnd,IDC_TBS_NOTICKS,BM_GETCHECK,0,0))
|
---|
| 4230 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TBS_NOTICKS;
|
---|
| 4231 | else
|
---|
| 4232 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TBS_NOTICKS;
|
---|
| 4233 | DrawRadWindow(i,pWindowInfo);
|
---|
| 4234 | return 1;
|
---|
| 4235 | }
|
---|
| 4236 | break;
|
---|
| 4237 | case IDC_TBS_AUTOTICKS:
|
---|
| 4238 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 4239 | //変更情報
|
---|
| 4240 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 4241 |
|
---|
[609] | 4242 | if(SendDlgItemMessage(hwnd,IDC_TBS_AUTOTICKS,BM_GETCHECK,0,0))
|
---|
| 4243 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TBS_AUTOTICKS;
|
---|
| 4244 | else
|
---|
| 4245 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TBS_AUTOTICKS;
|
---|
| 4246 | return 1;
|
---|
| 4247 | }
|
---|
| 4248 | break;
|
---|
| 4249 | case IDC_TBS_ENABLESELRANGE:
|
---|
| 4250 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 4251 | //変更情報
|
---|
| 4252 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 4253 |
|
---|
[609] | 4254 | if(SendDlgItemMessage(hwnd,IDC_TBS_ENABLESELRANGE,BM_GETCHECK,0,0))
|
---|
| 4255 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TBS_ENABLESELRANGE;
|
---|
| 4256 | else
|
---|
| 4257 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TBS_ENABLESELRANGE;
|
---|
| 4258 | DrawRadWindow(i,pWindowInfo);
|
---|
| 4259 | return 1;
|
---|
| 4260 | }
|
---|
| 4261 | break;
|
---|
[3] | 4262 |
|
---|
[609] | 4263 | case IDC_EXSTYLE:
|
---|
| 4264 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1;
|
---|
| 4265 | DrawRadWindow(i,pWindowInfo);
|
---|
[3] | 4266 | return 1;
|
---|
[609] | 4267 | }
|
---|
| 4268 | break;
|
---|
[3] | 4269 | }
|
---|
| 4270 | }
|
---|
| 4271 | return 0;
|
---|
| 4272 | }
|
---|
| 4273 |
|
---|
| 4274 |
|
---|
| 4275 | //////////////////////////
|
---|
| 4276 | // TREEVIEW プロパティ
|
---|
| 4277 | BOOL CALLBACK RadProperty_TreeViewProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
| 4278 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 4279 | extern PROJECTINFO ProjectInfo;
|
---|
| 4280 | int i,i2;
|
---|
| 4281 | static BOOL bInitial;
|
---|
| 4282 |
|
---|
| 4283 | switch(message){
|
---|
| 4284 | case WM_INITDIALOG:
|
---|
[609] | 4285 | {
|
---|
| 4286 | bInitial=1;
|
---|
| 4287 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 4288 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 4289 |
|
---|
[609] | 4290 | SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
|
---|
[3] | 4291 |
|
---|
| 4292 |
|
---|
[609] | 4293 | ////////////
|
---|
| 4294 | //スタイル
|
---|
[3] | 4295 |
|
---|
[609] | 4296 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4297 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4298 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4299 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
|
---|
[3] | 4300 |
|
---|
[609] | 4301 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TVS_HASBUTTONS) SendDlgItemMessage(hwnd,IDC_TVS_HASBUTTONS,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4302 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TVS_HASLINES) SendDlgItemMessage(hwnd,IDC_TVS_HASLINES,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4303 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TVS_LINESATROOT) SendDlgItemMessage(hwnd,IDC_TVS_LINESATROOT,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4304 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TVS_EDITLABELS) SendDlgItemMessage(hwnd,IDC_TVS_EDITLABELS,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4305 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TVS_DISABLEDRAGDROP) SendDlgItemMessage(hwnd,IDC_TVS_DISABLEDRAGDROP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4306 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TVS_SHOWSELALWAYS) SendDlgItemMessage(hwnd,IDC_TVS_SHOWSELALWAYS,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4307 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TVS_NOSCROLL) SendDlgItemMessage(hwnd,IDC_TVS_NOSCROLL,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4308 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TVS_NOTOOLTIPS) SendDlgItemMessage(hwnd,IDC_TVS_NOTOOLTIPS,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4309 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TVS_CHECKBOXES) SendDlgItemMessage(hwnd,IDC_TVS_CHECKBOXES,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4310 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TVS_FULLROWSELECT) SendDlgItemMessage(hwnd,IDC_TVS_FULLROWSELECT,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4311 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TVS_TRACKSELECT) SendDlgItemMessage(hwnd,IDC_TVS_TRACKSELECT,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4312 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TVS_SINGLEEXPAND) SendDlgItemMessage(hwnd,IDC_TVS_SINGLEEXPAND,BM_SETCHECK,BST_CHECKED,0);
|
---|
[3] | 4313 |
|
---|
| 4314 |
|
---|
[609] | 4315 | bInitial=0;
|
---|
| 4316 | break;
|
---|
| 4317 | }
|
---|
[3] | 4318 | case WM_COMMAND:
|
---|
[609] | 4319 | {
|
---|
| 4320 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 4321 | if(i==-1) return 1;
|
---|
| 4322 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 4323 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 4324 |
|
---|
[609] | 4325 | //共通スタイル
|
---|
| 4326 | if(bInitial==0){
|
---|
| 4327 | if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
|
---|
| 4328 | }
|
---|
[3] | 4329 |
|
---|
[609] | 4330 | switch(LOWORD(wParam)){
|
---|
| 4331 | case IDC_TVS_HASBUTTONS:
|
---|
| 4332 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 4333 | //変更情報
|
---|
| 4334 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 4335 |
|
---|
[609] | 4336 | if(SendDlgItemMessage(hwnd,IDC_TVS_HASBUTTONS,BM_GETCHECK,0,0))
|
---|
| 4337 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TVS_HASBUTTONS;
|
---|
| 4338 | else
|
---|
| 4339 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TVS_HASBUTTONS;
|
---|
| 4340 | return 1;
|
---|
| 4341 | }
|
---|
| 4342 | break;
|
---|
| 4343 | case IDC_TVS_HASLINES:
|
---|
| 4344 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 4345 | //変更情報
|
---|
| 4346 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 4347 |
|
---|
[609] | 4348 | if(SendDlgItemMessage(hwnd,IDC_TVS_HASLINES,BM_GETCHECK,0,0))
|
---|
| 4349 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TVS_HASLINES;
|
---|
| 4350 | else
|
---|
| 4351 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TVS_HASLINES;
|
---|
| 4352 | return 1;
|
---|
| 4353 | }
|
---|
| 4354 | break;
|
---|
| 4355 | case IDC_TVS_LINESATROOT:
|
---|
| 4356 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 4357 | //変更情報
|
---|
| 4358 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 4359 |
|
---|
[609] | 4360 | if(SendDlgItemMessage(hwnd,IDC_TVS_LINESATROOT,BM_GETCHECK,0,0))
|
---|
| 4361 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TVS_LINESATROOT;
|
---|
| 4362 | else
|
---|
| 4363 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TVS_LINESATROOT;
|
---|
| 4364 | return 1;
|
---|
| 4365 | }
|
---|
| 4366 | break;
|
---|
| 4367 | case IDC_TVS_EDITLABELS:
|
---|
| 4368 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 4369 | //変更情報
|
---|
| 4370 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 4371 |
|
---|
[609] | 4372 | if(SendDlgItemMessage(hwnd,IDC_TVS_EDITLABELS,BM_GETCHECK,0,0))
|
---|
| 4373 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TVS_EDITLABELS;
|
---|
| 4374 | else
|
---|
| 4375 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TVS_EDITLABELS;
|
---|
| 4376 | return 1;
|
---|
| 4377 | }
|
---|
| 4378 | break;
|
---|
| 4379 | case IDC_TVS_DISABLEDRAGDROP:
|
---|
| 4380 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 4381 | //変更情報
|
---|
| 4382 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 4383 |
|
---|
[609] | 4384 | if(SendDlgItemMessage(hwnd,IDC_TVS_DISABLEDRAGDROP,BM_GETCHECK,0,0))
|
---|
| 4385 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TVS_DISABLEDRAGDROP;
|
---|
| 4386 | else
|
---|
| 4387 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TVS_DISABLEDRAGDROP;
|
---|
| 4388 | return 1;
|
---|
| 4389 | }
|
---|
| 4390 | break;
|
---|
| 4391 | case IDC_TVS_SHOWSELALWAYS:
|
---|
| 4392 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 4393 | //変更情報
|
---|
| 4394 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 4395 |
|
---|
[609] | 4396 | if(SendDlgItemMessage(hwnd,IDC_TVS_SHOWSELALWAYS,BM_GETCHECK,0,0))
|
---|
| 4397 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TVS_SHOWSELALWAYS;
|
---|
| 4398 | else
|
---|
| 4399 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TVS_SHOWSELALWAYS;
|
---|
| 4400 | return 1;
|
---|
| 4401 | }
|
---|
| 4402 | break;
|
---|
| 4403 | case IDC_TVS_NOSCROLL:
|
---|
| 4404 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 4405 | //変更情報
|
---|
| 4406 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 4407 |
|
---|
[609] | 4408 | if(SendDlgItemMessage(hwnd,IDC_TVS_NOSCROLL,BM_GETCHECK,0,0))
|
---|
| 4409 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TVS_NOSCROLL;
|
---|
| 4410 | else
|
---|
| 4411 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TVS_NOSCROLL;
|
---|
| 4412 | return 1;
|
---|
| 4413 | }
|
---|
| 4414 | break;
|
---|
| 4415 | case IDC_TVS_NOTOOLTIPS:
|
---|
| 4416 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 4417 | //変更情報
|
---|
| 4418 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 4419 |
|
---|
[609] | 4420 | if(SendDlgItemMessage(hwnd,IDC_TVS_NOTOOLTIPS,BM_GETCHECK,0,0))
|
---|
| 4421 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TVS_NOTOOLTIPS;
|
---|
| 4422 | else
|
---|
| 4423 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TVS_NOTOOLTIPS;
|
---|
| 4424 | return 1;
|
---|
| 4425 | }
|
---|
| 4426 | break;
|
---|
| 4427 | case IDC_TVS_CHECKBOXES:
|
---|
| 4428 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 4429 | //変更情報
|
---|
| 4430 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 4431 |
|
---|
[609] | 4432 | if(SendDlgItemMessage(hwnd,IDC_TVS_CHECKBOXES,BM_GETCHECK,0,0))
|
---|
| 4433 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TVS_CHECKBOXES;
|
---|
| 4434 | else
|
---|
| 4435 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TVS_CHECKBOXES;
|
---|
| 4436 | return 1;
|
---|
| 4437 | }
|
---|
| 4438 | break;
|
---|
| 4439 | case IDC_TVS_FULLROWSELECT:
|
---|
| 4440 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 4441 | //変更情報
|
---|
| 4442 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 4443 |
|
---|
[609] | 4444 | if(SendDlgItemMessage(hwnd,IDC_TVS_FULLROWSELECT,BM_GETCHECK,0,0))
|
---|
| 4445 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TVS_FULLROWSELECT;
|
---|
| 4446 | else
|
---|
| 4447 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TVS_FULLROWSELECT;
|
---|
| 4448 | return 1;
|
---|
| 4449 | }
|
---|
| 4450 | break;
|
---|
| 4451 | case IDC_TVS_TRACKSELECT:
|
---|
| 4452 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 4453 | //変更情報
|
---|
| 4454 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 4455 |
|
---|
[609] | 4456 | if(SendDlgItemMessage(hwnd,IDC_TVS_TRACKSELECT,BM_GETCHECK,0,0))
|
---|
| 4457 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TVS_TRACKSELECT;
|
---|
| 4458 | else
|
---|
| 4459 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TVS_TRACKSELECT;
|
---|
| 4460 | return 1;
|
---|
| 4461 | }
|
---|
| 4462 | break;
|
---|
| 4463 | case IDC_TVS_SINGLEEXPAND:
|
---|
| 4464 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 4465 | //変更情報
|
---|
| 4466 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 4467 |
|
---|
[609] | 4468 | if(SendDlgItemMessage(hwnd,IDC_TVS_SINGLEEXPAND,BM_GETCHECK,0,0))
|
---|
| 4469 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TVS_SINGLEEXPAND;
|
---|
| 4470 | else
|
---|
| 4471 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TVS_SINGLEEXPAND;
|
---|
| 4472 | return 1;
|
---|
| 4473 | }
|
---|
| 4474 | break;
|
---|
[3] | 4475 |
|
---|
[609] | 4476 | case IDC_EXSTYLE:
|
---|
| 4477 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1;
|
---|
| 4478 | DrawRadWindow(i,pWindowInfo);
|
---|
[3] | 4479 | return 1;
|
---|
[609] | 4480 | }
|
---|
| 4481 | break;
|
---|
[3] | 4482 | }
|
---|
| 4483 | }
|
---|
| 4484 | return 0;
|
---|
| 4485 | }
|
---|
| 4486 |
|
---|
| 4487 |
|
---|
| 4488 | //////////////////////
|
---|
| 4489 | // UPDOWN プロパティ
|
---|
| 4490 | BOOL CALLBACK RadProperty_UpDownProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
| 4491 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 4492 | extern PROJECTINFO ProjectInfo;
|
---|
| 4493 | int i,i2,i3;
|
---|
| 4494 | static BOOL bInitial;
|
---|
| 4495 |
|
---|
| 4496 | switch(message){
|
---|
| 4497 | case WM_INITDIALOG:
|
---|
[609] | 4498 | {
|
---|
| 4499 | bInitial=1;
|
---|
| 4500 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 4501 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 4502 |
|
---|
[609] | 4503 | SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
|
---|
| 4504 | SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption);
|
---|
[3] | 4505 |
|
---|
| 4506 |
|
---|
[609] | 4507 | //////////////////
|
---|
| 4508 | // スタイル
|
---|
| 4509 | ////////////
|
---|
[3] | 4510 |
|
---|
[609] | 4511 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4512 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4513 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4514 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
|
---|
[3] | 4515 |
|
---|
| 4516 |
|
---|
[609] | 4517 | ////////
|
---|
| 4518 | // 方向
|
---|
| 4519 | ////////
|
---|
[3] | 4520 |
|
---|
[609] | 4521 | //"水平方向"
|
---|
| 4522 | SendDlgItemMessage(hwnd,IDC_UDS_SITUATION,CB_ADDSTRING,0,(long)STRING_DIRECTION_HORIZONTAL);
|
---|
| 4523 | //"垂直方向"
|
---|
| 4524 | SendDlgItemMessage(hwnd,IDC_UDS_SITUATION,CB_ADDSTRING,0,(long)STRING_DIRECTION_VERTICAL);
|
---|
[3] | 4525 |
|
---|
[609] | 4526 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&UDS_HORZ) SendDlgItemMessage(hwnd,IDC_UDS_SITUATION,CB_SETCURSEL,0,0);
|
---|
| 4527 | else SendDlgItemMessage(hwnd,IDC_UDS_SITUATION,CB_SETCURSEL,1,0);
|
---|
[3] | 4528 |
|
---|
[609] | 4529 | ////////////
|
---|
| 4530 | // アタッチ
|
---|
| 4531 | ////////////
|
---|
[3] | 4532 |
|
---|
[609] | 4533 | //"なし"
|
---|
| 4534 | SendDlgItemMessage(hwnd,IDC_UDS_ATTACH,CB_ADDSTRING,0,(long)STRING_NONE_);
|
---|
| 4535 | //"左端"
|
---|
| 4536 | SendDlgItemMessage(hwnd,IDC_UDS_ATTACH,CB_ADDSTRING,0,(long)STRING_LEFT);
|
---|
| 4537 | //"右端"
|
---|
| 4538 | SendDlgItemMessage(hwnd,IDC_UDS_ATTACH,CB_ADDSTRING,0,(long)STRING_RIGHT);
|
---|
[3] | 4539 |
|
---|
[609] | 4540 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&UDS_ALIGNLEFT) SendDlgItemMessage(hwnd,IDC_UDS_ATTACH,CB_SETCURSEL,1,0);
|
---|
| 4541 | else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&UDS_ALIGNRIGHT) SendDlgItemMessage(hwnd,IDC_UDS_ATTACH,CB_SETCURSEL,2,0);
|
---|
| 4542 | else SendDlgItemMessage(hwnd,IDC_UDS_ATTACH,CB_SETCURSEL,0,0);
|
---|
[3] | 4543 |
|
---|
[609] | 4544 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&UDS_AUTOBUDDY) SendDlgItemMessage(hwnd,IDC_UDS_AUTOBUDDY,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4545 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&UDS_SETBUDDYINT) SendDlgItemMessage(hwnd,IDC_UDS_SETBUDDYINT,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4546 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&UDS_NOTHOUSANDS) SendDlgItemMessage(hwnd,IDC_UDS_NOTHOUSANDS,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4547 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&UDS_WRAP) SendDlgItemMessage(hwnd,IDC_UDS_WRAP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4548 | if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&UDS_ARROWKEYS) SendDlgItemMessage(hwnd,IDC_UDS_ARROWKEYS,BM_SETCHECK,BST_CHECKED,0);
|
---|
[3] | 4549 |
|
---|
| 4550 |
|
---|
[609] | 4551 | bInitial=0;
|
---|
| 4552 | break;
|
---|
| 4553 | }
|
---|
[3] | 4554 | case WM_COMMAND:
|
---|
[609] | 4555 | {
|
---|
| 4556 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 4557 | if(i==-1) return 1;
|
---|
| 4558 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 4559 | WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path);
|
---|
[3] | 4560 |
|
---|
[609] | 4561 | //共通スタイル
|
---|
| 4562 | if(bInitial==0){
|
---|
| 4563 | if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
|
---|
| 4564 | }
|
---|
[3] | 4565 |
|
---|
[609] | 4566 | switch(LOWORD(wParam)){
|
---|
| 4567 | case IDC_UDS_SITUATION:
|
---|
| 4568 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 4569 | //変更情報
|
---|
| 4570 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 4571 |
|
---|
[609] | 4572 | i3=SendDlgItemMessage(hwnd,IDC_UDS_SITUATION,CB_GETCURSEL,0,0);
|
---|
| 4573 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~UDS_HORZ;
|
---|
| 4574 | if(i3==0) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=UDS_HORZ;
|
---|
| 4575 | DrawRadWindow(i,pWindowInfo);
|
---|
| 4576 | return 1;
|
---|
| 4577 | }
|
---|
| 4578 | break;
|
---|
| 4579 | case IDC_UDS_ATTACH:
|
---|
| 4580 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 4581 | //変更情報
|
---|
| 4582 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 4583 |
|
---|
[609] | 4584 | i3=SendDlgItemMessage(hwnd,IDC_UDS_ATTACH,CB_GETCURSEL,0,0);
|
---|
| 4585 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(UDS_ALIGNLEFT|UDS_ALIGNRIGHT);
|
---|
| 4586 | if(i3==1) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=UDS_ALIGNLEFT;
|
---|
| 4587 | else if(i3==2) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=UDS_ALIGNRIGHT;
|
---|
| 4588 | return 1;
|
---|
| 4589 | }
|
---|
| 4590 | break;
|
---|
[3] | 4591 |
|
---|
[609] | 4592 | case IDC_UDS_AUTOBUDDY:
|
---|
| 4593 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 4594 | //変更情報
|
---|
| 4595 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 4596 |
|
---|
[609] | 4597 | if(SendDlgItemMessage(hwnd,IDC_UDS_AUTOBUDDY,BM_GETCHECK,0,0))
|
---|
| 4598 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=UDS_AUTOBUDDY;
|
---|
| 4599 | else
|
---|
| 4600 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~UDS_AUTOBUDDY;
|
---|
| 4601 | return 1;
|
---|
| 4602 | }
|
---|
| 4603 | break;
|
---|
| 4604 | case IDC_UDS_SETBUDDYINT:
|
---|
| 4605 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 4606 | //変更情報
|
---|
| 4607 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 4608 |
|
---|
[609] | 4609 | if(SendDlgItemMessage(hwnd,IDC_UDS_SETBUDDYINT,BM_GETCHECK,0,0))
|
---|
| 4610 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=UDS_SETBUDDYINT;
|
---|
| 4611 | else
|
---|
| 4612 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~UDS_SETBUDDYINT;
|
---|
| 4613 | return 1;
|
---|
| 4614 | }
|
---|
| 4615 | break;
|
---|
| 4616 | case IDC_UDS_NOTHOUSANDS:
|
---|
| 4617 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 4618 | //変更情報
|
---|
| 4619 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 4620 |
|
---|
[609] | 4621 | if(SendDlgItemMessage(hwnd,IDC_UDS_NOTHOUSANDS,BM_GETCHECK,0,0))
|
---|
| 4622 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=UDS_NOTHOUSANDS;
|
---|
| 4623 | else
|
---|
| 4624 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~UDS_NOTHOUSANDS;
|
---|
| 4625 | return 1;
|
---|
| 4626 | }
|
---|
| 4627 | break;
|
---|
| 4628 | case IDC_UDS_WRAP:
|
---|
| 4629 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 4630 | //変更情報
|
---|
| 4631 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 4632 |
|
---|
[609] | 4633 | if(SendDlgItemMessage(hwnd,IDC_UDS_WRAP,BM_GETCHECK,0,0))
|
---|
| 4634 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=UDS_WRAP;
|
---|
| 4635 | else
|
---|
| 4636 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~UDS_WRAP;
|
---|
| 4637 | return 1;
|
---|
| 4638 | }
|
---|
| 4639 | break;
|
---|
| 4640 | case IDC_UDS_ARROWKEYS:
|
---|
| 4641 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 4642 | //変更情報
|
---|
| 4643 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
[3] | 4644 |
|
---|
[609] | 4645 | if(SendDlgItemMessage(hwnd,IDC_UDS_ARROWKEYS,BM_GETCHECK,0,0))
|
---|
| 4646 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=UDS_ARROWKEYS;
|
---|
| 4647 | else
|
---|
| 4648 | pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~UDS_ARROWKEYS;
|
---|
| 4649 | return 1;
|
---|
| 4650 | }
|
---|
| 4651 | break;
|
---|
[3] | 4652 |
|
---|
[609] | 4653 | case IDC_EXSTYLE:
|
---|
| 4654 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1;
|
---|
| 4655 | DrawRadWindow(i,pWindowInfo);
|
---|
[3] | 4656 | return 1;
|
---|
[609] | 4657 | }
|
---|
[3] | 4658 | }
|
---|
| 4659 | }
|
---|
| 4660 | return 0;
|
---|
| 4661 | }
|
---|
| 4662 |
|
---|
| 4663 |
|
---|
| 4664 | LRESULT CALLBACK RadPropertyWindow(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
| 4665 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 4666 | extern PROJECTINFO ProjectInfo;
|
---|
| 4667 | int i;
|
---|
| 4668 | RECT rect;
|
---|
| 4669 | SCROLLINFO ScrollInfo;
|
---|
| 4670 |
|
---|
| 4671 | switch(message){
|
---|
| 4672 | case WM_MOUSEACTIVATE:
|
---|
| 4673 | BringWindowToTop(GetParent(hwnd));
|
---|
| 4674 | return 0;
|
---|
| 4675 | case WM_VSCROLL:
|
---|
| 4676 | ScrollInfo.cbSize=sizeof(SCROLLINFO);
|
---|
| 4677 | ScrollInfo.fMask=SIF_POS|SIF_PAGE|SIF_RANGE;
|
---|
| 4678 | GetScrollInfo(hwnd,SB_VERT,&ScrollInfo);
|
---|
| 4679 | if(LOWORD(wParam)==SB_LINEUP) i=-20;
|
---|
| 4680 | else if(LOWORD(wParam)==SB_LINEDOWN) i=20;
|
---|
| 4681 | else if(LOWORD(wParam)==SB_PAGEUP) i=-(signed int)ScrollInfo.nPage;
|
---|
| 4682 | else if(LOWORD(wParam)==SB_PAGEDOWN) i=ScrollInfo.nPage;
|
---|
| 4683 | else if(LOWORD(wParam)==SB_THUMBTRACK) i=HIWORD(wParam)-ScrollInfo.nPos;
|
---|
| 4684 | else i=0;
|
---|
| 4685 | GetClientRect(hwnd,&rect);
|
---|
| 4686 | i=max(-ScrollInfo.nPos,min(i,ScrollInfo.nMax-rect.bottom-ScrollInfo.nPos));
|
---|
| 4687 | if(i!=0){
|
---|
| 4688 | ScrollInfo.nPos+=i;
|
---|
| 4689 | SetScrollInfo(hwnd,SB_VERT,&ScrollInfo,1);
|
---|
| 4690 | ScrollWindow(hwnd,0,-i,NULL,NULL);
|
---|
| 4691 | UpdateWindow(hwnd);
|
---|
| 4692 | }
|
---|
| 4693 | return 0;
|
---|
| 4694 | case WM_SIZE:
|
---|
| 4695 | i=GetWndNum(GetParent(hwnd));
|
---|
| 4696 | if(i==-1) return 0; //ウィンドウが初期状態の場合
|
---|
| 4697 | ScrollInfo.cbSize=sizeof(SCROLLINFO);
|
---|
| 4698 | ScrollInfo.fMask=SIF_PAGE|SIF_RANGE|SIF_POS;
|
---|
| 4699 | GetScrollInfo(hwnd,SB_VERT,&ScrollInfo);
|
---|
| 4700 | GetClientRect(MdiInfo[i].MdiRadInfo->hProp_Dlg,&rect);
|
---|
| 4701 | ScrollInfo.nMin=0;
|
---|
| 4702 | ScrollInfo.nMax=rect.bottom;
|
---|
| 4703 | ScrollInfo.nPage=HIWORD(lParam);
|
---|
| 4704 | SetScrollInfo(hwnd,SB_VERT,&ScrollInfo,1);
|
---|
| 4705 |
|
---|
| 4706 | i=ScrollInfo.nPos;
|
---|
| 4707 | ScrollInfo.fMask=SIF_POS;
|
---|
| 4708 | GetScrollInfo(hwnd,SB_VERT,&ScrollInfo);
|
---|
| 4709 | if(i>ScrollInfo.nPos){
|
---|
| 4710 | ScrollWindow(hwnd,0,i-ScrollInfo.nPos,NULL,NULL);
|
---|
| 4711 | UpdateWindow(hwnd);
|
---|
| 4712 | }
|
---|
| 4713 | return 0;
|
---|
| 4714 | }
|
---|
| 4715 | return DefWindowProc(hwnd,message,wParam,lParam);
|
---|
| 4716 | }
|
---|