![]() |
| ||
|
|
Новости |
Поиск |
FAQ |
Статьи |
Книги |
Новости VCL
| | Форумы ЧАТ |
Орешник |
|
| |||
| |||
« предыдущая ветвь | форум | следующая ветвь »
Работа с Dialog Box из файла ресурсов
Diane © (2005-09-19 11:05:00)Привет,
Подскажите как обратиться к диалоговому окну загруженному из файла ресурсов.
hResInfo:= FindResource(hDllInst, 'MyDialog', RT_DIALOG);
hResLoad := LoadResource(hDllInst, hResInfo);
Собственно говоря, мне непонятно что дальше делать с hResLoad? Как отобразить окно? Или воспользоваться GetDlgItemText?
Спасибо,
Diane
Игорь Шевченко (2005-09-19 12:02:00) [1]
> Все что мне нужно было, всего навсего передать NIL вместо
> DLGPROC которое мне не известно.
Ее (DLGPROC) вообще-то надо написать...
Diane (2005-09-19 11:47:00) [2]Спасибо. Все что мне нужно было, всего навсего передать NIL вместо DLGPROC которое мне не известно.
Diane (2005-09-19 11:42:00) [3]DLGPROC lpDialogFunc и LPCTSTR lpTemplate непонятно
Leonid Troyanovsky (2005-09-19 11:38:00) [4]
> Diane © (19.09.05 11:13) [2]
> Спасибо, а можно более полный кусок кода?
http://groups.google.com/group/fido7.ru.delphi.chainik/msg/61f5fed417bf95d6
--
Regards, LVT.
Игорь Шевченко (2005-09-19 11:37:00) [5]
> Спасибо, а можно более полный кусок кода?
Например:
constructor TPowerPanel.Create(AParent: TObject);
var
DialogID: Integer;
begin
FParent := AParent;
DialogID := IDD_POWERPANEL;
TempInstance := Self;
Handle := CreateDialog (hInstance,
MAKEINTRESOURCE(DialogID), TMainWindow(FParent).HFrameWnd,
@PanelDlgProc);
Activate (True);
BringWindowToTop(Handle);
ShowWindow(Handle, SW_SHOW);
UpdateWindow(Handle);
end;
или в http://www.delphimaster.ru/articles/named_pipes/index.htmlпример
Котик Б (2005-09-19 11:30:00) [6]Хммм... а чего тут непонятного ???
DialogBox + F1
int DialogBox(
HINSTANCE hInstance, // handle to application instance
LPCTSTR lpTemplate, // identifies dialog box template
HWND hWndParent, // handle to owner window
DLGPROC lpDialogFunc // pointer to dialog box procedure
);
........
lpTemplate
Identifies the dialog box template. This parameter is either the pointer to a null-terminated character string that specifies the name of the dialog box template or an integer value that specifies the resource identifierof the dialog box template. If the parameter specifies a resource identifier, its high-order word must be zero and its low-order word must contain the identifier. You can use the MAKEINTRESOURCE macro to create this value.
Diane (2005-09-19 11:13:00) [7]Спасибо, а можно более полный кусок кода?
Игорь Шевченко (2005-09-19 11:10:00) [8]CreateDialog[Param], DialogBox[Param]