|
|
|
Создание диалогового окна !
|
|||
|---|---|---|---|
|
#18+
Народ - объясните новичку в WinApi - как мне создать диалоговое окно -ну тока неврукопашную - а в файле ресурсов а потом его ну присобачить к основному .сpp-ку (ну там где WinMain и вся херня) !!! Напишите и объясните плиз кодик это программки - например просто вывод диалогового окна -Трудность в том что я не могу понять как его ID привязать к основному файлу ну где WinMain - связи не вижу !!!!А от туда и буду отталкиваться в дальнейшем -очень прошу !!! Хочу научится работать с файлами ресурсов - а то тока иконку могу из ресурсов передавать ! А вот как диалоговое окно нет !!! Премного благодарен!!!! ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 26.04.2005, 01:50 |
|
||
|
Создание диалогового окна !
|
|||
|---|---|---|---|
|
#18+
HWND CreateDialog( HINSTANCE hInstance, LPCTSTR lpTemplate, HWND hWndParent, DLGPROC lpDialogFunc ); Parameters hInstance [in] Handle to the module whose executable file contains the dialog box template. lpTemplate [in] Specifies 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. hWndParent [in] Handle to the window that owns the dialog box. lpDialogFunc [in] Pointer to the dialog box procedure. For more information about the dialog box procedure, see DialogProc. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 26.04.2005, 09:45 |
|
||
|
Создание диалогового окна !
|
|||
|---|---|---|---|
|
#18+
if (DialogBox(hinst, MAKEINTRESOURCE(DLG_DELETEITEM), hwnd, (DLGPROC)DeleteItemProc)==IDOK) { // Complete the command; szItemName contains the // name of the item to delete. } ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 26.04.2005, 09:46 |
|
||
|
Создание диалогового окна !
|
|||
|---|---|---|---|
|
#18+
hwndGoto = CreateDialog(hinst, MAKEINTRESOURCE(DLG_GOTO), hwnd, (DLGPROC) GoToProc); ShowWindow(hwndGoto, SW_SHOW); ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 26.04.2005, 09:47 |
|
||
|
Создание диалогового окна !
|
|||
|---|---|---|---|
|
#18+
Только если использовать CreateDialog он будет немодальным и в основном цикле программы нужно будет писать так (если ничего не забыл): Код: plaintext 1. 2. 3. 4. 5. 6. 7. 8. --- С уважением, Dubrov. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 27.04.2005, 08:52 |
|
||
|
|

start [/forum/topic.php?fid=57&msg=33034862&tid=2033400]: |
0ms |
get settings: |
10ms |
get forum list: |
17ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
83ms |
get topic data: |
11ms |
get forum data: |
3ms |
get page messages: |
42ms |
get tp. blocked users: |
1ms |
| others: | 236ms |
| total: | 411ms |

| 0 / 0 |
