Seite 4 von 4

Re: Klassennamen ändern

Verfasst: 19.03.2020 17:36
von Michael Vogel
Danke sehr, jetzt läuft alles wie geschmiert :allright:

Ich hab' für den Problemfall X64 und Unicode auch noch einen Macro hinzugefügt, damit auch bei Bedarf der Purebasic-Aufruf ersetzt wird...

Code: Alles auswählen

		CompilerIf #PB_Compiler_Version<550
			CompilerIf #PB_Compiler_Unicode
				CompilerIf #PB_Compiler_Processor=#PB_Processor_x86
					Import "user32.lib"
						SetWindowText_(Handle, Title.p-ascii) As "_SetWindowTextW@8"
					EndImport
				CompilerElse
					Import "user32.lib"
						SetWindowText_(Handle, Title.p-ascii) As "SetWindowTextW"
					EndImport

					Macro SetWindowTitle(win,text)
						SetWindowText_(WindowID(win),text)
					EndMacro

				CompilerEndIf
			CompilerEndIf
		CompilerEndIf

Re: Klassennamen ändern

Verfasst: 19.03.2020 18:37
von mk-soft
Ist mir nicht aufgefallen das SetWindowsTitle nicht geht :cry:

Habe jetzt meinen Code mit der API und den Macro SetWindowTitle angepasst

Link: viewtopic.php?f=3&t=25771&p=351650#p351650

:wink: