Reformat some codes
This commit is contained in:
parent
87d6cd1d04
commit
638ff65ba1
@ -1293,16 +1293,13 @@ ATOM RegisterGridClass(HINSTANCE hInstance)
|
||||
void SizeGrid(HWND hWnd,int /*SI*/)
|
||||
{
|
||||
SendMessage(hWnd,WM_SIZE,SIZE_MAXIMIZED,0);
|
||||
//obsolete
|
||||
//SendMessage(hWnd,WM_SIZE,SIZE_MAXIMIZED,MAKELPARAM(BGHS[SI].wannabewidth,BGHS[SI].wannabeheight));
|
||||
//SendMessage(hWnd,WM_SIZE,SIZE_MAXIMIZED,MAKELPARAM(BGHS[SI].wannabewidth,BGHS[SI].wannabeheight));
|
||||
}
|
||||
|
||||
int FindLongestLine(HDC hdc,TCHAR* text,SIZE* size)
|
||||
int FindLongestLine(HDC hdc, wchar_t* text, SIZE* size)
|
||||
{
|
||||
int longest = 0;
|
||||
TCHAR temptext[1000];
|
||||
TCHAR *p;
|
||||
wchar_t temptext[1000];
|
||||
wchar_t *p;
|
||||
|
||||
wcscpy_s(temptext, text);
|
||||
p = wcstok(temptext, TEXT("\n"));
|
||||
@ -1313,8 +1310,7 @@ int FindLongestLine(HDC hdc,TCHAR* text,SIZE* size)
|
||||
{
|
||||
longest=size->cx;
|
||||
}
|
||||
TCHAR temptext2[2];
|
||||
temptext2[0] = TEXT('\0');
|
||||
wchar_t temptext2[2] = {'\0'};
|
||||
p = wcstok(temptext2, TEXT("\n"));
|
||||
}
|
||||
return longest;
|
||||
@ -1408,6 +1404,7 @@ LRESULT CALLBACK GridProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
MessageBeep(0);
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_SETTEXT:
|
||||
{
|
||||
int j,linecount;
|
||||
@ -1434,7 +1431,6 @@ LRESULT CALLBACK GridProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
linecount++;
|
||||
}
|
||||
|
||||
}
|
||||
holdfont=(HFONT)SelectObject(gdc,BGHS[SelfIndex].htitlefont);
|
||||
GetTextExtentPoint32(gdc,BGHS[SelfIndex].title,lstrlen(BGHS[SelfIndex].title),&size);
|
||||
@ -1454,6 +1450,7 @@ LRESULT CALLBACK GridProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
case BGM_GETROWS:
|
||||
ReturnValue = BGHS[SelfIndex].rows;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user