|
CTestDlg::CTestDlg(CWnd* pParent) : CDialog(CTestDlg::IDD, pParent)
{
m_hAccelTable = LoadAccelerators(AfxGetResourceHandle(), MAKEINTRESOURCE(IDR_ACCELERATOR1));
}
BOOL CTestDlg::PreTranslateMessage( LPMSG pMsg )
{
if (NULL != m_hAccelTable)
{
if (::TranslateAccelerator(m_hWnd, m_hAccelTable, pMsg))
return (TRUE);
}
return CDialog::PreTranslateMessage(pMsg);
}
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
|
I just completed an application for a company and they want a 30 day trial version made for demos.. can anyone point me in the right direction on how do add 30 day support? I have thought of looking at dates on files, creating reg keys etc.. but they want to make sure turning the clock back will not effect the time out. Any ideas?
Rob
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|
|
One thing you might do is to have your software quit after 30 minutes, 60 minutes of use. and always, always remove all save functionalities from your demo versions.
If you can't do that and want a full version with a 30 days limit, remove some functionalities, restrict/disable saving, ...
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
|
I'm going to give it a shot.. Found that a little earlier today, there is another one in that area too..
I'll give it a try, Thanks!
Rob
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|
|
Hi all,
I have a set of property pages on a property sheet. I am trying to add a page to the sheet and change the title, but the title does not change.
If I do:
//AddPage(thepage);
//SetActivePage(thepage);
SetWindowText("TEST");
CString strTest;
GetWindowText(strTest);
Then strTest is changed to "TEST" correctly, but the text does not show up on the control.
Am i missing something?
Thanks and Regards,
Simon
|
|
|
|
|
See if MSDN article Q141487 helps. There's also the CPropertyPage protected member, m_strCaption .
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Yes - the knowledge base article helped and I am now sorted.
Thanks very much,
Simon
|
|
|
|
|
SJolly wrote:
...and I am now sorted
I was not aware this was a sorting-related problem.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Sorry, my fault:
I am now titled.
Thanks again,
Simon
|
|
|
|
|
|
This is the situation:
ON_NOTIFY_EX(TTN_NEEDTEXT, 0, OnToolTipNotify )
EnableToolTips(TRUE); is the first statement in OnInitDialog
<br />
BOOL DlgFlexListFormatColumns::OnToolTipNotify(UINT id, NMHDR *pNMHDR, LRESULT *pResult){<br />
CString tooltiptext2display;<br />
tooltiptext2display = "";<br />
TOOLTIPTEXT *pTTT = (TOOLTIPTEXT *)pNMHDR; <br />
UINT nID = pNMHDR->idFrom;<br />
if (pTTT->uFlags & TTF_IDISHWND) {<br />
nID = ::GetDlgCtrlID((HWND)nID);<br />
switch(nID){<br />
case IDC_STATIC_LINESPERROW: tooltiptext2display.Format(IDS_LINESPERROW);<br />
break;<br />
case IDC_EDIT_NROFLINES: tooltiptext2display.Format(IDS_LINESPERROW);<br />
break;<br />
default:<br />
break;<br />
}
strcpy(pTTT->szText, tooltiptext2display);<br />
return(TRUE);<br />
}
else{ return FALSE; }
}
and in the header:
afx_msg BOOL OnToolTipNotify(UINT id, NMHDR *pNMHDR,LRESULT *pResult);<br />
QUESTION:
There is only 1 control in my dialog which catches (and thus shows) a tooltip. All the rest does nothing.
What did I do wrong?
tnx for your help...
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
V. wrote:
ON_NOTIFY_EX(TTN_NEEDTEXT, 0, OnToolTipNotify )
Change this to:
ON_NOTIFY_EX_RANGE(TTN_NEEDTEXTW, 0, 0xFFFF, OnToolTipNotify)
ON_NOTIFY_EX_RANGE(TTN_NEEDTEXTA, 0, 0xFFFF, OnToolTipNotify) V. wrote:
There is only 1 control in my dialog which catches (and thus shows) a tooltip.
Does that imply that OnToolTipNotify() is called only for that one control? Are the other controls obscured by anything, including a group box?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Well now you mention it: yes, they are all surrounded by a groupbox.
(that one control isn't surrounded)
I didn't know that that would be problem?
Why's that?
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
The group box control needs to be behind the other controls. Even though it appears as a skinny line surrounding the controls, it is actually obscuring them as far as tooltips are concerned. In the resource editor, change the tab order of the controls such that all the controls within the group come first.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hi,
tnx for your reply, but I'm afraid the changes didn't make any difference...
Oh well if it doesn't work, the boss must be happy without.;P
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
V. wrote:
Oh well if it doesn't work, the boss must be happy without
If you can trim the code down to something very small and still be able to reproduce it, feel free to send the project to me and I can take a look.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I see your point. If I make the Group box invisible, the tooltips appear.
However the three groupboxes in my dialog have the three last numbers of tabstop and the tooltips do not appear. (enabling or disabling the tabstop propetie does not help)
(why don't things ever go the easy way )
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
V. wrote:
If I make the Group box invisible, the tooltips appear.
There's no need to make it "invisible." Just ensure that it is behind all the other controls.
V. wrote:
However the three groupboxes in my dialog have the three last numbers of tabstop...
I don't quite understand this.
V. wrote:
(enabling or disabling the tabstop propetie does not help)
Again, not necessary.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hail everyone,
Let's say I have two classes, A and B, as well as two interface (abstract) classes for them, iA and iB. Class B derived from class A and interface iB, interface iB derived from iA, so we have,
class iA {
vitrual method AA
}
class A: public iA {
method AA
}
class iB: public iA {
vitrual method BB
}
class B: public A, public iB {
method BB
}
By doing this I want to be able to access methods of class B (and A in it) through interface iB, but, I can't do so. Compiler justly says "pure vitual function AA was not defined in B"
So, couls you please explain to me how this hierarchy should look like?
Thanks in advance, any suggestion would be helpful.
|
|
|
|
|
Because class B inherits from both class A and class iB , it has to deal with two different vtables. Therefore you need to provide method AA of class iA in both vtables and that is the source of the error message: the implementation for class iB is missing.
Just write a wrapper method AA in the class B , calling A ::AA ; this will redirect iB ::AA to A ::AA .
"though nothing
will keep us together
we can beat them
for ever and ever"
rechi
|
|
|
|
|
We are trying to capture ctrl + char keys from keyboard for the list control. We are not able to get good help. We even tried with lvn_keydown but not working. Is there a way to find the solution.
Thanks & Regards,
RK (HYD)
azghar
Live and Let live
|
|
|
|
|
Processing the LVN_KEYDOWN notification will work, I've tested it. You just need to check if ((LPNMLVKEYDOWN)lParam)->wVKey=='F' and then check the state of the control key, it is pressed when the test (GetKeyState(VK_CONTROL) >> (sizeof(SHORT)-1)) returns non-zero.
Systems AXIS Ltd - Software for Business ...
|
|
|
|
|
Override PreTranslateMessage
if(pMsg->hwnd == m_List.GetSafeHwnd())<br />
{<br />
SHORT nCtrlState = GetKeyState(VK_CONTROL);<br />
if(nCtrlState && pMsg->message == WM_CHAR)<br />
{<br />
}<br />
}
|
|
|
|