|
wrong forum send VB forum
|
|
|
|
|
vivek.s.vivek wrote: post code snippet
ASAP.
Yes master right away ....
I doubt therefore i might be
|
|
|
|
|
"ASAP" This is really funny
|
|
|
|
|
vivek.s.vivek wrote: I need a code to send mail thru VB
1. You work on VB
vivek.s.vivek wrote: (The mail sending should
not transparent to users)
2. You do not know what you want
vivek.s.vivek wrote: post code snippet
3. You are not keen to learn and you just want the code.
vivek.s.vivek wrote: ASAP
4. You crack silly jokes
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
vivek.s.vivek wrote: You only have to do a very few things right in your life so long as you don't do too many things wrong.
Consider now to be one of those times you did something wrong.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi all,
I am having two exes, say a.exe and b.exe. I am creating a dialog window in a.exe and making it as a child of another window in b.exe. Child window appears at the center of screen instead of the main window center of b.exe.
Thanks,
--Umesh
Umesh Goel
|
|
|
|
|
Excuse me you have two files(a/b) and create a window on a.exe and then?
|
|
|
|
|
You could always move it using MoveWindow as you have HWND of both windows.
My sins are bloody red, my coffee is a black hole.
|
|
|
|
|
ugoel wrote: I am creating a dialog window in a.exe and making it as a child of another window in b.exe.
Without more supporting details, this seems to be a very bad idea.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
This "// Generated message map functions " (VC 6.0) is misbehaving.
After adding right mouse button function I found out that last three functions in this "//{{AFX_MSG " block are missing. The function definitions are still in .cpp file.
Are there any limits to how many functions MFC will generate?
Thanks for reading
|
|
|
|
|
I dont know the limit but u may generate many functions in vc++ . there is not as such limit ....sometimes there might be problem that we dont see msg mapping code but definition is still there .....
u may restart ur computer and then debug ur code and than u see is there all msg map code is display on screen
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
Shilpi Boosar wrote: u may restart ur computer and then debug ur code
In what grounds do you think this is necessary. What has a restart to do with this?
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
I dont know ...but sometimes it happens with me also and when i restart computer and than everything will goes perfect ,....that is fact....
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
Shilpi Boosar wrote: I dont know ...
Oh!
Shilpi Boosar wrote: when i restart computer and than everything will goes perfect
But what has this got to do with writing code? Will the code be changed to get out of errors by restarting? Come on.
Shilpi Boosar wrote: that is fact....
You call it that way?
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
many times when v write something on wizard than we dont see message map and somedeclaration ....but next time v use that application than everyting display on screen ....if u dont beleive me ....than its ok ....i face that problem thats y i m asking him ....and if u have solution of his problem than give it to him ....plz ....dont comment on others forum
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
Shilpi Boosar wrote: dont comment on others forum
Whose forum is this?
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
If you are manually adding items to the message map, you should add them outside of the //{{AFX_MSG block:
BEGIN_MESSAGE_MAP(CMyView, CFormView)<br />
ON_BN_CLICKED(IDC_START, OnStart)<br />
ON_BN_CLICKED(IDC_CANCEL, OnCancel)<br />
ON_COMMAND(IDHELP, OnHelp)<br />
ON_COMMAND(ID_HELP, OnHelp)<br />
<br />
END_MESSAGE_MAP()
because inside the block is updated by the wizard and it will remove functions it didn't add (or at least most of them).
Hope that helps.
Karl - WK5M
PP-ASEL-IA (N43CS)
<kmedcalf@ev1.net>
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
|
|
|
|
|
The problem is it removed OnTimer ( and two others after that ) which I added using wizard.
73 AA7EJ
|
|
|
|
|
Hi,
I have a list view with LVS_EDITLABEL set for it, editing labels was ok until I modified the style to have LVS_OWNERDATA, when I added this style to the control it stopped me from having a success editing labels. when I remove LVS_OWNERDATA style it works, when I add it no label editing is permitted!!!
This is wiered and I really spent much time searching for the problem...
Any help guys?
Mohammad
And ever has it been that love knows not its own depth until the hour of separation
|
|
|
|
|
Are you handling the LVN_GETDISPINFO notification from the control?
When you use LVS_OWNERDATA you are respnsible for storing the text somewhere
and providing it to the control when requested.
Mark
|
|
|
|
|
Yes, I am handling the LVN_GETDISPINFO from the control itself, not the parent. I do store text and all data in some datastructures and I do provide it to the control when it asks for it..
but how does this affect editing labels? and how to solve the issue?
Note: I am handling the LVN_GETDISPINFO from the control becuase I have a dynamically created control derieved from CListView, and I dont know how to map its events to the parent (except WM_NOTIFY).
would you provide any help regarding this plz?
Thanks
Mohammad
And ever has it been that love knows not its own depth until the hour of separation
|
|
|
|
|
>>but how does this affect editing labels?
It effects almost everything. When you use LVS_OWNERDATA the control only maintains information
about what item is selected and the control's focus. It's up to you to provide the rest.
When it needs text you provide the text. When it needs the image (icon) you provide it, etc.
LVN_GETDISPINFO is sent to the parent of the control.
In the parent window class, add a OnNotify() function (handler for WM_NOTIFY).
In this example I've used the item's lParam to store an index into some array of structures
which hold the info for each item in the list. I've shown a way to handle LVN_GETDISPINFO for
LVIF_TEXT and LVIF_IMAGE. This would be the bare minimum you'd need to provide to the control.
(Actually I don't think items HAVE to have an image )
All the other notifications are dispatched to functions I've added to my CMyCWndDerivedClass
class...
BOOL CMyCWndDerivedClass::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult)
{
NMHDR *pHdr = (NMHDR *)lParam;
if (wParam == IDC_MYLISTVIEWCTRL)
{
if (pHdr->code == LVN_GETDISPINFO)
{
NMLVDISPINFO *pLVDispInfo = (NMLVDISPINFO *)pHdr;
if (pLVDispInfo->item.mask | LVIF_TEXT)
{
LVITEM LVItem;
LVItem.mask = LVIF_PARAM;
LVItem.iItem = pLVDispInfo->item.iItem;
LVItem.iSubItem = 0;
pListCtrl->GetItem(&LVItem);
int nItemIndex = (int)LVItem.lParam;
if (nItemIndex >= 0)
{
pLVDispInfo->item.pszText = <--(point this to the row's text)
}
else
{
pLVDispInfo->item.pszText = _T("ERROR");
}
}
if (pLVDispInfo->item.mask | LVIF_IMAGE)
{
LVITEM LVItem;
LVItem.mask = LVIF_PARAM;
LVItem.iItem = pLVDispInfo->item.iItem;
LVItem.iSubItem = 0;
pListCtrl->GetItem(&LVItem);
int nItemIndex = (int)LVItem.lParam;
pLVDispInfo->item.iImage = <--(provide index into image list here)
}
return TRUE;
}
else if (pHdr->code == LVN_BEGINDRAG)
{
LvnBeginDrag((NMLISTVIEW *)lParam);
return TRUE;
}
else if (pHdr->code == LVN_ITEMCHANGED)
{
LvnItemChanged((NMLISTVIEW *)¬ifyInfo);
return TRUE;
}
else if (pHdr->code == LVN_ITEMACTIVATE)
{
LvnItemActivate((NMITEMACTIVATE *)¬ifyInfo);
return TRUE;
}
else if (pHdr->code == NM_RCLICK)
{
ListRClick((NMLISTVIEW *)lParam);
return TRUE;
}
else if (pHdr->code == NM_DBLCLK)
{
ListDblClick((NMLISTVIEW *)lParam);
return TRUE;
}
else if (pHdr->code == LVN_BEGINLABELEDIT)
{
return LvnBeginLabelEdit((NMLVDISPINFO *)lParam);
}
else if (pHdr->code == LVN_ENDLABELEDIT)
{
return LvnEndLabelEdit((NMLVDISPINFO *)lParam);
}
else if (pHdr->code == LVN_COLUMNCLICK)
{
LvnColumnClick((NMLISTVIEW *)lParam);
return TRUE;
}
} //if (wParam == IDC_MYLISTVIEWCTRL)
return CWnd::OnNotify(wParam, lParam, pResult);
}
|
|
|
|
|
By the way, it's rare that you need to override control classes in MFC. Except for special needs,
controls and their notifications can nearly always be handled in the control's owner window.
That's by design in MFC
Mark
|
|
|
|
|
How do I do image comparison for 2 live video feed?
I am suppose to compare 2 live video feed of vehicular flow. So how do i track the vehicles from the first video to the second video?
pls help. Thanks
|
|
|
|
|
You need to match the items exactly - not just track movement, but work out which vehicle is which ? Will you have any idea what part of teh screen they will be on ? They are two different videos, right ? I'm guessing from different angles ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|