Message 1 of 6
WM_INITDIALOG in ParamMap2UserDlgProc
Not applicable
08-17-2011
05:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
What are the rules to disable ParamBlk2 items on a panel?
I did an EnableWindow() in WM_INITDIALOG but all ParamBlk2 controls are still active - in contrast all standard windows controls behave correct. Even when I can disable these controls later, every "repaint" of the dialog panel puts them to enable again?
I did an EnableWindow() in WM_INITDIALOG but all ParamBlk2 controls are still active - in contrast all standard windows controls behave correct. Even when I can disable these controls later, every "repaint" of the dialog panel puts them to enable again?
class cPanel2DlgProc : public ParamMap2UserDlgProc
{
public:
HWND hWin;
cPanel2DlgProc() {}
INT_PTR DlgProc(TimeValue t, IParamMap2 *map, HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) {
switch (msg)
{
case WM_INITDIALOG:
{
HWND h = GetDlgItem( hWnd, IDC_PBLK2ITEM );
if (h)
EnableWindow( h, false ); // <<< this one fails..
}
break;
}
}
void DeleteThis() { }
};