나는 사용자 지정 컨트롤 클래스를 만드는거야 내가 그것을 완벽하게 제어를 원하기 때문에, 나는 클래스를 등록하고 클래스의맞춤 컨트롤에 클래스 콜백을 사용 하시겠습니까?
LRESULT CALLBACK OGLTOOLBAR :: ToolProc (HWND, UINT, WPARAM, LPARAM)를 사용할
하지만 나를 보내지 않습니다.
내가하고 있어요 :
HWND OGLTOOLBAR::create(HWND parent,HINSTANCE hInst, int *toolWidthPtr)
{
if (toolhWnd != NULL)
{
return toolhWnd;
}
toolWidth = toolWidthPtr;
ZeroMemory(&rwc,sizeof(rwc));
rwc.lpszClassName = TEXT("OGLTool");
rwc.hbrBackground = GetSysColorBrush(COLOR_BTNSHADOW);
rwc.lpfnWndProc = (WNDPROC)ToolProc;
rwc.hCursor = LoadCursor(0, IDC_ARROW);
RegisterClass(&rwc);
toolhWnd = CreateWindowEx(NULL, rwc.lpszClassName,NULL,
WS_CHILD | WS_VISIBLE,
0, 0, *toolWidth, 900, parent, 0, NULL, 0);
return toolhWnd;
}
이 일을 올바른 방법은 무엇입니까?
감사
컴파일러는 말합니다 : 오류 1 오류 C2440 : '형식 캐스트': 'WNDPROC'
이 게시물이 나에게 얼마나 유용했는지 모르실 것입니다. –