Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Very early GUI stuff
#11
Okay, I got a couple of questions for anyone out there who's got some experience in raw GUI programming:

1. The combobox will not display the dropdown icon, although it will function as normal when I send messages to add new text items, and I can scroll through the items using the keyboard's cursor keys. Do I have to draw this in myself? The MSDN makes no mention of it...in fact, as usual, it's quite vague on the subject.
2. With editboxes, there are no scrollbars, even when multiline and the scroll types are set. I see this on the MSDN: "Multiline edit controls can have scroll bars. An edit control with scroll bars processes its own scroll bar messages.". Maybe I'm a bleedin' idiot, but this doesn't make a whole lot of sense to me. Can someone explain wtf I have to do to get scrollbars in editboxes in plain English? Big Grin

In any event, I got more controls working...somewhat. As before, I still don't have a lot of time to work on this so it's mainly just pick and tear at what I can, but here's a newer screenie:
[Image: fb_gui-button-combobox-edit-scrollbar.png]
With all of this working to some exent thus far, I've already conceptualized a method of GUI abstraction that hopefully will work. Once the controls are brought "under control", so to speak, it can be created so everyone can have true event-based GUI support under FreeBASIC.

EDIT: New user32.bi released (v1.05, includes new combobox message constants, allowing stuff like adding items to comboboxes), and allfbapi was updated.
I'd knock on wood, but my desk is particle board.
Reply
#12
For the comboBox use this style: CBS_DROPDOWNLIST OR WS_VSCROLL OR CBS_SORT

It works for me...
Reply
#13
For the editbox use this style: ES_MULTILINE OR ES_AUTOHSCROLL OR ES_AUTOVSCROLL OR WS_TABSTOP OR WS_VSCROLL OR ES_LEFT

It works for me...
Reply
#14
Ah okay, it was the WS_VSCROLL that did the trick. Thanks. Big Grin
I'd knock on wood, but my desk is particle board.
Reply
#15
Hey fsw...I tried your example with the manifest included into the resource file, and it seems to crash res2coff. I think for now, FB apps might have to be stuck with .manifest files. Big Grin Unless you know of a way to make this stuff work...
I'd knock on wood, but my desk is particle board.
Reply
#16
res2coff crashes on me too.

Because windres has to much dependecies for my taste, and I don't want to use old programs like micro$ofts rc, I used gorc because it's small and makes obj files right away. Linking with ld seems to work fine.

win xp styles workes fine here.
Reply
#17
Alright. Big Grin GoRC rocks very muchly. Big Grin Embedded the manifest without difficulty, and ditched the external file. Thanks again for the tip. Big Grin

fbc -s gui -a objectfile.obj basfile.bas

woohoo Big Grin
I'd knock on wood, but my desk is particle board.
Reply
#18
Quote:Thanks again for the tip. Big Grin
You're welcome.

Would have prefered to stay with gnu tools but some of these are just too big and bulky.

Take care...
Reply
#19
@adosorken
just found out that windres can make both RES files and OBJ files.

So if you do:
windres myapp.rc myapp.obj
you don't need to use res2coff at all 8)

windres is surely bigger (~400kb) than gorc (~50kb) and needs gcc.exe (~69kb) and cpp0.exe (~90kb), but if you want to stay with gnu tools, you can do it.
IT WORKS :bounce:

So it's up to you what you want to use - both ways are possible.
Reply
#20
Nah, gorc is quite clearly a far superior solution, and it's freeware. Big Grin As far as I'm concerned...it doesn't matter if the tool is gnu as long as its free. Big Grin
I'd knock on wood, but my desk is particle board.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)