|
|
|
Найдите ошибку в DrawText()
|
|||
|---|---|---|---|
|
#18+
Visual C++ 6.0 // вариант_1 int TextWidth2(char *s, void *hDC){ // длина текста в пикселях // s - текст; hDC - контекст рисования RECT r; DrawText(hDC,s, -1, &r, DT_CALCRECT); // error C2664: 'DrawTextA' : cannot convert parameter 1 from // 'void *' to 'struct HDC__ *' return r.right-r.left; } // вариант_2 - Answer from forum int TextWidth2(char *s, HDC *hDC){ // длина текста в пикселях // s - текст; hDC - контекст рисования RECT r; DrawText(hDC,s, -1, &r, DT_CALCRECT); // error C2664: 'DrawTextA' : cannot convert // parameter 1 from 'struct HDC__ ** ' to 'struct HDC__ *' // Types pointed to are unrelated; conversion requires // reinterpret_cast, C-style cast or function-style cast return r.right-r.left; } СПАСИБО ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 06.09.2006, 11:19 |
|
||
|
Найдите ошибку в DrawText()
|
|||
|---|---|---|---|
|
#18+
// вариант_2 - Answer from forum Код: plaintext 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. -------------------------------------------------------------- ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 06.09.2006, 12:17 |
|
||
|
|

start [/forum/topic.php?fid=57&fpage=337&tid=2030563]: |
0ms |
get settings: |
11ms |
get forum list: |
13ms |
check forum access: |
2ms |
check topic access: |
2ms |
track hit: |
45ms |
get topic data: |
10ms |
get forum data: |
2ms |
get page messages: |
31ms |
get tp. blocked users: |
1ms |
| others: | 250ms |
| total: | 367ms |

| 0 / 0 |
