Author Topic: DDgui_set without DDgui_pushdialog  (Read 3562 times)

Offline Julian

  • Mc. Print
  • *
  • Posts: 23
    • View Profile
DDgui_set without DDgui_pushdialog
« on: 2012-Oct-16 »
I am using DDGui only for some specific parts of my application. That means that I sometimes use DDgui_msg() without an actual Dialog. The problem is that I can't set the color scheme without one. When I try to call for example DDgui_set("","COL_NORM",RGB(0,0,0)) the program just crashes. I know I could "hardcode" the colors but thats not a nice solution. Is there another way?

MrTAToad

  • Guest
Re: DDgui_set without DDgui_pushdialog
« Reply #1 on: 2012-Oct-18 »
It will crash without a dialog window due to there being nothing on the stack that it uses.   Probably the only way to do overwrite it would be to call ddgui_init and use ddgui_set after it is called.

Or perhaps even easier - modify ddgui_msg to call the "COL_xxx" set of commands inside the function.

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10656
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
DDgui_set without DDgui_pushdialog
« Reply #2 on: 2012-Oct-18 »
The colxxx are global variables, no?

MrTAToad

  • Guest
Re: DDgui_set without DDgui_pushdialog
« Reply #3 on: 2012-Oct-19 »
They are in a TYPE, which is used by a global array!