No announcement yet.

Color picker dialog Title

  • Filter
  • Time
  • Show
Clear All
new posts

  • Borje Hagsten
    To be honest, never thought about it as an "issue" since everything else
    is in Greek - sorry, English in the editor.

    In case you consider it worth dealing with, it is the titles in the
    Open/Save dialogs. Same thing in the Find and Replace dialogs, but
    maybe those have been hard-coded, don't know. If not, it should be
    possible to get them localized too. No big deal though, at least not
    for me. I have my own toy to play with now..


    [This message has been edited by Borje Hagsten (edited May 15, 2001).]

    Leave a comment:

  • Tom Hanlin
    Easy enough to fix, now that we know about it. Please do remember to report any
    such issues so we can address them!

    Tom Hanlin
    PowerBASIC Staff

    Leave a comment:

  • Borje Hagsten
    Just remember that all common dialogs use localized titles. Sometimes
    "foreign" developers from exotic countries forget this that add their
    own titles, and suddenly all becomes totally wrong for the rest of us.

    PBedit is one - its Open/Save dialogs comes with strange (could be English?)
    titles, like "Open file", where it should say it in plain Swedish, "Öppna fil".
    Don't know what "Open file" means, so main reason why I had to write my own editor..


    Leave a comment:

  • Peter Scheutz
    hi scott

    here is a quick hack that works on a win98 se.

    it's based on :
    (by eric pearson)

    $dim all
    $register none
    $compile exe
    $include ""
    $include ""
    function hookproc(byval hdlg as long ,byval uimsg as dword,byval  wparam as long,byval  lparam as long) as dword
        select case uimsg
               case %wm_initdialog
                    setwindowtext hdlg,"this is my groovy caption"
        end select
    end function
    function pbmain as long
        dim colorspec as local choosecolorapi
        dim lresult   as local long
        dim lcounter  as local long
        dim lcustomcolor(15) as local long 'array
        colorspec.lstructsize  = len(colorspec)
        colorspec.hwndowner    = 0     'handle of owner window.  if 0, dialog appears at top/left.
        colorspec.lpcustcolors = varptr(lcustomcolor(0))
        colorspec.rgbresult    = 255   'set the default color to red (255,0,0)...
        colorspec.lpfnhook = codeptr(hookproc)
        'try these options one by one, for different effects...
        'colorspec.flags = colorspec.flags or %cc_rgbinit  'tells control to start at default color
        colorspec.flags = colorspec.flags or %cc_fullopen  or %cc_enablehook
        'colorspec.flags = colorspec.flags or %cc_preventfullopen
        'create a nice selection of colors for the custom colors (optional)...
        randomize timer
        for lcounter = 0 to 15
            lcustomcolor(lcounter) = rnd(0,16777215)  'or rgb(lcounter*16,0,(15-lcounter)*16)
        '(you could also load custom colors from a file, or hard-code them.)
        lresult = choosecolor(colorspec)
        if lresult = 0 then
            msgbox "you chose the cancel button.",,"color selection demo"
            msgbox "you chose color value &h"+hex$(colorspec.rgbresult,6),,"color selection demo"
        end if
        'you can also check then values in the lcustomcolor() array to see if they've been changed.
        function = 1
    end function

    best regards
    peter scheutz

    Leave a comment:

  • Scott Turchin
    started a topic Color picker dialog Title

    Color picker dialog Title

    Every once in a while things get a little slow up here and I get a little curious about how to do something....

    Those times are here

    As you know the color picker dialog box has a title already, it says "Color"..
    Blah, that's boring, I'd like to put a unique title so the user knows WhICH color they are picking for...

    Alas there is no option in the api:

        lStructSize    As Dword
        hwndOwner      As Long
        hInstance      As Long
        rgbResult      As Dword
        lpCustColors   As Dword Ptr
        Flags          As Dword
        lCustData      As Long
        lpfnHook       As Dword
        lpTemplateName As Asciiz Ptr
    End Type