Hi Folks, This is my first question to the group, so hopefully I will provide all the required information.
I'm attempting to build a small programmer interface for Win32 using gcc under cygwin. Along with gcc, I have been using gdb running under ddd for symbolic debugging. The application is to be based on a dialog box (form) type and so far, I have put in some pushbuttons and a couple of combobox dropdown lists using the resource file: #include "windows.h" #include "resource.h" IDD_MYDIALOG DIALOG 6, 21, 153, 88 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Programmer" FONT 8, "Arial" BEGIN DEFPUSHBUTTON "FILE LOAD", ID_FILE_OPEN, 3, 2, 70, 14, WS_TABSTOP DEFPUSHBUTTON "PROGRAM", ID_PROGRAM, 3, 19, 70, 14, WS_TABSTOP DEFPUSHBUTTON "VERIFY", ID_VERIFY, 3, 36, 70, 14, WS_TABSTOP DEFPUSHBUTTON "BLANK CHECK", ID_BLANK, 3, 53, 70, 14, WS_TABSTOP DEFPUSHBUTTON "QUIT", ID_QUIT, 3, 70, 70, 14, WS_TABSTOP COMBOBOX ID_PORT, 78, 2, 70, 14, CBS_DROPDOWN | WS_TABSTOP COMBOBOX ID_DEVICE, 78, 15, 70, 14, CBS_DROPDOWN | WS_TABSTOP LTEXT "Select File to Download into MCU", ID_STATUS, 78, 28, 70, 56, WS_BORDER END To Update the "ID_PORT" comboboxes, I use the following WM_INITDIALOG code: SendMessage(hdlgPortListCtrl, CB_ADDSTRING, 0, (LPARAM)(LPCTSTR) TEXT("COM1:")); SendMessage(hdlgPortListCtrl, CB_ADDSTRING, 0, (LPARAM)(LPCTSTR) TEXT("COM2:")); SendMessage(hdlgPortListCtrl, CB_ADDSTRING, 0, (LPARAM)(LPCTSTR) TEXT("COM3:")); SendMessage(hdlgPortListCtrl, CB_SETCURSEL, 0, 0); The resource file and program file compile without any problems using the following two statements: windres Programmer.rc -O coff -o Programmer.res gcc -mwindows -mno-cygwin -g -o Programmer.exe Programmer.c Programmer.res -lgdi32 -luser32 When I click on the dropdown button on either one of the comboboxes, nothing happens unless I double click in which case the initial text is highlighted with a blinking cursor at the end. Along with this, when I press the "Tab" key, the focus does not change from button, or control to the next one. As I mention below, I have seen one instance of a problem with the combobox on the list but none on the list indicate the issues with the problem with tabbing. To try and find the problem, I ran the resource file through Microsoft's rc.exe and attempted to bind it to a compiled version of "Programmer.c" (using the same gcc statement above with "Programmer.res" removed) using rsrc but I end up with a "Checksum Field != 0" error (which I can't find any explanation of). I did a bit level compare on the windres produced .res file and the rc produced .res file and found that in one of the combobox controls (ID_DEVICE), the bit pattern was different: rc: da 07 ff ff 85 00 00 00 00 00 00 00 00 00 82 50 00 00 00 00 4e 00 1c 00 46 00 38 00 windres: da 07 ff ff 85 00 00 00 00 00 00 00 00 00 80 50 00 00 00 00 4e 00 1c 00 46 00 38 00 The ID_PORT combobox control's bit pattern was identical between the two versions. I changed the corresponding windres .res file to the Microsoft rc .res file and re-ran the gcc statement above with no difference. I've just updated my tools to the latest levels from cygwin.com and when I check the versions of windres and gcc, I get: $ windres --version GNU windres 2.14.90 20030901 Copyright 2002 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License. This program has absolutely no warranty. $ gcc --version gcc (GCC) 3.3.1 (cygming special) Copyright (C) 2003 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Looking through the archives, I've noticed that Danny Smith, earlier this year, has encountered a problem and a potential patch for the windres processing the combobox under the thread: "Fix a windres (rcparse.y) parsing bug for controls without text fields" Hopefully somebody can either: 1. Tell me this is a problem with windres 2. Point out what I am doing wrong 3. Explain what I'm doing wrong with rc.exe so I can dispense with windres altogether so I can stop tearing my hair out. Thanx for your consideration and help! myke -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/