| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 962 人关注过本帖
标题:C语言开发高手进(自由身)
只看楼主 加入收藏
fidoyang
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2010-5-14
结帖率:0
收藏
已结贴  问题点数:20 回复次数:2 
C语言开发高手进(自由身)
几个朋友一起接了一个军队的程序改造升级项目,由于其原始代码写的非常混乱(平均1一个函数600行代码 -_-!),导致哥几个在做升级、界面的时候进度非常缓慢,其程序完全由VC编制,有没有高手能帮帮忙加快加快进度,当然不会白帮忙了,呵呵,并且热切盼望着能长期合作下去!!QQ 1704629

[ 本帖最后由 fidoyang 于 2010-5-14 16:39 编辑 ]
搜索更多相关主题的帖子: 自由身 C语言 开发 
2010-05-14 16:38
tandechun
Rank: 2
来 自:广西-南宁
等 级:论坛游民
帖 子:58
专家分:35
注 册:2010-3-14
收藏
得分:20 
我只会C,不知我能不能,我有没有资格
2010-05-19 21:46
nhhykly9d
Rank: 1
等 级:新手上路
帖 子:30
专家分:5
注 册:2008-1-4
收藏
得分:0 
void set_basedate(void)
{
    FILE *binaryp;
    binaryp=fopen("userdate.bin","wb");
    fwrite(&user_date,sizeof(userdate),1,binaryp);
    fclose(binaryp);
}
void get_basedate(void)
{
        FILE *binaryp;
    binaryp=fopen("userdate.bin","rb");
    fread(&user_date,sizeof(userdate),1,binaryp);
    fclose(binaryp);
}
void 给文件增加行编号(char*filename)
{
    ifstream indate;
    indate.open(filename);
    string s1="",s2="";
    int i=0;
while(!indate.eof())
{
    getline(indate,s2);
    if(s2=="")
        break ;
    s1=s1+int_to_string(i)+" :"+s2 +"\n";
    i++;
}
    indate.close();
    ofstream out;
    out.open(filename);
    out<<s1;
    out.close();

}
LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM) ;
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
                    PSTR szCmdLine, int iCmdShow)
{
     static TCHAR szAppName[] =  ("HelloWin") ;
     HWND         hwnd ;
     MSG          msg ;
     WNDCLASS     wndclass ;

     wndclass.style         = CS_HREDRAW | CS_VREDRAW ;
     wndclass.lpfnWndProc   = WndProc ;
     wndclass.cbClsExtra    = 0 ;
     wndclass.cbWndExtra    = 0 ;
     wndclass.hInstance     = hInstance ;
     wndclass.hIcon         = LoadIcon (NULL, IDI_APPLICATION) ;
     wndclass.hCursor       = LoadCursor (NULL, IDC_ARROW) ;
     wndclass.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH) ;
     wndclass.lpszMenuName  = NULL ;
     wndclass.lpszClassName = szAppName ;

     if (!RegisterClass (&wndclass))
     {
          MessageBox (NULL,  ("This program requires Windows NT!"),
                      szAppName, MB_ICONERROR) ;
          return 0 ;
     }
   
          int cxScreen, cyScreen ;
     cxScreen = GetSystemMetrics (SM_CXSCREEN) ;
     cyScreen = GetSystemMetrics (SM_CYSCREEN) ;
     hwnd = CreateWindow (szAppName,                  // window class name
                           ("The Hello Program"), // window caption
                          WS_SYSMENU,        // window style
                         (cxScreen-xsize_frame)/2,              // initial x position
                          (cyScreen-ysize_frame)/2,              // initial y position
                          xsize_frame,              // initial x size
                          ysize_frame,              // initial y size
                          NULL,                       // parent window handle
                          NULL,                       // window menu handle
                          hInstance,                  // program instance handle
                          NULL) ;                     // creation parameters
     
     ShowWindow (hwnd, iCmdShow) ;
     UpdateWindow (hwnd) ;
     
     while (GetMessage (&msg, NULL, 0, 0))
     {
          TranslateMessage (&msg) ;
          DispatchMessage (&msg) ;
     }
     return msg.wParam ;
}

LRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
     HDC         hdc ;
     PAINTSTRUCT ps ;
 


          static HWND  hwndButton1,hwndButton2, hwndButton3,  hwndButton4,hwndEdit1,hwndText1,hwndText2,hwndText3,frame_hwndLabel1,frame_hwndLabel2,frame_hwndLabel3;

      static HWND  frame2_Button1,frame2_LabelHwnd[26],frame2_Combo[24],frame2_Listhwnd[3] ;
            static char *frame2_LabelText[]={ "火球术","诱惑之光" ,"雷电术" ,"冰箭术","火墙" ,"冰旋风" , "风影盾", "狂龙紫电" ,"流星火雨" ,"法师技能" ,"法师技能" ,"法师技能" ,"法师技能" ,"法师技能" ,"法师技能" ,"法师技能" ,"法师技能" ,"法师技能","技能设置" ,"技能使用" ,"第一技能" ,"第二技能" ,"第三技能" ,"法师技能","法师技能" ,"法师技能"  };


        static HWND frame1_Button1,frame1_ComBox[18],frame1_hwndLabel[20],frame1_hwndList[3] ;
        static char * frame1_Label_Text[20] = { "主体职业",  "分身职业", "有无大包裹","分身战斗模式","有无回城石",  "通用设置", "回城地点","挂机地图","去目的地方式",  "修装备模式", "随机飞走图","通用设置","使用随机卷轴",  "使用地牢卷轴", "通用设置","遇堵门次数","改到魔城练级",  "通用设置", "游戏通用设置","保护设置"};

          static HWND  frame3_Button1,frame3_LabelHwnd[30];
          static HWND frame3_Combo[30],frame3_list[30] ;
     static char * frame3_LabelText[] ={   "金创药包" ,    "魔法药包" ,   "道符" ,  "红毒" ,  "绿毒" ,    "雄人偶" ,   "雌人偶" ,  "地牢卷轴" ,  "随机卷轴包" ,    "随机卷轴" ,   "冰泉圣水" ,  "补充物品" ,  "补充物品" ,    "主体补充" ,   "分身补充" ,  "物品名称" ,  "物品名称" ,    "物品名称" ,   "物品名称" ,  "物品名称" ,  "物品名称" ,  "物品名称" ,    "物品名称" ,   "物品名称" ,  "物品名称" ,  "物品名称" ,    "物品名称" ,   "物品名称" ,  "物品名称" ,  "物品名称" ,  "物品名称" ,    "物品名称" ,   "物品名称" ,  "物品名称" ,  "物品名称" ,    "物品名称" ,   "物品名称" ,  "物品名称" };


          static HWND  frame4_Button1,frame4_LabelHwnd[12],frame4_radio1[3],frame4_Label,frame4_Label1,frame4_Label2,frame4_Label3,frame4_Label4,frame4_Label5,frame4_checkBox[8][4];
          static HWND frame4_list[8] ;
     static char* frame4_LabelText[] = { "头盔","衣服","首饰","武器","腰带","鞋子","勋章","服装"};
     

          static HWND  frame5_Button1, frame5_Button2, frame5_Button3,frame5_LabelHwnd[MAX_BESTITEM],frame5_ActionHwnd[MAX_BESTITEM],frame5_checkBox[MAX_BESTITEM][2];
          static char *frame5_LabelText[MAX_BESTITEM];
          static char *frame5_actText[MAX_BESTITEM];
         int item_page=0;
       static int pg=0;
     char *Number_list[]={"0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20"} ;
     static RECT  rect ;
     static int   cxChar, cyChar ;
     switch (message)
     {
     case WM_CREATE:
          cxChar = LOWORD (GetDialogBaseUnits ()) ;
          cyChar = HIWORD (GetDialogBaseUnits ()) ;

//获得userdate获得userdate
          get_basedate();

//frame5kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk


frame5_Button1 = CreateWindow(TEXT("button"),  TEXT("返回主面板"),
                                   WS_CHILD | BS_DEFPUSHBUTTON,
                                   4*xsize_frame/5-cxChar, 4*ysize_frame/5+cyChar,
                                   14 * cxChar, 7 * cyChar / 4,
                                   hwnd, (HMENU) frame5_Button1_ID,
                                   ((LPCREATESTRUCT) lParam)->hInstance, NULL) ;
  frame5_Button2 = CreateWindow ( TEXT("button"),  TEXT("返回"),
                                   WS_CHILD | BS_DEFPUSHBUTTON,
                                   16*cxChar, 4*ysize_frame/5+cyChar,
                                   6 * cxChar, 6 * cyChar / 4,
                                   hwnd, (HMENU) frame5_Button2_ID,
                                   ((LPCREATESTRUCT) lParam)->hInstance, NULL) ;
   frame5_Button3 = CreateWindow ( TEXT("button"),  TEXT("下页"),
                                   WS_CHILD | BS_DEFPUSHBUTTON,
                                   36*cxChar, 4*ysize_frame/ 5+cyChar,
                                   6 * cxChar, 6 * cyChar / 4,
                                   hwnd, (HMENU) frame5_Button3_ID,
                                   ((LPCREATESTRUCT) lParam)->hInstance, NULL) ;

   for(int i=0;i<MAX_BESTITEM;i++)
{
    char s[8]="不处理 ";
  frame5_actText[i]=s;
}

for(item_page=0;item_page<Max_page;item_page++)
{
for(int i=0;i<40;i++)
{

    char s[20]="物品名称      ";
          strncpy_s(s,20,"物品名称",8);
      char b[4];
      
        _itoa_s(i+item_page*40,b,4,10);
        strcat_s(s,20,b);

        frame5_LabelText[i+item_page*40]=s;
    if(i<20)
    {
frame5_LabelHwnd[i+item_page*40] = CreateWindow(TEXT ("static"), frame5_LabelText[i+item_page*40], WS_CHILD  | SS_LEFT,6*cxChar+ 2*cxChar,cyChar*(2+i), 12 * cxChar, 5 *cyChar / 4, hwnd, (HMENU) (i +item_page*40+frame5_Label_ID), ((LPCREATESTRUCT) lParam)->hInstance, NULL) ;

for(int k=0;k<2;k++)
{
        frame5_checkBox[i+item_page*40][k] = CreateWindow ( TEXT("button"),NULL,
                                   WS_CHILD | BS_AUTOCHECKBOX | BS_NOTIFY ,
                                 6*cxChar+  15*cxChar+3*cxChar*k,cyChar*(2+i),
                                    2 * cxChar, 5 *cyChar / 4,
                                 hwnd, (HMENU) ((1+k)*i+item_page*40+frame5_checkBox_ID),
                                   ((LPCREATESTRUCT) lParam)->hInstance, NULL) ;
}


frame5_ActionHwnd[i+item_page*40] = CreateWindow (TEXT ("static"),  frame5_actText[i+item_page*40], WS_CHILD  | SS_LEFT,6*cxChar+ 20*cxChar+2*cxChar,cyChar*(2+i), 6 * cxChar, 5 *cyChar / 4, hwnd, (HMENU) (i +item_page*40+frame5_Action_Label_ID ), ((LPCREATESTRUCT) lParam)->hInstance, NULL) ;
    }
    else
    {
        frame5_LabelHwnd[i+item_page*40] = CreateWindow (TEXT ("static"), frame5_LabelText[i+item_page*40], WS_CHILD  | SS_LEFT,12*cxChar+  26*cxChar+2*cxChar,cyChar*(2+(i-20)), 12 * cxChar, 5 *cyChar / 4, hwnd, (HMENU) (i +item_page*40+frame5_Label_ID), ((LPCREATESTRUCT) lParam)->hInstance, NULL) ;

    for(int k=0;k<2;k++)
    {
        frame5_checkBox[i+item_page*40][k] = CreateWindow ( TEXT("button"),NULL,
                                   WS_CHILD | BS_AUTOCHECKBOX | BS_NOTIFY ,
                                12*cxChar+  26*cxChar+ 15*cxChar+ 3*cxChar*k,cyChar*(2+(i-20)),
                                    2 * cxChar, 5 *cyChar / 4,
                                 hwnd, (HMENU) ((1+k)*i+item_page*40+frame5_checkBox_ID),
                                   ((LPCREATESTRUCT) lParam)->hInstance, NULL) ;
        }

frame5_ActionHwnd[i+item_page*40]  = CreateWindow (TEXT ("static"),  frame5_actText[i+item_page*40], WS_CHILD  | SS_LEFT, 12*cxChar+ 26*cxChar+20*cxChar+2*cxChar,cyChar*(2+(i-20)), 6 * cxChar, 5 *cyChar / 4, hwnd, (HMENU) (i+item_page*40+frame5_Action_Label_ID ), ((LPCREATESTRUCT) lParam)->hInstance, NULL) ;


    }   
}
}
        for(item_page=0;item_page<Max_page;item_page++)
        {
            for(int i=0;i<40;i++)
            {
                    if(item_page>0)
                    {
                  ShowWindow( frame5_LabelHwnd[i+item_page*40],SW_HIDE);
                  ShowWindow( frame5_ActionHwnd[i+item_page*40],SW_HIDE);
                  for(int k=0;k<2;k++)
                  {
                   ShowWindow(     frame5_checkBox[i+item_page*40][k],SW_HIDE);
                  }
                    }
            }
        }
        EnableWindow(frame5_Button2 ,false);
 //frame4kkkkkkkkkkkkkhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
frame4_Button1 = CreateWindow ( TEXT("button"),  TEXT("回城物品处理"),
                                   WS_CHILD | BS_DEFPUSHBUTTON,
                                   4*xsize_frame/5-cxChar, 4*ysize_frame/5+cyChar,
                                   14 * cxChar, 7 * cyChar / 4,
                                   hwnd, (HMENU) frame4_Button1_ID,
                                   ((LPCREATESTRUCT) lParam)->hInstance, NULL) ;

for(int i=0;i<8;i++)
{
   
frame4_LabelHwnd[i] = CreateWindow (TEXT ("static"), frame4_LabelText[i], WS_CHILD | SS_LEFT,10*cxChar+ 2*cxChar,cyChar*(3+2*i), 8 * cxChar, 5 *cyChar / 4, hwnd, (HMENU) (i +frame4_Labelhwnd_ID), ((LPCREATESTRUCT) lParam)->hInstance, NULL) ;
frame4_list[i] = CreateWindow (TEXT ("listbox"), NULL,
            WS_CHILD  | LBS_NOTIFY | LBS_STANDARD | WS_BORDER,
                             10*cxChar+12*cxChar,cyChar*(3+2*i),
                               6 * cxChar, 6 *cyChar / 4,
                              hwnd, (HMENU) (i+frame4_list_ID),
                              (HINSTANCE) GetWindowLong (hwnd, GWL_HINSTANCE),
                              NULL) ;

//char *fram4_修理Text[]={"特修","普修","冰泉修"};

        for(int k=0;k<4;k++)
        {
                frame4_checkBox[i][k] = CreateWindow ( TEXT("button"),NULL,
                                           WS_CHILD | BS_AUTOCHECKBOX | BS_NOTIFY ,
                                    24*cxChar+12*cxChar+ 8*cxChar*k,cyChar*(3+2*i),
                                            2 * cxChar, 5 *cyChar / 4,
                                         hwnd, (HMENU) (4*i+k+frame4_checkBox_ID),
                                           ((LPCREATESTRUCT) lParam)->hInstance, NULL) ;
        }
}

frame4_Label = CreateWindow (TEXT ("static"), "持久", WS_CHILD | SS_LEFT,10*cxChar+12*cxChar,cyChar,4 * cxChar, 6 *cyChar / 4, hwnd, (HMENU) (frame4_Label_ID), ((LPCREATESTRUCT) lParam)->hInstance, NULL) ;
frame4_Label1 = CreateWindow (TEXT ("static"), "特修", WS_CHILD | SS_LEFT,22*cxChar+12*cxChar,cyChar, 4 * cxChar, 6 *cyChar / 4, hwnd, (HMENU) (frame4_Label_ID+1), ((LPCREATESTRUCT) lParam)->hInstance, NULL) ;
frame4_Label2 = CreateWindow (TEXT ("static"), "普修", WS_CHILD | SS_LEFT,32*cxChar+12*cxChar,cyChar, 4 * cxChar, 6 *cyChar / 4, hwnd, (HMENU) (frame4_Label_ID+2), ((LPCREATESTRUCT) lParam)->hInstance, NULL) ;
frame4_Label3 = CreateWindow (TEXT ("static"), "冰泉修", WS_CHILD | SS_LEFT,38*cxChar+12*cxChar,cyChar,6 * cxChar, 6 *cyChar / 4, hwnd, (HMENU) (frame4_Label_ID+3), ((LPCREATESTRUCT) lParam)->hInstance, NULL) ;
frame4_Label4 = CreateWindow (TEXT ("static"), "不修", WS_CHILD | SS_LEFT,46*cxChar+12*cxChar,cyChar, 4 * cxChar, 6 *cyChar / 4, hwnd, (HMENU) (frame4_Label_ID+4), ((LPCREATESTRUCT) lParam)->hInstance, NULL) ;
frame4_Label5 = CreateWindow (TEXT ("static"), "低于此值即修理", WS_CHILD | SS_LEFT,6*cxChar+12*cxChar,19*cyChar,15 * cxChar, 6 *cyChar / 4, hwnd, (HMENU) (frame4_Label_ID+5), ((LPCREATESTRUCT) lParam)->hInstance, NULL) ;

    for(int i=0;i<8;i++)
    {
        
        for(int k=0;k<15;k++)
        {
     SendMessage (frame4_list[i], LB_INSERTSTRING, k, (LPARAM) Number_list[k]) ;
        }
    }

     SendMessage (frame4_list[0], LB_SETCURSEL, user_date.repair_toukui,0);
      SendMessage (frame4_list[1], LB_SETCURSEL, user_date.repair_cloth,0);
       SendMessage (frame4_list[2], LB_SETCURSEL, user_date.repair_diamond,0);
        SendMessage (frame4_list[3], LB_SETCURSEL, user_date.repair_weapen,0);
         SendMessage (frame4_list[4], LB_SETCURSEL, user_date.repair_yaodai,0);
          SendMessage (frame4_list[5], LB_SETCURSEL, user_date.repair_xiezi,0);
           SendMessage (frame4_list[6], LB_SETCURSEL, user_date.repair_xunzhang,0);
            SendMessage (frame4_list[7], LB_SETCURSEL, user_date.repair_dunpai,0);

 SendMessage (frame4_checkBox[0][user_date.repair_mod0 ], BM_SETCHECK, 1,0);
 SendMessage (frame4_checkBox[1][user_date.repair_mod1 ], BM_SETCHECK, 1,0);
 SendMessage (frame4_checkBox[2][user_date.repair_mod2 ], BM_SETCHECK, 1,0);
 SendMessage (frame4_checkBox[3][user_date.repair_mod3 ], BM_SETCHECK, 1,0);
 SendMessage (frame4_checkBox[4][user_date.repair_mod4 ], BM_SETCHECK, 1,0);
 SendMessage (frame4_checkBox[5][user_date.repair_mod5 ], BM_SETCHECK, 1,0);
 SendMessage (frame4_checkBox[6][user_date.repair_mod6 ], BM_SETCHECK, 1,0);
 SendMessage (frame4_checkBox[7][user_date.repair_mod7 ], BM_SETCHECK, 1,0);
         
//frame3kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
frame3_Button1 = CreateWindow ( TEXT("button"),  TEXT("修理装备"),
                                   WS_CHILD | BS_DEFPUSHBUTTON,
                                   4*xsize_frame/5-cxChar, 4*ysize_frame/5+cyChar,
                                   14 * cxChar, 7 * cyChar / 4,
                                   hwnd, (HMENU) frame3_Button1_ID,
                                   ((LPCREATESTRUCT) lParam)->hInstance, NULL) ;


for(int i=0;i<20;i++)
{
    if(i<7)
    {
frame3_LabelHwnd[i] = CreateWindow (TEXT ("static"), frame3_LabelText[i], WS_CHILD  , 2*cxChar,cyChar*(3+2*i), 8 * cxChar, 5 *cyChar / 4, hwnd, (HMENU) (i +frame3_Label_ID), ((LPCREATESTRUCT) lParam)->hInstance, NULL) ;

frame3_Combo[i] = CreateWindow (TEXT ("combobox"), NULL,
        WS_CHILD |CBS_DROPDOWNLIST,
                             cxChar+10*cxChar,cyChar*(3+2*i),
                               16 * cxChar,8 *cyChar,
                              hwnd, (HMENU) (i+frame3_Combo_ID),
                              (HINSTANCE) GetWindowLong (hwnd, GWL_HINSTANCE),
                              NULL) ;
frame3_list[i] = CreateWindow (TEXT ("listbox"), NULL,
        WS_CHILD  | LBS_NOTIFY | LBS_STANDARD | WS_BORDER,
                             2*cxChar+cxChar+26*cxChar, cyChar*(3+2*i),
                               6 * cxChar, 5 *cyChar / 4,
                              hwnd, (HMENU) (i+frame3_list_ID),
                              (HINSTANCE) GetWindowLong (hwnd, GWL_HINSTANCE),
                              NULL) ;
    }
    else if(i<14 && i>=7)
    {
frame3_Combo[i] = CreateWindow (TEXT ("combobox"), NULL,
        WS_CHILD  |CBS_DROPDOWNLIST,
                             cxChar+36*cxChar-4*cxChar+10*cxChar,cyChar*(3+2*(i-7)),
                               16 * cxChar, 8 *cyChar,
                              hwnd, (HMENU) (i+frame3_Combo_ID),
                              (HINSTANCE) GetWindowLong (hwnd, GWL_HINSTANCE),
                              NULL) ;
frame3_list[i] = CreateWindow (TEXT ("listbox"), NULL,
        WS_CHILD  | LBS_NOTIFY | LBS_STANDARD | WS_BORDER,
                            2*cxChar+ cxChar+36*cxChar-4*cxChar+26*cxChar, cyChar*(3+2*(i-7)),
                               6 * cxChar, 5 *cyChar / 4,
                              hwnd, (HMENU) (i+frame3_list_ID),
                              (HINSTANCE) GetWindowLong (hwnd, GWL_HINSTANCE),
                              NULL) ;   

    }
    else if(i>=14 && i<17)
    {
frame3_list[i] = CreateWindow (TEXT ("listbox"), NULL,
        WS_CHILD  | LBS_NOTIFY | LBS_STANDARD | WS_BORDER,
                             12*cxChar, cyChar*(3+2*(i-7)),
                               6 * cxChar, 5 *cyChar / 4,
                              hwnd, (HMENU) (i+frame3_list_ID),
                              (HINSTANCE) GetWindowLong (hwnd, GWL_HINSTANCE),
                              NULL) ;

    }
    else if(i>=17 && i<20)
    {
frame3_list[i] = CreateWindow (TEXT ("listbox"), NULL,
        WS_CHILD  | LBS_NOTIFY | LBS_STANDARD | WS_BORDER,
                             22*cxChar+12*cxChar, cyChar*(3+2*(i-10)),
                               6 * cxChar, 5 *cyChar / 4,
                              hwnd, (HMENU) (i+frame3_list_ID),
                              (HINSTANCE) GetWindowLong (hwnd, GWL_HINSTANCE),
                              NULL) ;   
    }
}

for(int i=7;i<13;i++)
{
    if(i<10)
    {
frame3_LabelHwnd[i] = CreateWindow (TEXT ("static"), frame3_LabelText[i], WS_CHILD  | SS_LEFT, 2*cxChar,cyChar*(3+2*(i)), 10 * cxChar, 5 *cyChar / 4, hwnd, (HMENU) (i +frame3_Label_ID), ((LPCREATESTRUCT) lParam)->hInstance, NULL) ;
    }
    else
    {
frame3_LabelHwnd[i] = CreateWindow (TEXT ("static"), frame3_LabelText[i], WS_CHILD  | SS_LEFT, 22*cxChar+2*cxChar,cyChar*(3+2*(i-3)), 8 * cxChar, 5 *cyChar / 4, hwnd, (HMENU) (i +frame3_Label_ID), ((LPCREATESTRUCT) lParam)->hInstance, NULL) ;

    }
}
frame3_LabelHwnd[13] = CreateWindow (TEXT ("static"), "主体补充", WS_CHILD  | SS_LEFT, 12*cxChar,cyChar, 10 * cxChar, 6 *cyChar / 4, hwnd, (HMENU) (13 +frame3_Label_ID), ((LPCREATESTRUCT) lParam)->hInstance, NULL) ;
frame3_LabelHwnd[14] = CreateWindow (TEXT ("static"), "分身补充", WS_CHILD  | SS_LEFT, 46*cxChar,cyChar, 10 * cxChar, 6 *cyChar / 4, hwnd, (HMENU) (14 +frame3_Label_ID), ((LPCREATESTRUCT) lParam)->hInstance, NULL) ;
        
    for(int i=0;i<20;i++)
    {
        for(int k=0;k<20;k++)
        {
     SendMessage (frame3_list[i], LB_INSERTSTRING, k, (LPARAM) Number_list[k]) ;
            /*SendMessage (frame3_list[i], LB_SETCURSEL, user_date.suply_item_numb0, 0 );*/
        }
    }
         SendMessage (frame3_list[0], LB_SETCURSEL, user_date.suply_item_numb0,0);
     SendMessage (frame3_list[1], LB_SETCURSEL, user_date.suply_item_numb1,0);
     SendMessage (frame3_list[2], LB_SETCURSEL, user_date.suply_item_numb2,0);
     SendMessage (frame3_list[3], LB_SETCURSEL, user_date.suply_item_numb3,0);
     SendMessage (frame3_list[4], LB_SETCURSEL, user_date.suply_item_numb4,0);
     SendMessage (frame3_list[5], LB_SETCURSEL, user_date.suply_item_numb5,0);
     SendMessage (frame3_list[6], LB_SETCURSEL, user_date.suply_item_numb6,0);
     SendMessage (frame3_list[7], LB_SETCURSEL, user_date.suply_item_numb7,0);
     SendMessage (frame3_list[8], LB_SETCURSEL, user_date.suply_item_numb8,0);
     SendMessage (frame3_list[9], LB_SETCURSEL, user_date.suply_item_numb9,0);
     SendMessage (frame3_list[10], LB_SETCURSEL, user_date.suply_item_numb10,0);
     SendMessage (frame3_list[11], LB_SETCURSEL, user_date.suply_item_numb11,0);
     SendMessage (frame3_list[12], LB_SETCURSEL, user_date.suply_item_numb12,0);
     SendMessage (frame3_list[13], LB_SETCURSEL, user_date.suply_item_numb13,0);
     SendMessage (frame3_list[14], LB_SETCURSEL, user_date.suply_item_numb14,0);
     SendMessage (frame3_list[15], LB_SETCURSEL, user_date.suply_item_numb15,0);
     SendMessage (frame3_list[16], LB_SETCURSEL, user_date.suply_item_numb16,0);
     SendMessage (frame3_list[17], LB_SETCURSEL, user_date.suply_item_numb17,0);
     SendMessage (frame3_list[18], LB_SETCURSEL, user_date.suply_item_numb18,0);
     SendMessage (frame3_list[19], LB_SETCURSEL, user_date.suply_item_numb19,0);
    {
                char *frame3_combo_list0[]={"特级金创药包","超级金创药包","金创药中包"};
                for (int i=0;i<3;i++)
                {
                SendMessage (frame3_Combo[0], CB_INSERTSTRING, i, (LPARAM) frame3_combo_list0[i]) ;
                        if(strcmp(user_date.suply_item_string0 , frame3_combo_list0[i])==0)
                            SendMessage (frame3_Combo[0], CB_SETCURSEL, i, 0 );
                SendMessage (frame3_Combo[7], CB_INSERTSTRING, i, (LPARAM) frame3_combo_list0[i]) ;
                        if(strcmp(user_date.suply_item_string7 , frame3_combo_list0[i])==0)
                            SendMessage (frame3_Combo[7], CB_SETCURSEL, i, 0 );
                }

                char *frame3_combo_list1[]={"特级魔法药包","超级魔法药包","魔法药中包"};
                for (int i=0;i<3;i++)
                {
                SendMessage (frame3_Combo[1], CB_INSERTSTRING, i, (LPARAM) frame3_combo_list1[i]) ;
                        if(strcmp(user_date.suply_item_string1 , frame3_combo_list1[i])==0)
                            SendMessage (frame3_Combo[1], CB_SETCURSEL, i, 0 );
                SendMessage (frame3_Combo[8], CB_INSERTSTRING, i, (LPARAM) frame3_combo_list1[i]) ;
                        if(strcmp(user_date.suply_item_string8 , frame3_combo_list1[i])==0)
                            SendMessage (frame3_Combo[8], CB_SETCURSEL, i, 0 );
                }

                char *frame3_combo_list2[]={"道符","道符(大)"};
                for (int i=0;i<2;i++)
                {
                SendMessage (frame3_Combo[2], CB_INSERTSTRING, i, (LPARAM) frame3_combo_list2[i]) ;
                        if(strcmp(user_date.suply_item_string2 , frame3_combo_list2[i])==0)
                            SendMessage (frame3_Combo[2], CB_SETCURSEL, i, 0 );
                SendMessage (frame3_Combo[9], CB_INSERTSTRING, i, (LPARAM) frame3_combo_list2[i]) ;
                                        if(strcmp(user_date.suply_item_string9 , frame3_combo_list2[i])==0)
                            SendMessage (frame3_Combo[9], CB_SETCURSEL, i, 0 );
                }

                char *frame3_combo_list3[]={"红色毒药(大)","红色毒药(中)"};
                for (int i=0;i<2;i++)
                {
                SendMessage (frame3_Combo[3], CB_INSERTSTRING, i, (LPARAM)frame3_combo_list3[i]) ;
                                        if(strcmp(user_date.suply_item_string3 , frame3_combo_list3[i])==0)
                            SendMessage (frame3_Combo[3], CB_SETCURSEL, i, 0 );
                SendMessage (frame3_Combo[10], CB_INSERTSTRING, i, (LPARAM) frame3_combo_list3[i]) ;
                                        if(strcmp(user_date.suply_item_string10 , frame3_combo_list3[i])==0)
                            SendMessage (frame3_Combo[10], CB_SETCURSEL, i, 0 );
                }

                char *frame3_combo_list4[]={"绿色毒药(大)","绿色毒药(中)"};
                for (int i=0;i<2;i++)
                {
                SendMessage (frame3_Combo[4], CB_INSERTSTRING, i, (LPARAM) frame3_combo_list4[i]) ;
                                        if(strcmp(user_date.suply_item_string4 , frame3_combo_list4[i])==0)
                            SendMessage (frame3_Combo[4], CB_SETCURSEL, i, 0 );
                SendMessage (frame3_Combo[11], CB_INSERTSTRING, i, (LPARAM) frame3_combo_list4[i]) ;
                                        if(strcmp(user_date.suply_item_string11 , frame3_combo_list4[i])==0)
                            SendMessage (frame3_Combo[11], CB_SETCURSEL, i, 0 );
                    }

                char *frame3_combo_list5[]={"雄人偶(大)","雄人偶(中)"};
                for (int i=0;i<2;i++)
                {
                SendMessage (frame3_Combo[5], CB_INSERTSTRING, i, (LPARAM) frame3_combo_list5[i]) ;
                                        if(strcmp(user_date.suply_item_string5 , frame3_combo_list5[i])==0)
                            SendMessage (frame3_Combo[5], CB_SETCURSEL, i, 0 );
                SendMessage (frame3_Combo[12], CB_INSERTSTRING, i, (LPARAM) frame3_combo_list5[i]) ;
                                        if(strcmp(user_date.suply_item_string12 , frame3_combo_list5[i])==0)
                            SendMessage (frame3_Combo[12], CB_SETCURSEL, i, 0 );
                    }
                    char *frame3_combo_list6[]={"雌人偶(大)","雌人偶(中)"};
                for (int i=0;i<2;i++)
                {
                SendMessage (frame3_Combo[6], CB_INSERTSTRING, i, (LPARAM) frame3_combo_list6[i]) ;
                                        if(strcmp(user_date.suply_item_string6 , frame3_combo_list6[i])==0)
                            SendMessage (frame3_Combo[6], CB_SETCURSEL, i, 0 );
                SendMessage (frame3_Combo[13], CB_INSERTSTRING, i, (LPARAM) frame3_combo_list6[i]) ;
                                        if(strcmp(user_date.suply_item_string13 , frame3_combo_list6[i])==0)
                            SendMessage (frame3_Combo[13], CB_SETCURSEL, i, 0 );
                    }
    }
//hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
 frame2_Button1 = CreateWindow ( TEXT("button"),  TEXT("回城补充物品"),
                                   WS_CHILD | BS_PUSHBUTTON,
                                   4*xsize_frame/5-cxChar, 4*ysize_frame/5+cyChar,
                                   14 * cxChar, 7 * cyChar / 4,
                                   hwnd, (HMENU) frame2_Button1_ID,
                                   ((LPCREATESTRUCT) lParam)->hInstance, NULL) ;

for(int i=0;i<26;i++)
{
   
 if(i<6)
    {frame2_LabelHwnd[i] = CreateWindow (TEXT ("static"), frame2_LabelText[i], WS_CHILD | SS_LEFT,4*cxChar+ 2*cxChar, cyChar*(2+2*i), 10 * cxChar, 5 *cyChar / 4, hwnd, (HMENU) (i +frame2_Label_ID), ((LPCREATESTRUCT) lParam)->hInstance, NULL) ;

         frame2_Combo[i] = CreateWindow (TEXT ("combobox"), NULL,
        WS_CHILD |CBS_DROPDOWNLIST,
                              4*cxChar+12*cxChar, cyChar*(2+2*i),
                               10 * cxChar, 24 *cyChar,
                              hwnd, (HMENU) (i+frame2_Combo_ID),
                              ((LPCREATESTRUCT) lParam)->hInstance,
                              NULL) ;
    }
    else if(i>=6 && i<12)
    {
        frame2_LabelHwnd[i] = CreateWindow (TEXT ("static"), frame2_LabelText[i], WS_CHILD | SS_LEFT,4*cxChar+ 24*cxChar, cyChar*(2+2*(i-6)), 10 * cxChar, 5 *cyChar / 4, hwnd, (HMENU) (i +frame2_Label_ID), ((LPCREATESTRUCT) lParam)->hInstance, NULL) ;
    frame2_Combo[i] = CreateWindow (TEXT ("combobox"), NULL,
        WS_CHILD | CBS_DROPDOWNLIST,
                              4*cxChar+34*cxChar, cyChar*(2+2*(i-6)),
                               10 * cxChar,24 *cyChar,
                              hwnd, (HMENU) (i+frame2_Combo_ID),
                              ((LPCREATESTRUCT) lParam)->hInstance,
                              NULL) ;
    }
    else if(i>=12 && i<18)
    {
    frame2_LabelHwnd[i] = CreateWindow (TEXT ("static"), frame2_LabelText[i], WS_CHILD | SS_LEFT,4*cxChar+ 46*cxChar,  cyChar*(2+2*(i-12)), 10 * cxChar, 5 *cyChar / 4, hwnd, (HMENU) (i +frame2_Label_ID), ((LPCREATESTRUCT) lParam)->hInstance, NULL) ;

2010-10-21 00:04
快速回复:C语言开发高手进(自由身)
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.019795 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved