Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "WinAPI";
Текущий архив: 2005.11.20;
Скачать: [xml.tar.bz2];

Вниз

Работа с Dialog Box из файла ресурсов   Найти похожие ветки 

 
Diane ©   (2005-09-19 11:05) [0]

Привет,

Подскажите как обратиться к диалоговому окну загруженному из файла ресурсов.
hResInfo:= FindResource(hDllInst, "MyDialog", RT_DIALOG);
        hResLoad := LoadResource(hDllInst, hResInfo);
Собственно говоря, мне непонятно что дальше делать с hResLoad? Как отобразить окно? Или воспользоваться GetDlgItemText?

Спасибо,
Diane


 
Игорь Шевченко ©   (2005-09-19 11:10) [1]

CreateDialog[Param], DialogBox[Param]


 
Diane ©   (2005-09-19 11:13) [2]

Спасибо, а можно более полный кусок кода?


 
Котик Б   (2005-09-19 11:30) [3]

Хммм... а чего тут непонятного ???
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 identifier of 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.



 
Игорь Шевченко ©   (2005-09-19 11:37) [4]


> Спасибо, а можно более полный кусок кода?


Например:

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 пример


 
Leonid Troyanovsky ©   (2005-09-19 11:38) [5]


> Diane ©   (19.09.05 11:13) [2]
> Спасибо, а можно более полный кусок кода?


http://groups.google.com/group/fido7.ru.delphi.chainik/msg/61f5fed417bf95d6

--
Regards, LVT.


 
Diane ©   (2005-09-19 11:42) [6]

DLGPROC lpDialogFunc  и LPCTSTR lpTemplate непонятно


 
Diane ©   (2005-09-19 11:47) [7]

Спасибо. Все что мне нужно было, всего навсего передать NIL вместо DLGPROC которое мне не известно.


 
Игорь Шевченко ©   (2005-09-19 12:02) [8]


> Все что мне нужно было, всего навсего передать NIL вместо
> DLGPROC которое мне не известно.


Ее (DLGPROC) вообще-то надо написать...



Страницы: 1 вся ветка

Форум: "WinAPI";
Текущий архив: 2005.11.20;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.46 MB
Время: 0.044 c
2-1130849562
BFG9k
2005-11-01 15:52
2005.11.20
Закрытие программы в OnCreate


2-1130670653
тт
2005-10-30 14:10
2005.11.20
Как узнать размер объекта в сантиметрах?


3-1128600013
Ascer
2005-10-06 16:00
2005.11.20
Выбор из справочника


14-1130248221
вразлет
2005-10-25 17:50
2005.11.20
Краткий сетевой словарь либерального сверхчеловека


9-1120168841
ГугльМэп
2005-07-01 02:00
2005.11.20
А нет ли какого нибудь алгоритма, чтобы находить крыши домов на





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский