|
Oh, I'm sorry! I only removed the other variables from the code presented to you, to make it more readable!
"Time to give a Newtonian demonstration,
of a bullet, its mass and its acceleration."
-Stephen Hawking the gangsta rapper
|
|
|
|
|
How to determine whether a nontopmost window is at the top of all nontopmost windows?
|
|
|
|
|
Anybody know how to format and print the content of a list control??
Please help me
Proper Planning is way to success
|
|
|
|
|
|
Any other simpler way to do it??
for example, by having 1 class and few functions.
Proper Planning is way to success
|
|
|
|
|
Hi, does anyone know what theme name and parts i need to draw a themed toolbar bg?
im currently making my own toolbar , and i can draw the themed buttons and separators but i dont know the name and part id's i need to draw the bg with the drawthemedbackground api..
//Roger
|
|
|
|
|
I have inherited my controller from a CListCtrl. But I want to change so the double click message is not sent. I want the OnLButtonDown message to always be sent. Don’t want any double click.
From want I understand is I need to remove the CS_DBLCLKS from window class style that is registered.
How do I do that ? or should it not be changed since it’s a standard controller.? Should I register and use a new class info? how do I do that from an inherited class ?
/Mathias
|
|
|
|
|
I'm not sure, if I understood you properly, but I guess that you should do something like this:
1. Run ClassWizard.
2. Go to Message Maps tab.
3. Choose your class (on the left-hand side).
4. Find WM_LBUTTONDBLCLK (on the right-hand side).
5. Hit Add Function and then Edit Code.
6. Remove (e.g. comment out) standard message handler and, if you want to, add your own (e.g. a message box saying that double clicks are disabled).
void CTest::OnLButtonDblClk(UINT nFlags, CPoint point)
{
AfxMessageBox("Double clicks are disabled.");
}
Let me know if this was helpful.
"Gods die, when their believers are gone." --from Sandman by Neil Gaiman
|
|
|
|
|
No. the Double click event from windows is still sent to the applications.
so when i click too fast, I only get 1 respone to OnLButtonDown() insted of 2.
the problem is that the window class has the CS_DBLCLKS flag set. and this
tell the OS that this windows should recive the double click event.
So I need to remove that.
AND i just found the solution. after searching the net for some hours.
this worked.
BOOL CMyListCtrl::Create( DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID)
{
if( CListCtrl::Create(dwStyle, rect, pParentWnd, nID) )
{
DWORD dwStyle = GetClassLong( GetSafeHwnd(), GCL_STYLE);
SetClassLong( GetSafeHwnd(), GCL_STYLE, (dwStyle ^ CS_DBLCLKS) );
return TRUE;
}
return FALSE;
}
/Mathias
|
|
|
|
|
Try the PreTranslateMesssage event handler.
[MODIFIED]I guess you have found your solution and it even far more better. Glad it works out that way and I have learned. [/MODIFIED]
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
:|how can i get the text from CComboBox i has input?
|
|
|
|
|
int iIndex = -1;
iIndex = MyCombobox.GetCurSel();
CString strText;
MyCombobox.GetLBText(iIndex, strText);
Er zit een korstje op mijn aars.
|
|
|
|
|
hi,sorry,
MyCombobox's data is empty,the data
i has input is not belone Mycombobox,
GetLBText() will cause a error;
the data i has input is the exe run
|
|
|
|
|
well..'MyCombobox' is just a test name (i made it up), you gotta replace it with a CComboBox instance that represents the combobox you want to read the text from.
Er zit een korstje op mijn aars.
|
|
|
|
|
I know,
my question is :
i can't get the text in CComboBox that i input when the program is run
(CComboBox m_DBName);
int index=-1;
index=m_DBName.GetCurSel();
//if i input "sdfs",the next cause a error
str=m_DBName.GetCurrentText();
|
|
|
|
|
replace "str=m_DBName.GetCurrentText()" with
CString str;
m_DBName.GetLBText(index, str);
"str" should now contains the text in the combobox.
Note: verify that 'index' contains the right index in the combobox.
Er zit een korstje op mijn aars.
|
|
|
|
|
hi,sorry,
MyCombobox's data is empty,the data
i has input is not belone Mycombobox,
GetLBText() will cause a error;
the data i has input is the exe running
|
|
|
|
|
Take a look at GetWindowText. It should do it !
|
|
|
|
|
the function GetWindowText Can't use ,CComboBox modify it
|
|
|
|
|
I need to join to RTF files ( generated by WORD 2000 ) into one.
But when I do that ( clearing "}" on the end if first and "{"
on the start on second.
That works but I lost EastEroupean characters from second file.
Any solution for my problem ?
|
|
|
|
|
Trying using paste instead of doing it thru strings. The problem is that both RTF's have headers. Doing it with strings would mean you'd have to parse the headers and merge the data between the two. Another way would be to create an invisible RTF control and stream both RTF strings into it. The RTF control is pretty smart about such things.
--
Joel Lucsy
|
|
|
|
|
Thanks. I try to use RTF control.
|
|
|
|
|
Hi
I have a simple application and, I have the data in some arrays.
If I want to write these data to an Excel file what should I do.
I can easily write them to a text file....but is it possible to write it to an Excel file without using MFC?
|
|
|
|
|
you can make the output go into a *.csv file, a comma seperated value file, which can easily be imported into excell.
*.*
cin >> knowledge;
|
|
|
|
|
ok thanks I tried to make a .CSV file and it opens in Excel format the only problem is that the file does not look good. All of the output in in One Cell.
if I want to have
something in A1 and the next thing in B1 what should I do.
right not it does not undrestand that Tab means going to the next column!
|
|
|
|