亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? babygrid.cpp

?? 一個(gè)功能強(qiáng)大的代碼編輯器源代碼
?? CPP
?? 第 1 頁 / 共 5 頁
字號(hào):
     while(p)
         {
          GetTextExtentPoint32(hdc,p,strlen(p),size);
          if(size->cx > longest)
              {
               longest=size->cx;
              }
          p=strtok('\0',"\n");
         }

     //MessageBox(NULL,text,"FindLongestLine",MB_OK);
     return longest;
    }


LRESULT CALLBACK GridProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
	int wmId, wmEvent;
	PAINTSTRUCT ps;
	HDC hdc;
	char buffer[1000];
	int SelfIndex;
	int ReturnValue;
    UINT SelfMenu;
	HINSTANCE hInst;
    int iDataType;
    static int ASCII;
    

	SelfIndex=FindGrid((UINT)GetMenu(hWnd));
    SelfMenu=BGHS[SelfIndex].gridmenu;

	//update the grid width and height variable
	{
	 RECT rect;
	 
	 GetClientRect(hWnd,&rect);
	 BGHS[SelfIndex].gridwidth = rect.right - rect.left;
	 BGHS[SelfIndex].gridheight = rect.bottom - rect.top;

	}

	ReturnValue = 0;

	switch (message) 
	{
		case WM_COMMAND:
			wmId    = LOWORD(wParam); 
			wmEvent = HIWORD(wParam); 
			// Parse the menu selections:
			switch (wmId)
			{
                case 1:
				default:
				   return DefWindowProc(hWnd, message, wParam, lParam);
			}
			break;

		case WM_PAINT:
			hdc = BeginPaint(hWnd, &ps);
			RECT rt;
			GetClientRect(hWnd, &rt);
			CalcVisibleCellBoundaries(SelfIndex);
            //display title
            DisplayTitle(hWnd,SelfIndex,BGHS[SelfIndex].htitlefont);
			//display column 0;

			DisplayColumn(hWnd,SelfIndex,0,0,BGHS[SelfIndex].hfont,BGHS[SelfIndex].hcolumnheadingfont);
			    {
			     int c,j,k,offset;
			     offset = BGHS[SelfIndex].columnwidths[0];
			     j=BGHS[SelfIndex].leftvisiblecol;
			     k=BGHS[SelfIndex].rightvisiblecol;
			     for(c=j;c<=k;c++)
			         {
			          DisplayColumn(hWnd,SelfIndex,c,offset,BGHS[SelfIndex].hfont,BGHS[SelfIndex].hcolumnheadingfont);
			          offset+=BGHS[SelfIndex].columnwidths[c];
			         }
			 
			    }
			EndPaint(hWnd, &ps);
			//
			if(GetFocus()==hWnd)
				{
			      PostMessage(hWnd,BGM_DRAWCURSOR,(UINT)SelfIndex,0);
				}


			break;


        case BGM_PAINTGRID:
            {
             RECT rect;
             GetClientRect(hWnd, &rect);
             InvalidateRect(hWnd,&rect,TRUE);
             UpdateWindow(hWnd);
             MessageBeep(0);
            }
            break;
        case WM_SETTEXT: 
            { 
              int j,linecount;
              SIZE size;
              HDC gdc;
              HFONT holdfont;
              if(strlen((char*)lParam)>300)
                  {
                   strcpy(BGHS[SelfIndex].title,"Title too long (300 chars max)");
                  }
              else
                  {
                    strcpy(BGHS[SelfIndex].title,(char*)lParam);
                  }
             
             gdc=GetDC(hWnd);
             //get linecount of title;
             if(strlen(BGHS[SelfIndex].title) > 0)
                 {
                  linecount=1;
                  for(j=0;j<(int)strlen(BGHS[SelfIndex].title);j++)     
                      {
                       if(BGHS[SelfIndex].title[j]=='\n')
                           {
                            linecount++;
                           }

                      }
                  holdfont=(HFONT)SelectObject(gdc,BGHS[SelfIndex].htitlefont);
                  GetTextExtentPoint32(gdc,BGHS[SelfIndex].title,strlen(BGHS[SelfIndex].title),&size);
                  SelectObject(gdc,holdfont);
                  BGHS[SelfIndex].titleheight = (int)((size.cy*1.2) * linecount);
                 }
             else
                 {
                  //no title
                  BGHS[SelfIndex].titleheight = 0;
                 }
              ReleaseDC(hWnd,gdc);

              
			  RefreshGrid(hWnd);
              SizeGrid(hWnd,SelfIndex);
              
            }
            break;
        case BGM_GETROWS:
              ReturnValue = BGHS[SelfIndex].rows;
            break;

        case BGM_GETCOLS:
              ReturnValue = BGHS[SelfIndex].cols;
            break;

        case BGM_GETCOLWIDTH:
              ReturnValue = BGHS[SelfIndex].columnwidths[wParam];
            break;

        case BGM_GETROWHEIGHT:
               ReturnValue = BGHS[SelfIndex].rowheight;
            break;

        case BGM_GETHEADERROWHEIGHT:
               ReturnValue = BGHS[SelfIndex].headerrowheight;
            break;

        case BGM_GETOWNERDRAWITEM:
              ReturnValue = BGHS[SelfIndex].ownerdrawitem;
            break;

		case BGM_DRAWCURSOR:
			  DrawCursor(hWnd,wParam);
			break;
        case BGM_SETCURSORPOS:
               DrawCursor(hWnd,SelfIndex);
               if((((int)wParam <= BGHS[SelfIndex].rows)&&((int)wParam > 0))&&
                   (((int)lParam <= BGHS[SelfIndex].cols)&&((int)lParam > 0)))
                   {
                     BGHS[SelfIndex].cursorrow=wParam;
                     BGHS[SelfIndex].cursorcol=lParam;
                   }
               else
                   {
                    DrawCursor(hWnd,SelfIndex);
                    break;
                   }
               SetHomeRow(hWnd,SelfIndex,BGHS[SelfIndex].cursorrow,BGHS[SelfIndex].cursorcol);
               SetHomeCol(hWnd,SelfIndex,BGHS[SelfIndex].cursorrow,BGHS[SelfIndex].cursorcol);
               DrawCursor(hWnd,SelfIndex);
               RefreshGrid(hWnd);

            break;
		case BGM_SHOWHILIGHT:
			   BGHS[SelfIndex].DRAWHIGHLIGHT = (BOOL)wParam;
               RefreshGrid(hWnd);
			break;
        case BGM_EXTENDLASTCOLUMN:
               BGHS[SelfIndex].EXTENDLASTCOLUMN = (BOOL)wParam;
               RefreshGrid(hWnd);
            break;

        case BGM_SHOWINTEGRALROWS:
               BGHS[SelfIndex].SHOWINTEGRALROWS = (BOOL)wParam;
               SizeGrid(hWnd,SelfIndex);
               RefreshGrid(hWnd);
            break;

        case BGM_SETCOLAUTOWIDTH:
               BGHS[SelfIndex].COLAUTOWIDTH = (BOOL)wParam;
            break;

        case BGM_SETALLOWCOLRESIZE:
               BGHS[SelfIndex].ALLOWCOLUMNRESIZING = (BOOL)wParam;
            break;

		case BGM_PROTECTCELL:
              LPBGcell=(_BGCELL*)wParam;
              if(OutOfRange(LPBGcell))
                  {
                   wParam=MAKEWPARAM((UINT)GetMenu(hWnd),BGN_OUTOFRANGE);
                   lParam = 0;
                   SendMessage(GetParent(hWnd),WM_COMMAND,wParam,lParam);
				   ReturnValue = -1;
                   break;
                  }
              wsprintf(buffer,"%05d-%03d",LPBGcell->row,LPBGcell->col);
              //see if that cell is already loaded
              FindResult = BinarySearchListBox(BGHS[SelfIndex].hlist1,buffer);
              if(FindResult != LB_ERR)
                  {
                   //it was found, get the text, modify text delete it from list, add modified to list
				   SendMessage(BGHS[SelfIndex].hlist1,LB_GETTEXT,FindResult,(LPARAM)buffer);
				   if((BOOL)lParam)
				   {
					buffer[10] = 'P';
				   }
				   else
				   {
					buffer[10] = 'U';
				   }
                   SendMessage(BGHS[SelfIndex].hlist1,LB_DELETESTRING,FindResult,0);
				   SendMessage(BGHS[SelfIndex].hlist1,LB_ADDSTRING,FindResult,(LPARAM)buffer);
                  }
			  else
			  {
			   //protecting or unprotecting a cell that isn't in the list
			   //add it as blank;
				  strcat(buffer,"|");
				  if((BOOL)lParam)
				  {
				   strcat(buffer,"PA");
				  }
				  else
				  {
				   strcat(buffer,"UA");
				  }
				  strcat(buffer,"|");
				  SendMessage(BGHS[SelfIndex].hlist1,LB_ADDSTRING,FindResult,(LPARAM)buffer);
			  }

			break;
		case BGM_NOTIFYROWCHANGED:
			   NotifyRowChanged(hWnd,SelfIndex);
			break;
		case BGM_NOTIFYCOLCHANGED:
			   NotifyColChanged(hWnd,SelfIndex);
			break;
		case BGM_SETPROTECT:
			  if((BOOL)wParam)
                  {
			       strcpy(BGHS[SelfIndex].protect,"P");
			      }
			      else      
                  {                
			       strcpy(BGHS[SelfIndex].protect,"U");
			      }
			break;

		case BGM_AUTOROW:
			  if((BOOL)wParam)
			  {
			   BGHS[SelfIndex].AUTOROW = TRUE;
			  }
			  else
			  {
			   BGHS[SelfIndex].AUTOROW = FALSE;
			  }
			break;
        case BGM_SETEDITABLE:
               if((BOOL)wParam)
                   {
                    BGHS[SelfIndex].EDITABLE = TRUE;
                   }
               else
                   {
                    BGHS[SelfIndex].EDITABLE = FALSE;
                   }
            break;

        case BGM_SETCELLDATA:
              LPBGcell=(_BGCELL*)wParam;
              if(OutOfRange(LPBGcell))
                  {
                   wParam=MAKEWPARAM((UINT)GetMenu(hWnd),BGN_OUTOFRANGE);
                   lParam = 0;
                   SendMessage(GetParent(hWnd),WM_COMMAND,wParam,lParam);
				   ReturnValue = -1;
                   break;
                  }
              wsprintf(buffer,"%05d-%03d",LPBGcell->row,LPBGcell->col);
              //see if that cell is already loaded
              FindResult = BinarySearchListBox(BGHS[SelfIndex].hlist1,buffer);
              if(FindResult != LB_ERR)
                  {
                   //it was found, delete it
                   SendMessage(BGHS[SelfIndex].hlist1,LB_DELETESTRING,FindResult,0);
                  }
              //now add it
			  strcat(buffer,"|");
			  strcat(buffer,BGHS[SelfIndex].protect);
              //determine data type (text,numeric, or boolean)(1,2,3)
              //iDataType=DetermineDataType((char*)lParam);

			  iDataType = 1;
              if(iDataType==1){strcat(buffer,"A");}
              if(iDataType==2){strcat(buffer,"N");}
              if(iDataType==3){strcat(buffer,"T");}
              if(iDataType==4){strcat(buffer,"F");}
			  if(iDataType==5){strcat(buffer,"G");}

			  strcat(buffer,"|");
              strcat(buffer,(char*)lParam);
              FindResult=SendMessage(BGHS[SelfIndex].hlist1,LB_ADDSTRING,0,(LPARAM)buffer);
              
              if(FindResult==LB_ERR)
                  {
                   MessageBeep(0);
                  }
                  {
                   RECT rect;
                   rect=GetCellRect(hWnd,SelfIndex,LPBGcell->row,LPBGcell->col);
                   InvalidateRect(hWnd,&rect,FALSE);
                  }
              //get the last line and adjust grid dimmensions
                  if(BGHS[SelfIndex].AUTOROW)
                  {
                   int j;
                    j=SendMessage(BGHS[SelfIndex].hlist1,LB_GETCOUNT,0,0);
                    if(j>0)
                        {
                         SendMessage(BGHS[SelfIndex].hlist1,LB_GETTEXT,j-1,(LPARAM)buffer);
                         buffer[5]=0x00;
                         j=atoi(buffer);
                         if(j>SendMessage(hWnd,BGM_GETROWS,0,0))
                             {
                              SendMessage(hWnd,BGM_SETGRIDDIM,j,BGHS[SelfIndex].cols);
                             }
                        }
                    else
                        {
                         //no items in the list
                        SendMessage(hWnd,BGM_SETGRIDDIM,j,BGHS[SelfIndex].cols);
                        }
                  }

                  //adjust the column width if COLAUTOWIDTH==TRUE
                  if((BGHS[SelfIndex].COLAUTOWIDTH)||(LPBGcell->row == 0))
                      {
                       HDC hdc;
                       SIZE size;
                       int required_width;
                       int current_width;
                       int required_height = 30;
                       int current_height;
                       int longestline;
                       HFONT holdfont;
                       hdc=GetDC(hWnd);
                       if(LPBGcell->row == 0)
                           {
                             holdfont=(HFONT)SelectObject(hdc,BGHS[SelfIndex].hcolumnheadingfont);
                           }
                           else
                           {
                             holdfont=(HFONT)SelectObject(hdc,BGHS[SelfIndex].hfont);
                           }
                       //if there are \n codes in the string, find the longest line
                       longestline=FindLongestLine(hdc,(char*)lParam,&size);
                       //GetTextExtentPoint32(hdc,(char*)lParam,strlen((char*)lParam),&size);
                       required_width = longestline+15;
                       required_height = size.cy;
                       //count lines
                           {
                               int count=1;
                               char tbuffer[255];
                               strcpy(tbuffer,(char*)lParam);
                               for(int j=0;j<(int)strlen(tbuffer);j++)
                                   {
                                   if(tbuffer[j]=='\n'){count++;}
                                   }
                               if((!BGHS[SelfIndex].ELLIPSIS)||(LPBGcell->row == 0))
                                   {
                                    required_height *= count;
                                   }
                               required_height +=5;
                           }
                       SelectObject(hdc,holdfont);
                       ReleaseDC(hWnd,hdc);
                       current_width = BGHS[SelfIndex].columnwidths[LPBGcell->col];
                       if(LPBGcell->row == 0)
                           {
                            current_height = BGHS[SelfIndex].headerrowheight;
                            if(required_height > current_height)
                                {
                                 SendMessage(hWnd,BGM_SETHEADERROWHEIGHT,required_height,0);
                                }
                           }
                       else
                           {
                            current_height = BGHS[SelfIndex].rowheight;
                            if(required_height > current_height)
							{
                                 SendMessage(hWnd, BGM_SETROWHEIGHT, /*required_height*/20, 0);
                            }

                           }
                       if(required_width > current_width)
                           {
                            SendMessage(hWnd,BGM_SETCOLWIDTH,LPBGcell->col,required_width);
                           }
                       ReleaseDC(hWnd,hdc);
                      }

            break;

        case BGM_GETCELLDATA:
              LPBGcell=(_BGCELL*)wParam;
              if(OutOfRange(LPBGcell))
                  {
                   wParam=MAKEWPARAM((UINT)GetMenu(hWnd),BGN_OUTOFRANGE);
                   lParam = 0;
                   SendMessage(GetParent(hWnd),WM_COMMAND,wParam,lParam);
				   ReturnValue = -1;
                   break;
                  }
              wsprintf(buffer,"%05d-%03d",LPBGcell->row,LPBGcell->col);
              //see if that cell is already loaded
              FindResult = BinarySearchListBox(BGHS[SelfIndex].hlist1,buffer);
              if(FindResult != LB_ERR)
                  {
                   int j,k,c;
                   char tbuffer[1000];
                   //it was found, get it
                   SendMessage(BGHS[SelfIndex].hlist1,LB_GETTEXT,FindResult,(long)lParam);
                   strcpy(tbuffer,(char*)lParam);

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美午夜精品久久久久久超碰 | 91行情网站电视在线观看高清版| 久久av老司机精品网站导航| 香蕉久久一区二区不卡无毒影院| 亚洲欧美色一区| 亚洲日本乱码在线观看| 亚洲精品视频一区| 一区二区三区不卡在线观看| 亚洲欧美日韩国产另类专区| 有坂深雪av一区二区精品| 亚洲国产成人91porn| 首页综合国产亚洲丝袜| 日韩成人免费在线| 另类的小说在线视频另类成人小视频在线 | 日韩精品一区二区三区在线| 亚洲精品在线观看网站| 国产午夜精品一区二区三区嫩草 | 91精品在线免费| 日韩午夜在线观看视频| 26uuu精品一区二区| 国产日韩欧美精品一区| 中文字幕av一区二区三区免费看| 国产精品色在线观看| 亚洲色图.com| 日韩黄色一级片| 韩国理伦片一区二区三区在线播放 | 91首页免费视频| 91福利国产成人精品照片| 欧美三区在线观看| 欧美xingq一区二区| 国产欧美精品日韩区二区麻豆天美| 国产精品久久久久一区| 亚洲高清免费观看| 激情综合色丁香一区二区| 波多野洁衣一区| 欧美日韩免费一区二区三区视频| 欧美变态凌虐bdsm| 国产午夜精品福利| 亚洲精品中文字幕乱码三区| 免费观看一级欧美片| 国产一区二区不卡| 在线免费不卡电影| 精品欧美一区二区久久| 国产精品国产三级国产aⅴ入口| 亚洲午夜精品久久久久久久久| 老司机免费视频一区二区三区| 成人白浆超碰人人人人| 在线成人av网站| 久久久91精品国产一区二区精品 | 国产精品久久久久久久久搜平片 | 风流少妇一区二区| 欧美日韩在线播放三区四区| 久久精品亚洲一区二区三区浴池| 亚洲综合区在线| 国产精华液一区二区三区| 欧美丝袜自拍制服另类| 国产视频在线观看一区二区三区 | 国产剧情av麻豆香蕉精品| 日本伦理一区二区| 精品sm在线观看| 亚洲一区二区三区四区在线观看| 国产电影精品久久禁18| 欧美日韩国产另类不卡| 国产精品少妇自拍| 久久99国内精品| 欧美日韩大陆在线| 亚洲色图一区二区三区| 国产精品888| 日韩一区二区三区视频| 亚洲国产美国国产综合一区二区| 高清久久久久久| 欧美大片顶级少妇| 无码av免费一区二区三区试看| 成人av先锋影音| 久久久久久一级片| 老汉av免费一区二区三区| 欧美亚洲一区二区在线| 中文字幕一区二区三区色视频 | 欧美r级电影在线观看| 亚洲国产精品久久人人爱蜜臀| 国产成人av一区二区| 日韩一级片在线播放| 天天综合色天天综合| 欧美亚洲一区二区在线| 亚洲日本免费电影| av电影在线观看完整版一区二区| 久久久91精品国产一区二区三区| 丝袜a∨在线一区二区三区不卡| 日本大香伊一区二区三区| 日本一区二区三区电影| 国产精品一区在线观看乱码| 精品电影一区二区三区| 午夜亚洲福利老司机| 欧美性大战xxxxx久久久| 亚洲欧美激情视频在线观看一区二区三区| 国产精品自在欧美一区| 久久久噜噜噜久噜久久综合| 国产一区美女在线| 欧美v亚洲v综合ⅴ国产v| 蜜臀av性久久久久蜜臀aⅴ四虎| 91精品国产综合久久精品app| 亚洲va在线va天堂| 欧美日本一区二区| 五月天欧美精品| 欧美一级视频精品观看| 日本成人超碰在线观看| 日韩一区二区不卡| 精品一区二区久久| 国产亚洲欧美中文| 粉嫩蜜臀av国产精品网站| 国产欧美va欧美不卡在线| 成人av网站免费观看| 亚洲人成网站色在线观看| 在线观看亚洲精品| 三级在线观看一区二区| 日韩精品专区在线| 国产伦精一区二区三区| 中文无字幕一区二区三区 | 久久久综合九色合综国产精品| 国产麻豆精品一区二区| 欧美国产激情一区二区三区蜜月 | 国产精品久久99| 色综合天天在线| 亚洲一区二区三区四区不卡| 欧美一区日韩一区| 激情综合网最新| 国产精品国产三级国产aⅴ原创| 91成人在线免费观看| 无码av免费一区二区三区试看| 精品美女被调教视频大全网站| 成人午夜免费av| 亚洲综合色噜噜狠狠| 日韩免费高清视频| av资源网一区| 亚洲成人7777| 久久精品亚洲麻豆av一区二区 | 日韩三级视频在线看| 国产99久久久久久免费看农村| 亚洲欧洲日韩在线| 欧美日韩大陆一区二区| 国内精品久久久久影院色| 国产精品国产自产拍高清av| 欧美日韩一区二区在线观看视频| 国产自产视频一区二区三区| 中文字幕日韩一区| 7777女厕盗摄久久久| 国产成人免费视频一区| 亚洲精品国产a久久久久久| 日韩视频在线观看一区二区| 不卡电影免费在线播放一区| 日韩高清一级片| 国产精品成人在线观看| 欧美一区二区播放| 99久久婷婷国产精品综合| 看电视剧不卡顿的网站| 亚洲伦理在线精品| 欧美xxxx老人做受| 在线观看不卡一区| 国产成a人无v码亚洲福利| 婷婷开心久久网| 亚洲天堂2014| 久久综合九色综合97_久久久| 91成人看片片| 成人午夜精品在线| 美美哒免费高清在线观看视频一区二区| 国产精品久久久久久久久果冻传媒| 欧美福利视频一区| 91亚洲精品乱码久久久久久蜜桃| 久久av中文字幕片| 亚洲成人激情社区| 亚洲欧美日韩国产综合在线| 久久精品人人做人人综合 | 精品国产乱码久久久久久图片| 91网站最新网址| 国产盗摄一区二区三区| 日本 国产 欧美色综合| 亚洲国产人成综合网站| 中文字幕制服丝袜成人av| 欧美成人vr18sexvr| 欧美日韩1区2区| 91丨九色porny丨蝌蚪| 国产精品69久久久久水密桃| 久久99国内精品| 日本欧美久久久久免费播放网| 亚洲另类在线制服丝袜| 国产精品久久久一本精品 | 一区二区免费在线播放| 国产精品免费网站在线观看| 久久久影视传媒| 日韩免费观看高清完整版| 欧美浪妇xxxx高跟鞋交| 欧美三级视频在线| 欧美午夜寂寞影院| 色88888久久久久久影院按摩 | 久久久久久久av麻豆果冻| 91精品国产色综合久久不卡蜜臀| 欧美午夜电影网| 91精彩视频在线| 欧美最猛黑人xxxxx猛交| 在线一区二区三区|