[<<] [<] Page 1 of 1 [>] [>>] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
is DrawText() with DT_CENTER working?
From: Jun Sun ####@####.#### Date: 25 May 2000 22:56:09 -0000 Message-Id: <392DAF80.5DE1E056@mvista.com> I have the following code which does not seem to put the text in the enter as I want it. The text is put on the left side. Does anybody know why? I am using v0.88pre6. void DrawDone(HDC hdc, RECT r) { const char donemsg[] = "Calibration is done!"; DrawText(hdc, donemsg, -1, &r, DT_CENTER); } Jun | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: is DrawText() with DT_CENTER working?
From: "Greg Haerr" ####@####.#### Date: 31 May 2000 01:28:20 -0000 Message-Id: <034801bfca9f$ca7f1480$15320cd0@gregh> : void DrawDone(HDC hdc, RECT r) : { : const char donemsg[] = "Calibration is done!"; : DrawText(hdc, donemsg, -1, &r, DT_CENTER); : } Jun, The reason it doesn't work is because DT_CENTER isn't yet implemented. Goto microwin/src/mwin/wingdi.c and look at the ExtTextOut function. You'll need to case on (DT_LEFT|DT_CENTER|DT_RIGHT) and add something to the passed x value in order to work. Regards, Greg | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[<<] [<] Page 1 of 1 [>] [>>] |