|
I can't see anything - no column, no item
|
|
|
|
|
The only other thing I can suggest is to check the return values from GetDlgItem() and SendMessage() . Also make sure that the IDC_EVENT_LIST control has the LVS_REPORT style.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
DavidCrow wrote: Also make sure that the IDC_EVENT_LIST control has the LVS_REPORT style.
Well if the Insert works you should still see the item regardless of the View Style
led mike
|
|
|
|
|
led mike wrote: Well if the Insert works you should still see the item regardless of the View Style
True, I was just dotting all the Is and crossing all the Ts. Sometimes it helps just to get the obvious things out of the way, rather than chasing rabbits unnecessarily.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Are any of those SendMessage() calls failing? Check your return values.
You probably just need to set a non-zero width for that column.
|
|
|
|
|
This worked in VS 2003, but I cant seem to understand what is going wrong here. I am trying to specify all the fields in a message, 1 bit 14 bits etc. But the size is wrong
This structure should have a size of 20 bytes, but during debugging its 22 bytes with I ceck its length, Why?
#pragma pack(1)
typedef struct{
unsigned long a1_t04_word_0_reserved_133_0 : 1;
unsigned long a1_t04_word_0_spare_134_1 : 1;
unsigned long a1_t04_word_0_mrk_typ_status : 1;
unsigned long a1_t04_word_0_sq_g_status : 1;
unsigned long a1_t04_word_0_sq_lev_g_status : 4;
unsigned long a1_t04_word_0_vol_grx_status : 4;
unsigned long a1_t04_word_0_marker_vol_status : 4;
unsigned long a1_t04_word_1_vol_max_status : 4;
unsigned long a1_t04_word_1_sidvol_status : 4;
unsigned long a1_t04_word_1_clp_status : 2;
unsigned long a1_t04_word_1_saturn_relay_enable_status : 1;
unsigned long a1_t04_word_1_agc_status : 1;
unsigned long a1_t04_word_1_sq_lev_m_status : 4;
unsigned long a1_t04_word_2_mod_depth_status : 4;
unsigned long a1_t04_word_2_srq_cfg_status : 2;
unsigned long a1_t04_word_2_reserved_144_5 : 10;
unsigned short a1_t04_word_3_reserved_148_0;
unsigned long a1_t04_word_4_reserved_152_0 : 6;
unsigned long a1_t04_word_4_af_in_lv_status : 6;
unsigned long a1_t04_word_4_pset_sel_status : 4;
unsigned long a1_t04_word_5_err_vol_status : 4;
unsigned long a1_t04_word_5_spare_156_4 : 1;
unsigned long a1_t04_word_5_err_beep_status : 3;
unsigned long a1_t04_word_5_reserved_154_7 : 8;
unsigned long a1_t04_word_6_reserved_159_0 : 8;
unsigned long a1_t04_word_6_reserved_160_8 : 8;
unsigned long a1_t04_word_7_hold_time_status : 4;
unsigned long a1_t04_word_7_scan_time_status : 4;
unsigned long a1_t04_word_7_reserved_163_8 : 1;
unsigned long a1_t04_word_7_7_bit_pad_162_9 : 7;
unsigned long a1_t04_word_8_spare_170_0 : 10;
unsigned long a1_t04_word_8_reserved_169_10 : 4;
unsigned long a1_t04_word_8_time_master_slave_status : 2;
unsigned long a1_t04_word_9_spare_176_0 : 12;
unsigned long a1_t04_word_9_reserved_175_12 : 1;
unsigned long a1_t04_word_9_sat_ext_pre_status : 1;
unsigned long a1_t04_word_9_sat_prem_ptt_status : 1;
unsigned long a1_t04_word_9_sat_atec_trsp_status : 1;
}a1_VUHF1_T04;
#pragma pack(0)
|
|
|
|
|
I think you are confusing bit and byte
|
|
|
|
|
I am trying to define a structure such that its not padded out to the nearest byte.
I did think that the directive #pragma pack(1) meant that across a 32 bit (4 byte) boundry all the bits are used.
e.g.
#pragma pack(1)
typedef struct{
unsigned long a1_t12_word_0_block_label : 12;
unsigned long a1_t12_word_0_spare_825_12 : 2;
unsigned long a1_t12_word_0_hset_ld_succ : 2;
unsigned long a1_t12_word_1_hqi_a_net : 8;
unsigned long a1_t12_word_1_hqi_b_net : 8;
unsigned long a1_t12_word_2_hqii_no : 8;
unsigned long a1_t12_word_2_hqii_non_no : 8;
unsigned long a1_t12_word_3_hqii_fmt1 : 8;
unsigned long a1_t12_word_3_hqii_fmt2 : 8;
unsigned long a1_t12_word_4_hqii_fmt3 : 8;
unsigned long a1_t12_word_4_hqii_fmt4 : 8;
unsigned long a1_t12_word_5_hqii_fmt5 : 8;
unsigned long a1_t12_word_5_hqii_fmt6 : 8;
unsigned long a1_t12_word_6_urn_no : 8;
unsigned long a1_t12_word_6_urn_non_no : 8;
unsigned long a1_t12_word_7_urn_t40_no : 8;
unsigned long a1_t12_word_7_urn_t40_non_no : 8;
unsigned long a1_t12_word_8_hqii_fmt7 : 8;
unsigned long a1_t12_word_8_hqii_fmt8 : 8;
}a1_VUHF1_T12;
The size of this structure turns out to be 20 bytes. It should be 18 bytes, how can I get it to be 18 bytes?
|
|
|
|
|
If you don't need to be ANSI C, Microsoft C lets you use unsigned short (char too). That should
get you your two-byte alignment, no?
Mark
|
|
|
|
|
Thanks Mark, that works fine.
But would like to understand why in VS 2003 unsigned long worked, but with VS 2005 I have to change to unsigned short.
Many thanks,
Andy.
|
|
|
|
|
Thanks for your help at first!
Now I'm confusing about the directions which I should choose!
I'm a senior student and have some experieces about C++ language.
Recently Micorsoft produces the Visual Studio 2005,and the C++/CLI is extremely diffrent from the standard C++.And I also learned that the MFC is numbered her days! When I want to learn the Visaul Studio 2005 development,Which direction will be my best choice.C# OR Visual C++.NET?
And could you recommend some wonderful books that will lead me comfortable to the world of Visual Studio 2005(I have no experieces in windows programming!).
|
|
|
|
|
wanlim0817 wrote: And I also learned that the MFC is numbered her days!
Gotta love the rumor mill!
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
DavidCrow:
I really think you are a expert on the subject of the visual C++ and the technology about the microsoft.I'm a tenderfoot about programming.I'm eager to get your help.Would you give me a detail specification that I should choose C# OR Visual C++ 2005?I will appreciate you very much for your help!
|
|
|
|
|
wanlim0817 wrote: Would you give me a detail specification that I should choose C# OR Visual C++ 2005?
No, because I've not used either of them.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Are you using the Viusal C++6.0? If you are good at her.Could you introduce some advantges and the yields of her domaining?
|
|
|
|
|
wanlim0817 wrote: Are you using the Viusal C++6.0?
Yes, exclusively.
wanlim0817 wrote: If you are good at her.
My copy is gender-neutral.
wanlim0817 wrote: Could you introduce some advantges...
Compared to what? It's 8-12 year-old technology so comparing it to a 1-2 year-old tool is hardly fair.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Friends,
I want to enumerate all the files of extension *.mp3 in a certain folder. The folder may contains subfolders and more subfolders inside subfolders. What i want is that i enumerate files upto certain "depth" of subfolders in the given folder. How can i do so ?
Imtiaz
|
|
|
|
|
Imtiaz Murtaza wrote: I want to enumerate all the files of extension *.mp3 in a certain folder.
If you are using MFC, use the CFileFind class. Otherwise, use the FindFirstFile ()/FindNextFile () pair.
Imtiaz Murtaza wrote: What i want is that i enumerate files upto certain "depth" of subfolders in the given folder. How can i do so ?
This can easily be handled via recursion.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I have just begin with VC++, Can any body help me use MS FlexGrid control? In my lab session I use Grid to add the location of Mouse (x, y) in Dialogbase. Many thanks for your help
|
|
|
|
|
It will be very difficult to help you if you don't provide any information. What are you trying to do and where are you stuck exactly ?
|
|
|
|
|
Next time, I suggest you use a more descriptive title than "help".
The title should say what you want help with - "Help using MS FlexGrid" or something like that.
|
|
|
|
|
Can any body help me use MS FlexGrid
|
|
|
|
|
Hello,
is there any funktion to convert a current time to CString?
regards
break;
|
|
|
|
|
Hi,
this is my try:
<code>
CTime t = CTime::GetCurrentTime();
CString csTime;
csTime.Format("%d:%d:%d", t.GetYear(), t.GetMonth(), t.GetDay());
</code>
thanx
break;
|
|
|
|
|
There are also formatting functions directly in the CTime class.
|
|
|
|