Search found 483 matches

by Josep Roca
Sep 20, 2019 18:46
Forum: Windows
Topic: CheckRadioButton issue
Replies: 11
Views: 2101

Re: CheckRadioButton issue

"A dialog box is a temporary window an application creates to retrieve user input. An application typically uses dialog boxes to prompt the user for additional information for menu items. A dialog box usually contains one or more controls (child windows) with which the user enters text, chooses...
by Josep Roca
Sep 20, 2019 16:30
Forum: Windows
Topic: CheckRadioButton issue
Replies: 11
Views: 2101

Re: CheckRadioButton issue

> As I have just mentioned the form is created in WinMain and therefore before the first pass of WndProc. As son as you call pWindow.Create, WndProc is called by Windows passing a WM_CREATE message. That is, before the controls have been added. SDK windows and procedures don't work in the same way t...
by Josep Roca
Sep 20, 2019 15:00
Forum: Windows
Topic: CheckRadioButton issue
Replies: 11
Views: 2101

Re: CheckRadioButton issue

> It should work in WndProc.

It depends in which message you have put the call (code not shown). If you try to check the button before it has been created, then, of course, it won't work.
by Josep Roca
Sep 20, 2019 11:07
Forum: Windows
Topic: WinFBX window client area width
Replies: 12
Views: 2311

Re: WinFBX window client area width

To avoid many of the casting problems, declare the variables as the same type that you will find in the declarations in MSDN or in the FB .bi files. Just be aware that C++ INT does not traslate to FB INTEGER, but to INT_ or LONG, and UINT does not translate to FB UINTEGER, but to UINT_ or DWORD. Thi...
by Josep Roca
Sep 20, 2019 9:57
Forum: Windows
Topic: WinFBX window client area width
Replies: 12
Views: 2311

Re: WinFBX window client area width

> With Encrypternet, which is only a 1066 line source code, I used Cast 32 times

You must be doing something wrong. I don't need to use cast so often.
by Josep Roca
Sep 20, 2019 9:47
Forum: Windows
Topic: CheckRadioButton issue
Replies: 11
Views: 2101

Re: CheckRadioButton issue

How do you have created the radio buttons? The first one should have the WS_GROUP style. ' // Add three radio buttons (the first one should have the WS_GROUP style) pWindow.AddControl("RadioButton", , IDC_OPTION1, "Option 1", 60, 40, 75, 23, WS_GROUP) pWindow.AddControl("Rad...
by Josep Roca
Sep 19, 2019 12:27
Forum: Windows
Topic: WinFBX window client area width
Replies: 12
Views: 2311

Re: WinFBX window client area width

Five warning in this function (I don't think so, because I don't get any) or in other parts of the code? Maybe you have handles declared as DWORD or something like that.
by Josep Roca
Sep 19, 2019 8:16
Forum: Windows
Topic: WinFBX window client area width
Replies: 12
Views: 2311

Re: WinFBX window client area width

You don't need so many casts if you write the code properly, i.e. FUNCTION GetTextWidth (BYVAL hWnd AS HWND, BYVAL txt AS WSTRING Ptr) AS LONG Dim hDC AS HDC, hFont AS HFONT, sz AS SIZE hDC = GetDc(hWnd) hFont = CAST(HFONT, SendMessage(hWnd, WM_GETFONT, 0, 0)) hFont = SelectObject(hDC, hFont) GetTex...
by Josep Roca
Sep 18, 2019 19:19
Forum: Windows
Topic: WinFBX window client area width
Replies: 12
Views: 2311

Re: WinFBX window client area width

> With PowerBASIC WS_POPUP is included as a default style. PowerBASIC uses the Windows Dialog Engine, which is intended for dialog boxes, and defaults to a WS_POPUP style. SDK programmers use WS_OVERLAPPED for main windows. Of course, you can use WS_POPUP with CWindow by specifying this style in the...
by Josep Roca
Sep 18, 2019 16:12
Forum: Windows
Topic: WinFBX window client area width
Replies: 12
Views: 2311

Re: WinFBX window client area width

I don't, but Windows does. It needs a minimum width to display things such the application icon and, depending of the styles used, the maximize/minimize button and the close button. The SetClientSize calls the wrapper procedure AfxSetWindowClientSize (see below), which calls the API function AdjustW...
by Josep Roca
Sep 18, 2019 8:55
Forum: Windows
Topic: Deleting a WinFBX control
Replies: 2
Views: 1717

Re: Deleting a WinFBX control

You can use DestroyWindow(<handle of the control>). DestroyWindow is a Windows API function.
by Josep Roca
Sep 15, 2019 6:11
Forum: Windows
Topic: Setting gcc compiler for WinFBE
Replies: 93
Views: 14569

Re: Setting gcc compiler for WinFBE

BTW the old help file is outdated and discontinued. It had become too big to work with the free version of HelpNDoc that I was using. The latest version of the documentation can be found at https://github.com/JoseRoca/WinFBX/tree/master/docs It is also incorporated in the WinFBE editor: Menu -> Help...
by Josep Roca
Sep 15, 2019 5:05
Forum: Windows
Topic: Setting gcc compiler for WinFBE
Replies: 93
Views: 14569

Re: Setting gcc compiler for WinFBE

> My best wishes to Valencia - you have had some pretty foul weather lately.

Thanks for your wishes. It has been the heaviest rainfall in more than a century. Oddily, I have been spared: it has rained very little in the town where I live.
by Josep Roca
Sep 14, 2019 17:29
Forum: Windows
Topic: Setting gcc compiler for WinFBE
Replies: 93
Views: 14569

Re: Setting gcc compiler for WinFBE

> If anyone is scaling to 100% or 125% then SetCompilersPaths is OK, for the time being. And what happens if you're using 175%, like me, or much more if you're using a 4K monitor? DPI aware applications must scale GUI elements by multiplying the number of pixels by a ratio that depends of the DPI se...
by Josep Roca
Sep 14, 2019 16:39
Forum: Windows
Topic: Setting gcc compiler for WinFBE
Replies: 93
Views: 14569

Re: Setting gcc compiler for WinFBE

> I have just switched from PB's headers to your headers and added AfxSetProcessDPIAware to PBMain. This does nothing if you already are using a manifest with <dpiAware>true</dpiAware>. As I said, this only disables Windows "virtualization". Windows scales non DPI aware applications when r...

Go to advanced search