[問題] StringGrid問題

看板C_and_CPP (C/C++)作者 (平凡)時間10年前 (2015/10/10 19:59), 10年前編輯推噓1(101)
留言2則, 2人參與, 最新討論串1/1
開發平台(Platform): (Ex: VC++, GCC, Linux, ...) bcb 額外使用到的函數庫(Library Used): (Ex: OpenGL, ...) 問題(Question): 請問一下,StringGrid1我想開視窗載入,然後再讓使用者可以自行更改 問題1: 當我ENTER時, 我發現我的1會置中, 但會有另一個1在左上角,也就是出現兩個1. 置中是我要的沒錯, 但左上角又出現1不是我要的. 為什麼會這樣呢? 餵入的資料(Input): 預期的正確結果(Expected Output): 錯誤結果(Wrong Output): 程式碼(Code):(請善用置底文網頁, 記得排版) //--------------------------------------------------------------------------- void __fastcall TForm2::StringGrid1DrawCell(TObject *Sender, int ACol, int ARow, TRect &Rect, TGridDrawState State) { DrawText(StringGrid1->Canvas->Handle, StringGrid1->Cells[ACol][ARow].c_str(), StringGrid1->Cells[ACol][ARow].Length(), &Rect, DT_SINGLELINE| DT_CENTER | DT_VCENTER ); } 補充說明(Supplement): -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 114.25.191.243 ※ 文章網址: https://www.ptt.cc/bbs/C_and_CPP/M.1444478397.A.AD1.html ※ 編輯: GooLoo (114.25.191.243), 10/15/2015 23:50:39

10/16 00:33, , 1F
可以關掉
10/16 00:33, 1F

10/16 20:39, , 2F
解了感謝
10/16 20:39, 2F
※ 編輯: GooLoo (114.25.184.100), 10/16/2015 21:03:11
文章代碼(AID): #1M6FszhH (C_and_CPP)
文章代碼(AID): #1M6FszhH (C_and_CPP)