I make REALcontrol.
Because I cannot acquire HWND of control with initFunction of behavior
and openFunction, I acquire it with controlHandleGetter.
A source is as follows.
ULONG controlHandleGetter( REALcontrolInstance instance )
{
ControlData(ListViewExControl,instance,LSTVIEWX,data);
HWND hwnd;
hwnd = REALGetControlHandle( instance );
if(REALinRuntime()){
if(hwnd && data->hWnd==NULL)
{
data->hWnd = hwnd;
//CreateWindowEx and set control style
_lvx_on_create(instance);
//Fire true Open event
void (*fp)(REALcontrolInstance instance);
fp = (void (*)(REALcontrolInstance instance))
REALGetEventInstance(instance, &lvxEvents[0]);
if (fp) fp(instance);
lvxStateChanged(instance,kBoundsChanged);
UINT id;
data->hThread = (HANDLE)_beginthreadex( NULL, 0,
&_lvx_threadproc, (LSTVIEWX*)data, 0, &id );
if((LONG)data->hThread==-1L) _DEBUG(L"failed _beginthreadex.
(reason=%d)",GetLastError());
}
}
return (ULONG)hwnd;
}
However, I can make control in this way, but the property that I set
with IDE is not succeeded to.
What kind of case will you use controlHandleGetter for?
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|