AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX: Функционал
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 26.05.2005, 18:16   #4  
simply2double is offline
simply2double
Участник
Аватар для simply2double
 
556 / 19 (2) ++
Регистрация: 08.09.2004
Адрес: alfa cen
неужели ни кто не инкапсулировал APIшные функции ???

PHP код:
#define.PD_RETURNDC (0x00000100)
#define.PD_COLLATE(0x00000010)

static container getPrintDlg(int   _hwnd)
{
    
#define.structSize(4*21)
    
Binary          struct        = new Binary(#structSize);

    
DLL         _DLL             = new DLL("Comdlg32");
    
DLLFunction _getPrintDlg = new DLLFunction(_DLL"PrintDlgExA");
    
_getPrintDlg.returns(ExtTypes:: DWord);
    
_getPrintDlg.arg(ExtTypes::Pointer);


    
struct.dWord (#offset0, #structSize ); //lStructSize = sizeof(PRINTDLGEX);
    
struct.dWord (#offset4, _hwnd );       //hwndOwner = hWnd;
    
struct.dWord (#offset8, 0 );           //hDevMode = NULL;
    
struct.dWord (#offset12, 0 );          //hDevNames = NULL;
    
struct.dWord (#offset16, 0 );          //hDC = NULL;
    
struct.dWord (#offset20, #PD_RETURNDC | #PD_COLLATE );//Flags = PD_RETURNDC | PD_COLLATE;
    
struct.dWord (#offset24, 0 );          //Flags2 = 0;
    
struct.dWord (#offset28, 0 );          //ExclusionFlags = 0;
    
struct.dWord (#offset32, 0 );          //nPageRanges = 0;
    
struct.dWord (#offset36, 10 );         //nMaxPageRanges = 10;
    
struct.dWord (#offset40, 0 );          //lpPageRanges = pPageRanges;
    
struct.dWord (#offset44, 0 );          //nMinPage = 1;
    
struct.dWord (#offset48, 1000 );       //nMaxPage = 1000;
    
struct.dWord (#offset52, 1 );          //nCopies = 1;
    
struct.dWord (#offset56, 0 );          //hInstance = 0;
    
struct.dWord (#offset60, 0 );          //lpPrintTemplateName = NULL;
    
struct.dWord (#offset64, 0 );          //lpCallback = NULL;
    
struct.dWord (#offset68, 0 );          //nPropertyPages = 0;
    
struct.dWord (#offset72, 0 );          //lphPropertyPages = NULL;
    
struct.dWord (#offset76, 1 );          //nStartPage = START_PAGE_GENERAL;
    
struct.dWord (#offset80, 0 );          //dwResultAction = 0;


    
if (_getPrintDlg.call(struct))
    {
        
info(int2str(struct.dWord (#offset8)));

    
}

    return 
conNull();


может свежий взгляд на код поможет... ошибки не возникает.. но окошко не всплывает и естественно возвращается нулевой дискриптор... может я где что не так определяю ???
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Axapta WinAPI::SewWindow... кто знает как? UNRW DAX: Программирование 2 26.09.2008 15:28
Dynamics AX Geek: Finding files with WinAPI Blog bot DAX Blogs 0 28.10.2006 16:40
WinAPI. Ссылка (POINT) третьего уровня вложенности Владимир Максимов DAX: Программирование 2 06.02.2006 16:28
WinAPI::getLastError() DreamCreator DAX: Программирование 4 20.06.2005 10:03
WinApi. Удаление файлов глючит. NJD DAX: Программирование 10 05.12.2003 13:31

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 12:59.