Search found 399 matches

by Josep Roca
Jun 19, 2019 17:07
Forum: Community Discussion
Topic: fb 1.07 tests
Replies: 12
Views: 521

Re: fb 1.07 tests

I also think that -strip should be the default.
by Josep Roca
Jun 18, 2019 18:38
Forum: Community Discussion
Topic: Extending Wstring and Zstring with UDTs
Replies: 33
Views: 1705

Re: Extending Wstring and Zstring with UDTs

Excellent work. In my CWSTR class, I only have needed to change:

Code: Select all

#if __FB_VERSION__ < "1.07.0"
TYPE CWSTR
#else
TYPE CWSTR EXTENDS WSTRING
#endif
by Josep Roca
May 03, 2019 20:10
Forum: General
Topic: Constructor in dll
Replies: 18
Views: 527

Re: Constructor in dll

> Obviously, there is something inside InitializeCryptoBuffers which is problematic. You bet. Calling API functions that require DLLs other than Kernel32.dll may result in problems that are difficult to diagnose. It doesn't matter if you are using a FB constructor, DllMain or PowerBasic's LibMain: f...
by Josep Roca
Mar 09, 2019 0:16
Forum: General
Topic: (SOLVED) macro _WIN32_WINNT return wrong
Replies: 11
Views: 569

Re: macro _WIN32_WINNT return wrong

Which macro? _WIN32_WINNT is not a macro but a constant. Therefore, it will hold whatever value you assign to it.

If you don't define it, it will have a default value of &h0502.

Code: Select all

#ifndef _WIN32_WINNT
   const _WIN32_WINNT = &h0502
#endif
#ifndef WINVER
   const WINVER = _WIN32_WINNT
#endif
by Josep Roca
Feb 17, 2019 21:44
Forum: Windows
Topic: Dpi awareness functions not included?
Replies: 20
Views: 1028

Re: Dpi awareness functions not included?

> I tried the manifest settings from the microsoft sites. It simply didn't work. Try this one: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:sche...
by Josep Roca
Feb 16, 2019 13:04
Forum: Beginners
Topic: Alias
Replies: 3
Views: 256

Re: Alias

Alias is for exported procedures. The alternate name cannot be used within the program to call the procedure.

You can use #define my_func my_func2
by Josep Roca
Feb 15, 2019 13:01
Forum: Beginners
Topic: FileDateTime() for Unicode
Replies: 14
Views: 758

Re: FileDateTime() for Unicode

> WHY???

Because you're using CreateFile instead of CreateFileW.
by Josep Roca
Feb 14, 2019 14:57
Forum: Beginners
Topic: FileDateTime() for Unicode
Replies: 14
Views: 758

Re: FileDateTime() for Unicode

> How to remove the warning from 'close fh'?

Using the correct API function (CloseHandle) instead of Close.
by Josep Roca
Feb 12, 2019 1:53
Forum: Windows
Topic: Dpi awareness functions not included?
Replies: 20
Views: 1028

Re: Dpi awareness functions not included?

If your application is not DPI aware, you will always get a DPI of 96, no matter if you are using 125% or another value. Make your application DPI aware by using an appropriate manifest of by calling the SetProcessDPIAware function. Non DPI aware applications are virtualized by Windows when using a ...
by Josep Roca
Feb 11, 2019 12:44
Forum: Beginners
Topic: FileDateTime() for Unicode
Replies: 14
Views: 758

Re: FileDateTime() for Unicode

> (I suppose it's pointless to ask if there is a function to set the file modification date...)

There is a Windows function called SetFileTime:
https://docs.microsoft.com/en-us/window ... etfiletime
by Josep Roca
Feb 11, 2019 12:30
Forum: Beginners
Topic: FileDateTime() for Unicode
Replies: 14
Views: 758

Re: FileDateTime() for Unicode

No, but it is not difficult to write a replacement: ' ======================================================================================== ' * Unicode replacement for Free Basic's FileDateTime. ' Returns the file's last modified date and time as Date Serial. ' wszFileName : Filename to retrieve ...
by Josep Roca
Feb 10, 2019 1:03
Forum: Windows
Topic: Dpi awareness functions not included?
Replies: 20
Views: 1028

Re: Dpi awareness functions not included?

To get the DPI, you can use:

Code: Select all

DIM hDC AS HDC = GetDC(HWND_DESKTOP)
DIM dpi AS LONG = GetDeviceCaps(hDC, LOGPIXELSX)
ReleaseDC HWND_DESKTOP, hDC


To get the scaling ratio, just divide dpi by 96.
by Josep Roca
Feb 10, 2019 0:47
Forum: Windows
Topic: Dpi awareness functions not included?
Replies: 20
Views: 1028

Re: Dpi awareness functions not included?

> apparently I can't use SetProcessDpiAware on win10. Why not? I use it. > Simply editing the manifest to set the awareness to false (this should be the default state, not the case in winfbe ide examples I found) is useless for some reason, so I need the functions. Why should it be the default state...
by Josep Roca
Feb 08, 2019 20:50
Forum: Windows
Topic: Windows Button Image
Replies: 25
Views: 993

Re: Windows Button Image

Change hImage to hBitmap or change hBitmap to hImage.
by Josep Roca
Feb 08, 2019 18:58
Forum: Windows
Topic: Windows Button Image
Replies: 25
Views: 993

Re: Windows Button Image

Something like this: #define WIN_INCLUDEALL #include once "windows.bi" #include once "win\commctrl.bi" Dim As MSG msg Dim Shared As HWND hWnd, edit ' Create window hWnd = CreateWindowEx( 0, "#32770", "Bitmap Button Test", WS_OVERLAPPEDWINDOW Or WS_VISIBLE , 10...

Go to advanced search