|
Nothing shows on the progress bar. I get only this and nothing else.
karuuzo
|
|
|
|
|
I uploaded a working sample at MarqueeTest.zip (6.2 KB)
cheers,
AR
When the wise (person) points at the moon the fool looks at the finger (Chinese proverb)
|
|
|
|
|
I try on another computer, yes - it works, but on my - no
Looks-like there are problem with my computer. I using Crystal Clear visual theme, may be this is a problem?
Thanks for all, I try do something my self.
karuuzo
|
|
|
|
|
karuuzo wrote: Looks-like there are problem with my computer. I using Crystal Clear visual theme, may be this is a problem?
Sure it's not a WTL or Windows problem
AR
When the wise (person) points at the moon the fool looks at the finger (Chinese proverb)
|
|
|
|
|
In your original post you showed the following line of code:
::SendMessage(GetDlgItem (IDC_PROGRESS), PBM_SETMARQUEE, (WPARAM) 1, (LPARAM) 100);
so I presume your SetMarquee() method does something similar. The LPARAM value in this call affects the speed of the marquee display: the higher the value the slower the marquee. Try setting it to zero for the default behaviour.
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
CProgressBarCtrl::SetMarquee from atlctrls.h (WTL):
BOOL SetMarquee(BOOL bMarquee, UINT uUpdateTime = 0U)
{
ATLASSERT(::IsWindow(m_hWnd));
return (BOOL)::SendMessage(m_hWnd, PBM_SETMARQUEE, (WPARAM)bMarquee, (LPARAM)uUpdateTime);
}
Default is 0L
karuuzo
|
|
|
|
|
So, is it working yet or not?
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
Yes. I change Windows theme to "Windows XP style" and progress bar start working.
karuuzo
|
|
|
|
|
Guys,
Iam a Fresher looking to build a project on my own as a open source. I want some tools informations which are like ProcessMonitor kind of, can any one let me know about the more tools available in C++/VC++.. Thanks in Advance.
Iam almost trying for microsoft Internship Please help me .... Please..
|
|
|
|
|
There are a couple of tools that hang out in the Back Room...
L u n a t i c F r i n g e
|
|
|
|
|
Get a copy of whole tomato visual assist, it is worth if you're on C++.
|
|
|
|
|
I'm trying to create a pop up list box to display some drawing line styles which are stored in an XML file. I want to display the line and then the name of the style (i.e., the items have strings).
So I derived a class from CListBox, added in some sizing code and the relevant DrawItem function, and dynamically CreateEx'd this to popup off a button in my test dialog app.
However, I'm not getting any owner-draw messages to my popup - it's blank! If I take off the LBS_OWNERDRAWFIXED|LBS_HASSTRINGS style the popup is correctly populated with the style name strings. I added an owner-draw list box to the dialog and re-classified it to use my listbox class, and barring some item sizing issues it draws the items the way I want them drawn.
So what am I not appreciating about the dynamically created version? Where are is WM_DRAWITEM messages going?
Cheers!
|
|
|
|
|
I can sort of make this work, by putting the owner-draw list box 'full-screen' on a borderless dialog (ick!) and then positioning that. But then I run into problems dismissing the dialog when the user clicks off it, and sorting out where the messages go. It would be nicer and neater if the dynamic way worked...
|
|
|
|
|
Hi,
I need to customize a CMFCPropertyGrid such that be able to display a simple button inside.
when user selects given grid, user can press button inside and then a dialog box will be displayed!
exactly like Folder dialog box.
how can i do this?
best regards
|
|
|
|
|
Can you pls help to How to associate CMap key value to CComboBox MFC
Thanks in advance.
|
|
|
|
|
its not possible to store CComboBox objects into CMap or CList since copy constructor for CComboBox is not available. However you may do it as,
CMap<int, int, CComboBox*, CComboBox*> m_map;
sample to store data
CComboBox *pBox = new CComboBox();
CRect rc(0, 0, 100, 50);
UINT nId = 100;
pBox->Create(SW_HIDE, rc, this, nId);
m_map[m_id] = pBox;
modified on Monday, September 27, 2010 11:24 PM
|
|
|
|
|
May be I did not put my question correctly.
let me put it like this.... I have a CMap
CMap<CString,LPCSTR,CString,CString&> map;
with <key1, value1="">,<key2, Value2>......
I have a combo box cmb, now I want to do some thing like
for(int j=0;j<map.GetCount();j++)
{
cmb.AddString(map[i]);
}
and now the combo should contina key1, key2.key3......
|
|
|
|
|
can't u do like
POSITION pos = map.GetStartPosition();
CString csKey, csValue;
while(pos)
{
map.GetNextAssoc(pos, csKey, csValue);
cmb.AddString(csKey);
}
|
|
|
|
|
I worked, thank you.... but was more worried about the the key value that need to be passed.
But passing the dummy key value as per ur advice worked.
Thanks
|
|
|
|
|
if you don't need values, i mean only keys, why don't you use classes like CStringArray or CList instead of CMap for that purpose?
Have a look at CComboBox::SetItemData() and GetItemData(), using which u can map a value (which can be an index or pointer to a structure or anything) to each item added to combo box.
|
|
|
|
|
Well I mean, I dont need values to fill the combo. later in business logic I need to pick the associated value on SelectCombo depending on value selected, so i need a map
|
|
|
|
|
Ya I got your point, I am using as below
// setting
while( pos )
{
appConfig.m_map.GetNextAssoc(pos, strKey, strValue);
cmb.AddString(strKey);
appConfig.m_map.Lookup( strKey, strValue );
cmb.SetItemData(iCount,(DWORD)(LPCTSTR)strValue );
iCount++;
}
temp = cmb.GetItemData( index );
CString str= (CString *) temp;
but I was unable to get the stored vaule, getting 0 in temp. can you please help me
|
|
|
|
|
strValue is just a local variable, and changing inside the loop too. No meaning in storing its address as combo box item's data.
You are keeping key-value pair in combo box, so you can get the value any time by calling
CString strKey;
cmb.GetLBText( index, strKey );
CString strValue;
appConfig.m_map.Lookup( strKey, strValue );
//got strValur
isn't it enough?
|
|
|
|
|
ok I reverted back to my code again, Thanks for your help
|
|
|
|
|
hello, i'm having a hard time figuring out how to insert a character/string on my CFile,
i have no problem writing the character set at the end or at the beginning of the file, but when i try to add it in between, it overwrites the file.
Example:
i have "JON SMITH" on my file, when i try to insert "H" at index 2, it should look like this "JOHN SMITH", but what happens is this "JOH SMITH" it overwrites, it does not insert.
here is my code
CString txtInsert;
m_txtInsert.GetWindowText(txtInsert);
int szSize = txtInsert.GetLength();
if (!cfile_object.Open(l_ExePath + "Logs\\cfile_example.txt", CFile::modeWrite))
{
AfxMessageBox(_T("Cannot Open File for Reading!\nPls. Check Directory of File!"));
}
else
{
cfile_object.Seek( 2, CFile::begin );
cfile_object.Write(txtInsert, szSize);
cfile_object.Close();
i needed to type "H SMITH" just to get the result "JOHN SMITH" but all i want is the insert the character "H" on the right place..
any help or hints will be much appreciated, thankyou
|
|
|
|