|
Okay, never mind. Constructing the LVFINDINFO object takes some time so EnumChildWindows takes longer time to complete. So I added a Sleep(10) after EnumChildWindows call to make it happy.
Maxwell Chen
|
|
|
|
|
Maxwell Chen wrote: pMain->m_pListView = CWnd::FromHandle(hwnd);
Since CWnd::FromHandle documentation [^] states:
The pointer may be temporary and should not be stored for later use.
I would use instead something like
pMain->m_hListView = hwnd;
and then obtain the CWnd pointer inside the CMainDlg::OnBnClickedGetDolby body.
Anyway I really don't know if it would help.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
CPallini wrote: pMain->m_hListView = hwnd;
Thanks! It resolved the timing problem.
Maxwell Chen
|
|
|
|
|
Hello im trying to Detect when the Delete key is pressed it works also but it also works when i press . can someone tell me why this happens
|
|
|
|
|
Can at least someone tell me that this is not possible
|
|
|
|
|
The delete and period keys have different VK_XXX values, VK_DELETE and VK_DECIMAL .
Are you getting the same values on the numeric key pad with the Num Lock key set to ON and OFF?
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
The Method is PreTranslateMessage
and im doing this
if(pMsg->wParam == VK_DELETE)
{
Clear Label
}
And it happens when i press the period Key meaning the button besides , and - second after m
and the num Lock is actiavated
|
|
|
|
|
Are you checking if (pMsg->message == WM_KEYDOWN) before checking for VK_DELETE ?
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
yes im doing that also and its really weird i thought something like this can never happen
|
|
|
|
|
When the numlock is turned off, the . key becomes the delete key and 4, 6, 2 and 8 keys in the numpad becomes arrow keys. Turn numlock on and see what happens while pressing the . key.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
its not the numlock key that calls my Function its the . key [:] key the key besides m
meaning it comes like this
zxcvbnm, . - and the point key is the problem
|
|
|
|
|
Hi
As a rather novis VisualStudio CPP user, I have the need to change the text on a push button that was created using the Resource View editor. I imagine the text can be changed using SetWindowText or something similar, but then a handler to the button is needed. How can I obtain that handler, when I have not created the button myself in my program?
Lars
|
|
|
|
|
lmflho wrote: How can I obtain that handler, when I have not created the button myself in my program?
By using GetDlgItem()[^]
Nuri Ismail
|
|
|
|
|
Use GetDlgItem [^] function.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi,
two guys answering with the speed of light!
Thanks a lot, the code works nicely now!
Lars
|
|
|
|
|
lmflho wrote: I have the need to change the text on a push button...
At design time or run time?
lmflho wrote: How can I obtain that handler, when I have not created the button myself in my program?
You need to create a CButton member control variable. If you are using VS6, use ClassWizard (Ctrl+W). If you are using VS20xx, right-click the control and select Add Variable from the context menu. Now just use the SetWindowText() method of the member control variable.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi David,
and thanks for giving your attention to my little problem.
The problem is already solved (see other answers), I am now
able to change the button text in runtime
BR/Lars
|
|
|
|
|
lmflho wrote: The problem is already solved (see other answers)...
See here for more on that particular subject.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi David,
thanks for your suggested further reading. For now, it is quite a bit beyond
my horizon, but if I ever get more experienced in windows programming, I will
take a closer look at the article.
BR/Lars
|
|
|
|
|
Hi to all,
I need to make use of tab control on my dialog.
I have done in VB. But in VC6, I have no idea how to do it. Even How do I edit one tab.
Basically I need 2 tab page on the tab control.
Please help me.
-----------------------------
I am a beginner
modified on Thursday, September 24, 2009 6:05 AM
|
|
|
|
|
See here.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
See rather all MSDN samples about Tab contol (dozens in SDK, KB, doc, etc)
|
|
|
|
|
Hi to all,
I want to use datagrid in MFC. (VC6)
But I am not able to see the control in control box.Please help me how to do it.
Do I have to make use of some activeX or the control is available in VC6 itself
-----------------------------
I am a beginner
modified on Thursday, September 24, 2009 6:05 AM
|
|
|
|
|
Is CListView removed from Visual Studio 2005 Pro? When I was going to use it in a MFC project, I got the error:
error C2065: 'CListView' : undeclared identifier
Maxwell Chen
|
|
|
|
|
It should be still there, see [^]. Have a look at 'Requirements' section too.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|