| |
|
|
 Jörg Sellmeyer | Ok, das Programm stürzt jetzt nicht mehr beim Drucken ab, aber die Icons in der ersten Zeile verderben immer noch das Druckbild. |
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ...  | 17.06.2008 ▲ |
|
|
|
|
 Frank Abbing | Welche Icons? Zeigst du mir deinen Testcode...? Werde die letzten Postings morgen in einen eigenen Thread verschieben. |
|
|
| |
|
|
|
 | [offtopic] Frank AbbingWerde die letzten Postings morgen in einen eigenen Thread verschieben. nicht mehr nötig[/offtopic] |
|
|
| |
|
|
|
 Jörg Sellmeyer | Hallo Frank, Hier habe ich mal einen Code zusammengeschustert, der das Problem verdeutlicht: KompilierenMarkierenSeparieren
Proc BuildIL
Parameters Color&
Declare IL&
Declare Icon&,Anzahl&,Datei$
IL& = External(COMCTL32,ImageList_Create,16,16,254,3,3)
External(COMCTL32,ImageList_SetBkColor,IL&,Color&)
Datei$=Par$(0)
Icon& = External(SHELL32,ExtractIconA,%hinstance,Addr(Datei$),0)
External(COMCTL32,ImageList_AddIcon,IL&,Icon&)
Icon& = External(SHELL32,ExtractIconA,%hinstance,Addr(Datei$),1)
External(COMCTL32,ImageList_AddIcon,IL&,Icon&)
Icon& = External(SHELL32,ExtractIconA,%hinstance,Addr(Datei$),2)
External(COMCTL32,ImageList_AddIcon,IL&,Icon&)
Return IL&
EndProc
Proc DruckeLV
Parameters LV&,txt$
LVPrintListview(LV&,%hwnd,%hinstance,80,120,200,120,200,3,3,Addr(txt$),0,67)
EndProc
Declare clv1#,clv2#,clvall#,lvitem#
Dim clv1#,256
Dim clv2#,64
Dim clvall#,1400
Dim lvitem#,292
Declare HLVDll&,LV&,B#
Declare ImageList&
hLVDll& = ImportDll(D:IncListView.dll,LV)
Print LVGetDllVersion()
LVInitMessages(%hwnd)
LV&=LVCreateListView(%hwnd,%hinstance,-1,$C3FDFF,-1,$21)
ImageList& = BuildIL($C3FDFF)
LVSetImageList(LV&,ImageList&)
LVShowListview(LV&,10,20,400,400)
Var Text$=Spalte
LVIColumn(LV&,Addr(Text$),60,1)
LVSetColumnAlignment(LV&,0,1)hier muß man nochmal nachhelfen, da sonst der Text nicht rechtsbündig angezeigt wird
LVIColumn(LV&,Addr(Text$),100,1)
LVIColumn(LV&,Addr(Text$),100,1)
LVIColumn(LV&,Addr(Text$),100,1)
AddString(LV&,01|Test|Test|Test)
AddString(LV&,02|Test|Test|Test)
LVSetCheckBoxState(LV&,0,1)
LVSetIcon(LV&,0,0)
LVSetIcon(LV&,1,1)
Var Button& = Create(Button,%hwnd,Drucken,450,20,60,24)
UserMessages 16
While 1
Waitinput
If %umessage = 16
Break
ElseIf Clicked(Button&)
DruckeLV(LV&,Test)
EndIf
Wend
LVEraseListview(LV&)
DestroyWindow(LV&)
LVCloseMessages(%hwnd)
Wenn Du jetzt das Ganze druckst, werden die Icons und der Text der ersten Spalte nach rechts verschoben. |
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ...  | 18.06.2008 ▲ |
|
|
|
|
 Frank Abbing | Kann das Problem nachvollziehen, Jörg. Ich schau mal was da schief läuft, danke! |
|
|
| |
|
|