Message board for the users of flat assembler.
> Windows > [solved] PRINTDLG struct size (64 bit)
WereMole 15 Nov 2017, 16:13
I am using flat assembler 1.72
I was working on a bigger program (64bit) and could not get the printdlg box to appear. To simplify things I copied the "examples win64 template" and modified it so a left click on the mouse would call the dialog box.
I added 3 items to the data section
hinstance dq ?
hwnd_main dq ?
In addition comdlg32 was added to the library and includes
Following the windows 32bit example the data structure was loaded with data making sure the larger operands were used where required.
Here is the problem:
The first value in the data structure is the size of the structure. If I use sizeof.PRINTDLG to load pd.lStructureSize then this value is loaded with 74h and the printer dialog box fails to appear.
However, if pd.lStructureSize is set to 78h the dialog box appears.
What am I doing wrong? How should one fix this problem?
|15 Nov 2017, 16:13||
revolution 15 Nov 2017, 16:29
I suspect the dialog definition is wrong. Tomasz will have to fix it, or you can manually modify it yourself.
After this line:
there probably should be some padding to align the following dq values correctly. The easiest might be to simply add one more question mark.
lCustData dd ?
I've marked this topic as a bug.
lCustData dd ?,?
|15 Nov 2017, 16:29||
Tomasz Grysztar 15 Nov 2017, 16:48
I have updated the Windows package.
|15 Nov 2017, 16:48||
WereMole 15 Nov 2017, 17:46
|15 Nov 2017, 17:46||
< Last Thread | Next Thread >
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.