Search found 483 matches

by Josep Roca
Nov 13, 2016 10:55
Forum: General
Topic: Tonight bug catch
Replies: 48
Views: 3783

Re: Tonight bug catch

Don't know where is the problem. With my class, if I use a cast operator PRIVATE OPERATOR CWstr.CAST () BYREF AS WSTRING OPERATOR = *cast(WSTRING PTR, m_pBuffer) END OPERATOR This compiles but the content is not changed DIM cws AS CWSTR cws = "1234567890" MID(cws, 3, 1) = "x" pri...
by Josep Roca
Nov 13, 2016 8:51
Forum: General
Topic: Tonight bug catch
Replies: 48
Views: 3783

Re: Tonight bug catch

A more complex class is needed to demonstrate it. I have noticed these problems with the dynamic unicode string class that I'm working. See: http://www.planetsquires.com/protect/forum/index.php?topic=3944.msg29531#msg29531 Regarding MID as a statement, something like MID(cws, 2, 1) = "x" c...
by Josep Roca
Nov 13, 2016 4:28
Forum: General
Topic: Tonight bug catch
Replies: 48
Views: 3783

Re: Tonight bug catch

It also does not work with VAL and MID statement (works with MID as a function). There are also problems when using the & operator (the + operator always works) and possibly other FB intrinsic functions.
by Josep Roca
Nov 06, 2016 12:20
Forum: Beginners
Topic: Windows GUI
Replies: 145
Views: 19877

Re: Windows GUI

> Okay, thanks Josep. How to set an image as background of a window? You can't simply draw an image and that's all. You can't make it persistent, therefore you need to redraw it each time that WIndows redraws the background. In an application that uses a callback function, this is done processing th...
by Josep Roca
Nov 06, 2016 2:46
Forum: Beginners
Topic: Windows GUI
Replies: 145
Views: 19877

Re: Windows GUI

This sets the background color of the main window to blue.

Code: Select all

SetClassLongPtr hwnd, GCLP_HBRBACKGROUND, CAST(LONG_PTR, CreateSolidBrush(BGR(0, 0, 255)))


Where hwnd is the handle to the window.
by Josep Roca
Nov 03, 2016 13:46
Forum: Beginners
Topic: Windows GUI
Replies: 145
Views: 19877

Re: Windows GUI

Thanks Josep, can the program get a handle on the icon that was attached to it? The .rc file. DIM hIcon AS HICON = LoadImage(GetModuleHandle(NULL), "OOP_16x16.ico", IMAGE_ICON, 16, 16, LR_SHARED) Josep, I tried the following code in my program but an icon does not show. dim hIcon AS HICON...
by Josep Roca
Nov 01, 2016 17:41
Forum: Beginners
Topic: Windows GUI
Replies: 145
Views: 19877

Re: Windows GUI

Provoni wrote:Thanks Josep, can the program get a handle on the icon that was attached to it? The .rc file.


DIM hIcon AS HICON = LoadImage(GetModuleHandle(NULL), "OOP_16x16.ico", IMAGE_ICON, 16, 16, LR_SHARED)
by Josep Roca
Oct 31, 2016 15:13
Forum: Beginners
Topic: Windows GUI
Replies: 145
Views: 19877

Re: Windows GUI

Get a handle to the icon with LoadImage and set it using

Code: Select all

SendMessage(hwnd, WM_SETICON, CAST(WPARAM, ICON_BIG), CAST(LPARAM, hIcon))
SendMessage(hwnd, WM_SETICON, CAST(WPARAM, ICON_SMALL), CAST(LPARAM, hIcon))


Where hwnd is the handle to the window and hIcon the handle to the icon.
by Josep Roca
Oct 25, 2016 15:18
Forum: Beginners
Topic: Windows GUI
Replies: 145
Views: 19877

Re: Windows GUI

This requires the use of the OFN_ALLOWMULTISELECT flag, so you need to modify the LoadSaveDialog function or write a new one.
by Josep Roca
Oct 25, 2016 13:15
Forum: Beginners
Topic: Windows GUI
Replies: 145
Views: 19877

Re: Windows GUI

The way to work with multiple windows is to have a message loop and a callback function for each window. You need to specify the address of the callback when you create the window.
by Josep Roca
Oct 24, 2016 18:02
Forum: Beginners
Topic: Windows GUI
Replies: 145
Views: 19877

Re: Windows GUI

> But LTrim seems not to work to eleminate Chr(0).

Indeed. You must use RTrim, because the null is at the end of the string, not at the beginning.
by Josep Roca
Oct 18, 2016 20:17
Forum: Beginners
Topic: Windows GUI
Replies: 145
Views: 19877

Re: Windows GUI

Well, almost all, except static controls such labels or group boxes, and also controls like toolbars, status bars, progress bars, headers, rebars, size bars, updown.
by Josep Roca
Oct 18, 2016 16:13
Forum: Beginners
Topic: Windows GUI
Replies: 145
Views: 19877

Re: Windows GUI

Using Windows 7 ad FBC 1.05, it doesn't matter which case do you use. Even "wInDOwS.bI" works.
by Josep Roca
Oct 17, 2016 3:35
Forum: Beginners
Topic: Windows GUI
Replies: 145
Views: 19877

Re: Windows GUI

1. Your library CWindow on PlanetSquires Forums http://www.planetsquires.com/protect/forum/index.php?PHPSESSID=a2448a0b25e823130112d74f66982687&board=39.0. I think Paul Squires uses it for his new FreeBASIC IDE. It allows to easily create GUIs that are unicode and High DPI aware. Because of the...
by Josep Roca
Oct 16, 2016 1:31
Forum: Beginners
Topic: Windows GUI
Replies: 145
Views: 19877

Re: Windows GUI

> What is a message pump? Your function WaitEvent is a message pump. However, you are not using IsDialogMessage in it; therefore the TAB key isn't being processed. Function WaitEvent(ByRef msg As MSG) As Integer 'Wait for an event (mouse click). Returns a result <> 0 if a Windows message 'has been r...

Go to advanced search