|
|
I'm not sure if you've looked at COleDateTime[^] class.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
These attempts all work:
int d,m,y;
sscanf("14.06.1955", "%d.%d.%d", &d, &m, &y);
printf("%d/%d/%d\n",d,m,y);
swscanf(L"14.06.1955", L"%d.%d.%d", &d, &m, &y);
printf("%d/%d/%d\n",d,m,y);
_stscanf(_T("14.06.1955"), _T("%d.%d.%d"), &d, &m, &y);
printf("%d/%d/%d\n",d,m,y);
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Stuart Dootson,
OK !
THANK You Very much!
|
|
|
|
|
Hi,
I am developing an application in which i want to know whether an Enter key is pressed, if so want to show the user Edit window for that particular entry in ListView.Is there any way to get the NM_RETURN notify event from CListCtrl. I am using VC++ to develop the application.
thanks
Jose Jo
Jose Jo Martin
http://www.simpletools.co.in
|
|
|
|
|
To do this, the list-view needs to tell the system that it'll process all keys it's sent (which it can do when it's sent the WM_GETDLGCODE message)
Easiest way is to sub-class the list control and add an OnDlgCode override, like this:
class ListControlThatSendsNM_RETURN : public CListCtrl
{
DECLARE_MESSAGE_MAP();
UINT OnGetDlgCode()
};
BEGIN_MESSAGE_MAP(ListControlThatSendsNM_RETURN, CListCtrl)
ON_WM_GETDLGCODE()
END_MESSAGE_MAP()
UINT ListControlThatSendsNM_RETURN::OnGetDlgCode()
{
return DLGC_WANTALLKEYS;
}
then you can use ListControlThatSendsNM_RETURN instead of CListCtrl in MFC dialogs and the dialog will be sent NM_RETURN notifications.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi Stuart,
thank you for your reply. i will try this.
thanks
Jose Jo
Jose Jo Martin
http://www.simpletools.co.in
|
|
|
|
|
Thanks you alot. This is the Answer.
Without overriding this function, the NM_RETURN or WM_KEYDOWN wont get sent, and you need to both Press Mouse button AND Enter key to have those messages sent. With this overrided function, you only need to press Enter key.
One more note I found useful is that: If u r not using CListView, but have a Pane (DockablePane) who is the parent of the CListCtrl; and you want the Pane to handle Notify Messages from the CListCtrl. The best way to do is:
1) Override your CListCtrl, and handle ON_NOTIFY_REFLECT_EX( notifyMessage, memFunction) (notifyMessage could be NM_RETURN)
2) In memFunction, just return FALSE. Which allows this notifyMessage will be handled in other places as well( for ex CListView's Parent).
3) In the Parent class (DockablePane), handle ON_NOTIFY(notifyMessage, ChildID, memFunction)
Thanks you
|
|
|
|
|
Is there any way to increase the Height of treeview control's items?
Thank You.
|
|
|
|
|
|
Thank you for the Reply.
As I am working on Windows Mobile 6.0 Application. It is not working for me.
Thank you, is there any other solution?
|
|
|
|
|
There's a Treeview.ItemHeight property which you can set - hopefully that's available on Win Mobile as well.
There are three kinds of people in the world - those who can count and those who can't...
|
|
|
|
|
No such a property available on windows mobile.
Thank you,
|
|
|
|
|
Ah - sorry. It may have been removed on the mobile platform to keep the control layout consistent.
There are three kinds of people in the world - those who can count and those who can't...
|
|
|
|
|
|
Hi all please tell me how can i convert CString to const wchar_t *.
thanks.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
|
Something like this:
CString str; // init'd this already somewhere
wchar_t *wCharBuff = new wchar_t[strlen(str)+1];
wcscpy(wCharBuff,str);
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
_AnsHUMAN_ wrote: wchar_t *wCharBuff = new wchar_t[strlen(str)+1];
You're sure that's right?
PS: Why not let him read those articles instead of giving him 'da codez'? It's been almost six months since he's asking this kind of questions.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Rajesh R Subramanian wrote:
You're sure that's right? Smile
yeah! +1 would stand for the delimiter
Rajesh R Subramanian wrote: It's been almost six months since he's asking this kind of questions.
I forgot to set the timer when he asked such a question for the first time.
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
_AnsHUMAN_ wrote: yeah! +1 would stand for the delimiter
1? If it were Unicode (which it is), then it must be 2! Or rather sizeof(TCHAR)*1 , which is the neutral way of manipulating it.
You were also using strlen with a Unicode string in your answer to the OP!
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
You're both assuming UNICODE is defined and not defined.
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]
|
|
|
|
|
Absolutely! He didn't get it even after I asked him to check it.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Well, I got it after seeing your question!
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]
|
|
|
|
|
Why do you need such a conversion?
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]
|
|
|
|