Jump to content

Omertron

Members
  • Posts

    5
  • Joined

  • Last visited

Omertron's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Yes, there is a DLLCall to "uxtheme.dll" for the styling of the check boxes, but again, that's only called with a button press and not clicking on the GUI. Thanks for the help and pointers so far, I think I'm going to approach this from a different direction and re-code the language selection
  2. As I said, none of those controls have any code in that GUI loop at all, they are display controls only. I was trying to keep the code relevant, but obviously cut too much out. Here's the GUI Window code: Func drawMainWindow() Dim $lGuiStartTop = 200 ; Create the main GUI $mWindow = GUICreate($mTitle, $mWidth, $mHeight, $mLeft, $mTop, $WS_CAPTION) GUISetBkColor($COL_BLACK, $mWindow) GUICtrlSetDefColor($COL_WHITE) ; Create the language list GUICtrlCreateLabel($LANG[45] & ":", 10, $lGuiStartTop, 150) $lGuiStartTop = $lGuiStartTop + 20 $LANG_COMBO = GUICtrlCreateCombo("", 10, $lGuiStartTop, -1, -1, $CBS_DROPDOWNLIST) GUICtrlSetData(-1, $mLanguageList, $mLanguage) ;GUICtrlCreateGroup("Languages", 10, $lGuiStartTop, $mWidth - 20, 150) $lGuiStartTop = $lGuiStartTop + 30 ; Create the PC location control including the directory search button GUICtrlCreateLabel($LANG[8] & ":", 10, $lGuiStartTop, $mWidth - 130) GUICtrlSetColor(-1, $COL_WHITE) $VIDEO_BTN = GUICtrlCreateButton($LANG[9], $mWidth - 110, $lGuiStartTop + 3, 100, 38) GUICtrlSetColor(-1, $COL_BLACK) $lGuiStartTop = $lGuiStartTop + 20; $VIDEO_DIR = GUICtrlCreateInput("C:\", 10, $lGuiStartTop, $mWidth - 130, 20) $lGuiStartTop = $lGuiStartTop + 25; GUICtrlSetColor(-1, $COL_BLACK) GUICtrlSetTip(-1, $LANG[10]) ; Jukebox Output Directory GUICtrlCreateLabel($LANG[11] & ":", 10, $lGuiStartTop, $mWidth - 130) GUICtrlSetColor(-1, $COL_WHITE) $lGuiStartTop = $lGuiStartTop + 20 $JUKEBOX_DIR = GUICtrlCreateInput($LANG[12], 10, $lGuiStartTop, $mWidth - 130, 20, $ES_READONLY) GUICtrlSetColor(-1, $COL_BLACK) $lGuiStartTop = $lGuiStartTop + 30 ; Shortcut check boxes XPStyleToggle(1) GUICtrlCreateGroup($LANG[13], 10, $lGuiStartTop, $mWidth - 130, 60) GUICtrlSetColor(-1, $COL_WHITE) $lGuiStartTop = $lGuiStartTop + 15 $CHK_SHORTCUT = GUICtrlCreateCheckbox($LANG[13], 20, $lGuiStartTop, $mWidth - 160, 20) GUICtrlSetColor($CHK_SHORTCUT, $COL_WHITE) GUICtrlSetState($CHK_SHORTCUT, $GUI_CHECKED) $lGuiStartTop = $lGuiStartTop + 20 $CHK_DESKTOP = GUICtrlCreateCheckbox($LANG[16], 20, $lGuiStartTop, $mWidth - 160, 20) GUICtrlSetColor($CHK_DESKTOP, $COL_WHITE) GUICtrlSetState($CHK_DESKTOP, $GUI_CHECKED) XPStyleToggle(0) $lGuiStartTop = $lGuiStartTop + 35 ; Create the SAVE button $SAVE_BTN = GUICtrlCreateButton($LANG[16], 10, $lGuiStartTop, 100) GUICtrlSetColor($SAVE_BTN, $COL_BLACK) setButtonSave(False) GUICtrlSetTip($SAVE_BTN, $LANG[17]) ; Create the RUN button $RUN_BTN = GUICtrlCreateButton($LANG[18], ($mWidth / 2) - 50, $lGuiStartTop, 100) If StringLen($gACRJukeboxLocation) > 0 Then setButtonRun(True) Else setButtonRun(False) EndIf GUICtrlSetTip($RUN_BTN, $LANG[20]) GUICtrlSetColor(-1, $COL_BLACK) ; Create the EXIT button $EXIT_BTN = GUICtrlCreateButton($LANG[20], $mWidth - 110, $lGuiStartTop, 100) GUICtrlSetTip(-1, $LANG[21]) GUICtrlSetColor(-1, $COL_BLACK) $lGuiStartTop = $lGuiStartTop + 35 EndFunc ;==>drawMainWindow This is the code for the GUIMsg loop ; Run the GUI until the dialog is closed While True $MSG = GUIGetMsg() Select Case $MSG = $SAVE_BTN librarySave(GUICtrlRead($VIDEO_DIR), GUICtrlRead($JUKEBOX_DIR)) setButtonRun(True) Case $MSG = $RUN_BTN runMovieJukebox() Case $MSG = $VIDEO_BTN setScanDir(True) GUICtrlSetData($JUKEBOX_DIR, calculatePath(GUICtrlRead($VIDEO_DIR))) Case $MSG = $LANG_COMBO $mLanguage = GUICtrlRead($LANG_COMBO) setLanguage($mLanguage) readLanguage() drawMainWindow() Case $MSG = $GUI_EVENT_CLOSE Or $MSG = $EXIT_BTN Exit EndSelect WEnd When, for example the $VIDEO_DIR is clicked on, nothing else, just clicked on, then the ComboBox is blanked. There is no code associated with that control (when you click it) it's triggered from the $VIDEO_BTN. This only seems to happen on Windows XP 32Bit, I've tried the same code on Windows 7 64Bit and it seems to work fine.
  3. Yeah, I figured that would be the case, but I was hoping that it wasn't line #2926. The problem is figuring out what code is relevant, it's not a large program, but it's 1,000 lines long. Here's where I create the combo box and the text box. $LANG_COMBO = GUICtrlCreateCombo("", 10, 100, -1, -1, $CBS_DROPDOWNLIST) GUICtrlSetData(-1, $mLanguageList, $mLanguage) GUICtrlCreateLabel("Dir:", 10, 130, 130) $mLanguageList contains a "|" separated list of languages. Some lazy programming has meant that there's a "|" at the end of the list, but this shouldn't affect the display. $mLanguage is a default language, that is contained in the list. The cut down GetMsg loop (I've removed some button selections that all work and don't affect the combo box) looks like this: While True $MSG = GUIGetMsg() Select Case $MSG = $RUN_BTN runCommand() Case $MSG = $VIDEO_BTN setVideo(True) Case $MSG = $LANG_COMBO $mLanguage = GUICtrlRead($LANG_COMBO) setLanguage($mLanguage) readLanguage() drawMainWindow(True) Case $MSG = $GUI_EVENT_CLOSE Or $MSG = $EXIT_BTN Exit EndSelect WEnd setLanguage checks the language selected in the combo box and updates a couple of other variables (not used here) readLanguage reads a static text file with the lanugage translations in it. drawMainWindow(True) redraws the main window to use the loaded translations. None of the other controls are referenced in the While loop, but as soon as they are clicked on, then combo box clears itself.
  4. Hi, I have a combo box on a form to select a list of languages that are populated from an INI file. All good so far. However, during the main loop of the program, where I check for GUIGetMsg() events, if the user clicks on another control (such as a InputBox or a Label) the ComboBox selection is cleared (to blank) but the data is still there. It's an annoying UI bug that I'd like to get fixed, any idea of what may cause it?
  5. I get exactly the same issue on Windows 7. Did you find a workaround or fix?
×
×
  • Create New...