Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ini-file crash
#1
Qm 2.3.2.8 does not like my ini-file.
See attached.


Attached Files
.qml   init4.qml (Size: 4.01 KB / Downloads: 609)
#2
How and where exactly crashes? To find where exactly, run with F5.
To test, I disabled kbdlib line and renames CFont to __Font, which is the same. I don't have them.
Tested on Windows 7 32 bit.
Nothing bad happens.
#3
.. I don't know - i press F5 and nothing happens - except that qm is not responding anymore.
I'm using Windows XP Professional 2002...
#4
What if without kbdlib?

Function init4
Code:
Copy      Help
def COLOR_BTNFACE    15
def OCR_NORMAL 32512
def WH_KEYBOARD_LL 13
def WH_MOUSE_LL 14
def WM_CONTEXTMENU 0x7B
def WM_MOUSELEAVE    0x2A3
def SPI_SETSCREENSAVERRUNNING 0x0061

type KBDLLHOOKSTRUCT vkCode scanCode flags time dwExtraInfo
type MSLLHOOKSTRUCT POINT'pt mouseData flags time dwExtraInfo
type TRACKMOUSEEVENT cbSize dwFlags hwndTrack dwHoverTime
type PAINTSTRUCT hDC fErase RECT'rcPaint fRestore fIncUpdate !rgbReserved[32]

type LOGBRUSH lbStyle lbColor lbHatch

;typelib KBDLib {8B495663-F300-4854-A6B0-0CFEBFB70F76} 1.0

;class __Font :-GdiObject'g

dll user32
,#GetKeyState nVirtKey
,#SetWindowsHookEx idHook lpfn hmod dwThreadId
,#UnhookWindowsHookEx hHook
,#CallNextHookEx hHook ncode wParam !*lParam
,#GetDlgItemText hDlg nIDDlgItem $lpString nMaxCount
,#GetForegroundWindow
,#GetClassName hWnd $lpString cch
,#LoadCursorFromFile $lpCursorName
,#CopyImage hImage uType cx cy Flags
,#SetSystemCursor hCursor Id
,#GetCursor
,#DestroyCursor hCursor
,#DrawEdge hDC RECT*lpRect edge grfFlags
,#TrackMouseEvent TRACKMOUSEEVENT*lpEventTrack
,#ValidateRect hWnd RECT*lpRect
,#BeginPaint hWnd PAINTSTRUCT*lpPaint
,#DrawText hDC $lpStr nCount RECT*lpRect wFormat
,#EndPaint hWnd PAINTSTRUCT*lpPaint

dll gdi32
,#GetPixel hDC x y
,#GetObject hgdiobj cbBuffer !*lpvObject
,#SetBkMode hDC nBkMode
,#SetBkColor hDC crColor
,#SetTextColor hDC crColor
,#CreatePen fnPenStyle nWidth crColor
,;#SelectObject hdc hgdiobj
,#MoveToEx hDC x y POINT*lppoint
,#LineTo hDC x y

def QU_HOST 1
#if (QU_HOST=1)
def PPP_JOBS "C:\jobs\"
def PPP_ELTEST "C:\eltest\"
def PPP_REM_PC ""
def PPP_REM_PC_QMREM ""
#endif

#if (QU_HOST=9)
def PPP_JOBS "Y:\"
def PPP_ELTEST "W:\"
def PPP_REM_PC ""
def PPP_REM_PC_QMREM ""
#endif
,
#if (QU_HOST=8)
def PPP_JOBS "Y:\"
def PPP_ELTEST "W:\"
def PPP_REM_PC "\\PC01-KBH\CROSSTEMP\rem\"
def PPP_REM_PC_QMREM "\\PC01-KBH\CROSSTEMP\rem\qmrem_elconpc.txt"
#endif

str+* p_str_all._new(150)
int+* p_int_all._new(200)
int+* p_layers._new(50)
type ALL_PNT str*nj str*lj str*on str*sp int*i str*mj
type J_JOBDIM ^size_x ^size_y ^orig_x ^orig_y ^orio_x ^orio_y roto_o
type K_PANDIM ^pgap_x ^pgap_y ^pbdr_x ^pbdr_y ^psiz_x ^psiz_y prep_x prep_y
type P_PANDIM ^outl_x ^outl_y ^pgap_x ^pgap_y ^pbdr_x ^pbdr_y ^psiz_x ^psiz_y prep_x prep_y
J_JOBDIM+* p_j_job._new
K_PANDIM+* p_k_pan._new
P_PANDIM+* p_p_pan._new
type DDIAVAR $controls $name $lblstr $func nr idsel diax diah idst
type KDIAVAR str'name str'keydef str'keyext str'excl flags

type QMUVAR str's double'd int'i
QMUVAR+* p_qmu_var._new(4)
type WRSIZ x y cx cy

def P_INT_PDKEY 64
def P_INT_QMU 180
def P_INT_QCOL 100
int* p=&p_int_all[100]


p[00]=CreateSolidBrush(0x4444ee)
p[01]=CreateSolidBrush(0x33ee33)
p[02]=CreateSolidBrush(0xee5555)
p[03]=CreateSolidBrush(0x2266dd)
p[04]=CreateSolidBrush(0x00dd22)
p[05]=CreateSolidBrush(0xdd3333)
p[06]=CreateSolidBrush(0xaaaaaa)
p[07]=CreateSolidBrush(0x778877)
p[08]=CreateSolidBrush(0xbb6666)
p[09]=CreateSolidBrush(0x00dd00)
p[10]=CreateSolidBrush(0x555555)
p[11]=CreateSolidBrush(0x3333ff)
p[12]=CreateSolidBrush(0x00ffe0)
p[13]=CreateSolidBrush(0xff62ff)
p[14]=CreateSolidBrush(0xffe040)
p[15]=CreateSolidBrush(0xe8f8f8)
p[16]=CreateSolidBrush(0x101010)
p[17]=CreateSolidBrush(0xc2c2c2)
p[18]=CreateSolidBrush(0x70c2ff)
p[19]=CreateSolidBrush(0xeeddd0)

__Font+ _Arial_8.Create("Arial" 8)
__Font+ _Arial_91.Create("Arial" 9 1)
__Font+ _Arial_10.Create("Arial" 10)
__Font+ _Arial_12.Create("Arial" 12)
__Font+ _Arial_14.Create("Arial" 14)
__Font+ _Arial_16.Create("Arial" 16)
__Font+ _Arial_18.Create("Arial" 18)
__Font+ _Arial_20.Create("Arial" 20)
__Font+ _Arial_22.Create("Arial" 22)
__Font+ _Arial_24.Create("Arial" 24)

__Font+ _Cournew_91.Create("Courier new" 9 1)
__Font+ _Cournew_101.Create("Courier new" 10 1)
__Font+ _Cournew_201.Create("Courier new" 20 1)

int+ hIconForward=GetIcon("$qm$\forward.ico" 1)

int+* p_cursors_._new(100)
#5
It seems that the problem is CFont.
I can declare class CFont, but as soon as i declare CFont variable it goes wrong.
Can use __Font instead, but what is the problem in declaring another class?
#6
Now I see.
Bug when the class uses member of type GdiObject. OK if uses member of type __GdiHandle, which is the same as GdiObject.
Will fix it in next QM. Thank you.


Forum Jump:


Users browsing this thread: 1 Guest(s)