How to do this one:
Code:
HWND CPropSheetHost::_CreateHiddenWindow()
{
WNDCLASS wc;
if(!GetClassInfo(m_hInst, m_szHiddenWindowClass, &wc))
{
ZeroMemory(&wc, sizeof(wc));
wc.style = CS_HREDRAW | CS_VREDRAW;
wc.lpfnWndProc = (WNDPROC)_HiddenWindowProc;
<cut>
LRESULT CALLBACK CPropSheetHost::_HiddenWindowProc( HWND hWnd,
UINT uMessage,
WPARAM wParam,
LPARAM lParam)
I thought this:
Delphi-Quellcode:
function TPropSheetHost._CreateHiddenWindow: HWND;
var wc: TWndClass;
begin
if not GetClassInfo(m_hInst, m_szHiddenWindowClass, wc) then
begin
ZeroMemory(@wc, SizeOf(wc));
wc.style := CS_HREDRAW or CS_VREDRAW;
wc.lpfnWndProc := @_HiddenWindowProc;
<cut>
function TPropSheetHost._HiddenWindowProc(hWnd: HWnd; Msg: UINT; WParam: WPARAM; LParam: LPARAM): UINT; stdcall;
But that doesn't make the compiler happy: [Pascal Error] PropSheetHost.pas(174): E2036 Variable required
Edit: Should I make that:
Delphi-Quellcode:
wc.lpfnWndProc := @TPropSheetHost_HiddenWindowProc;
function TPropSheetHost._HiddenWindowProc(hWnd: HWnd; Msg: UINT; WParam: WPARAM; LParam: LPARAM): UINT; stdcall;
?[/delphi]
or
[delphi][pre]wc.lpfnWndProc := @_HiddenWindowProc;
function _HiddenWindowProc(hWnd: HWnd; Msg: UINT; WParam: WPARAM; LParam: LPARAM): UINT; stdcall;[/pre]?