updated the schema library to the current one on 03/23/2023
[far2l.git] / align / src / AlignMix.icpp
blob388a9d310bcd0be1541987cd7f2c190851dbb4ef
1 const TCHAR *GetMsg(int MsgId)\r
2 {\r
3         return(Info.GetMsg(Info.ModuleNumber,MsgId));\r
4 }\r
5 \r
6 void InitDialogItems(const struct InitDialogItem *Init,struct FarDialogItem *Item,int ItemsNumber)\r
7 {\r
8         int I;\r
9         struct FarDialogItem *PItem=Item;\r
10         const struct InitDialogItem *PInit=Init;\r
11         for (I=0;I<ItemsNumber;I++,PItem++,PInit++)\r
12         {\r
13                 PItem->Type=PInit->Type;\r
14                 PItem->X1=PInit->X1;\r
15                 PItem->Y1=PInit->Y1;\r
16                 PItem->X2=PInit->X2;\r
17                 PItem->Y2=PInit->Y2;\r
18                 PItem->Focus=PInit->Focus;\r
19                 PItem->History=(const TCHAR *)PInit->Selected;\r
20                 PItem->Flags=PInit->Flags;\r
21                 PItem->DefaultButton=PInit->DefaultButton;\r
22 #ifdef UNICODE\r
23                 PItem->MaxLen=0;\r
24 #endif\r
25                 if ((DWORD_PTR)PInit->Data<2000)\r
26 #ifndef UNICODE\r
27                         lstrcpy(PItem->Data,GetMsg((unsigned int)(DWORD_PTR)PInit->Data));\r
28 #else\r
29                         PItem->PtrData = GetMsg((unsigned int)(DWORD_PTR)PInit->Data);\r
30 #endif\r
31                 else\r
32 #ifndef UNICODE\r
33                         lstrcpy(PItem->Data,PInit->Data);\r
34 #else\r
35                         PItem->PtrData = PInit->Data;\r
36 #endif\r
37         }\r
38 }\r