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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? babygrid.cpp

?? babygred
?? CPP
?? 第 1 頁 / 共 5 頁
字號:
	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,(long)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,(long)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,(long)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);
              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,(long)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,(long)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;
                       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+5;
                       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,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);
                   k=strlen(tbuffer);
                   c=0;
                   for(j=13;j<k;j++)
                       {
                        buffer[c]=tbuffer[j];
                        c++;
                       }
                   buffer[c]=0x00;
                   strcpy((char*)lParam,buffer);
                  }
			  else
			  {
			   strcpy((char*)lParam,"");
			  }
            break;

        case BGM_CLEARGRID:
                SendMessage(BGHS[SelfIndex].hlist1,LB_RESETCONTENT,0,0);
                BGHS[SelfIndex].rows = 0;
                BGHS[SelfIndex].cursorrow = 1;
                BGHS[SelfIndex].homerow = 1;
                BGHS[SelfIndex].homecol = 1;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩精品一卡二卡三卡四卡无卡| 国产曰批免费观看久久久| 亚洲gay无套男同| 国产一区二三区好的| 99久久久无码国产精品| 777亚洲妇女| 亚洲青青青在线视频| 久久黄色级2电影| 色综合天天性综合| 久久久精品中文字幕麻豆发布| 亚洲一区国产视频| 成人免费视频caoporn| 日韩欧美资源站| 洋洋av久久久久久久一区| 国产成人av网站| 日韩欧美高清在线| 亚洲国产美国国产综合一区二区| 成人一区二区三区中文字幕| 91精品久久久久久久99蜜桃| 亚洲精选一二三| 91免费看`日韩一区二区| 久久精品人人做人人爽人人| 精品一区二区在线免费观看| 777xxx欧美| 亚洲成av人**亚洲成av**| 色av一区二区| 亚洲欧美色综合| 97久久精品人人做人人爽 | 国产精品一区在线观看你懂的| 欧美高清www午色夜在线视频| 一区二区三区四区精品在线视频| 国产一区二区三区蝌蚪| ww亚洲ww在线观看国产| 蜜桃视频免费观看一区| 4438x亚洲最大成人网| 午夜视频一区二区| 欧美日韩另类一区| 日韩在线卡一卡二| 国产欧美日韩激情| 国产一区二区三区四区五区美女| 欧美精品一区视频| 国产精品一区在线观看乱码| 久久久久九九视频| 国产精品主播直播| 国产欧美视频一区二区| www.综合网.com| 亚洲人午夜精品天堂一二香蕉| 99re这里只有精品6| 亚洲欧美偷拍三级| 欧美高清dvd| 国产一区二区女| 国产精品国模大尺度视频| av不卡免费在线观看| 亚洲另类春色国产| 欧美美女网站色| 狠狠色丁香婷综合久久| 国产精品日产欧美久久久久| 一本到三区不卡视频| 三级在线观看一区二区| 久久久久国产精品厨房| 91在线精品一区二区| 亚洲chinese男男1069| 精品国产第一区二区三区观看体验 | 三级久久三级久久| 欧美tickling网站挠脚心| 国产成人亚洲综合a∨婷婷 | av色综合久久天堂av综合| 亚洲永久精品大片| 精品乱人伦小说| 99久久免费视频.com| 奇米精品一区二区三区在线观看一| 久久久久久久综合| 欧美私人免费视频| 国产精品亚洲专一区二区三区| 亚洲另类在线制服丝袜| 精品久久久久久久久久久院品网 | 国产高清亚洲一区| 亚洲综合免费观看高清完整版| 日韩欧美中文字幕公布| 成人午夜视频福利| 日韩二区在线观看| 一区在线播放视频| 欧美一区二区久久| 91视频观看免费| 韩国成人在线视频| 亚洲成a人片在线观看中文| 欧美国产欧美综合| 91精品国产综合久久精品麻豆| 成人综合婷婷国产精品久久蜜臀| 视频在线观看一区二区三区| 1000部国产精品成人观看| 日韩精品一区二区在线观看| 欧美亚洲精品一区| 成av人片一区二区| 国产一区二区视频在线| 日韩电影免费在线| 夜夜嗨av一区二区三区| 国产精品传媒视频| 国产女主播一区| 日韩一区二区电影网| 在线视频一区二区三区| 成人综合婷婷国产精品久久免费| 日韩中文字幕av电影| 亚洲国产一区二区视频| 1000精品久久久久久久久| 国产亚洲欧美色| 国产精品久久久久久久第一福利 | 国产日本欧洲亚洲| 精品免费视频一区二区| 欧美一区2区视频在线观看| 在线观看日韩电影| 91成人在线免费观看| 91小视频在线观看| 91亚洲精华国产精华精华液| av亚洲精华国产精华| 成人app下载| 白白色亚洲国产精品| 成人动漫一区二区| 99久久精品国产麻豆演员表| 成人h动漫精品一区二区| 成人综合在线视频| 99视频国产精品| 91美女视频网站| 91久久精品日日躁夜夜躁欧美| av在线不卡免费看| 99久免费精品视频在线观看| 99久久精品国产麻豆演员表| 色婷婷综合久久久久中文一区二区 | 日本不卡123| 日本伊人精品一区二区三区观看方式| 亚洲高清免费视频| 日本 国产 欧美色综合| 美国毛片一区二区三区| 国内久久婷婷综合| 成人aa视频在线观看| 99久久国产综合精品麻豆| 在线观看av一区| 91精品国产欧美一区二区18| 精品福利一二区| 中日韩免费视频中文字幕| 亚洲另类中文字| 人妖欧美一区二区| 国产福利一区在线| 91麻豆免费视频| 91精品国产福利在线观看 | 欧美一区中文字幕| 久久蜜臀中文字幕| 亚洲男女一区二区三区| 日韩不卡在线观看日韩不卡视频| 九九在线精品视频| 91丨porny丨户外露出| 欧美一区二区在线播放| 久久久亚洲精品一区二区三区 | 国产成人免费在线观看不卡| www.亚洲色图| 欧美一区二区三区精品| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 亚洲欧美国产77777| 日本欧美韩国一区三区| 风间由美性色一区二区三区| 欧美视频中文一区二区三区在线观看| 337p日本欧洲亚洲大胆精品| 一区二区在线看| 国产麻豆精品在线观看| 91福利区一区二区三区| 国产欧美一区二区三区在线看蜜臀 | 不卡一区二区中文字幕| 91福利精品视频| 久久综合九色综合97_久久久| 免费观看成人鲁鲁鲁鲁鲁视频| 亚洲欧洲成人av每日更新| 免费xxxx性欧美18vr| 不卡在线观看av| 欧美一区三区二区| 一区二区三区不卡在线观看| 精品亚洲aⅴ乱码一区二区三区| 成人一区二区三区视频| 欧美视频在线一区| 亚洲美女区一区| 国产精品一区二区视频| 欧美日韩一区二区在线视频| 日韩亚洲欧美中文三级| 综合自拍亚洲综合图不卡区| 青青草成人在线观看| 91老师片黄在线观看| 国产三级精品三级| 日韩av中文字幕一区二区三区| 成人精品在线视频观看| 精品福利二区三区| 亚洲国产日日夜夜| 成人av在线资源| 久久一区二区视频| 精彩视频一区二区| 欧美系列日韩一区| 亚洲三级在线看| 色婷婷国产精品综合在线观看| 日韩精品一区二区三区中文不卡| 亚洲精品久久嫩草网站秘色| 成人免费观看av| 欧美国产精品v|