|
try this:
BYTE c[1000];
for (int i=0; i<1000; i++)
c[i] = value;
myfunc(c, 1000);
and here is the definition of myfunc:
void myfunc(BYTE* p, int iLen);
|
|
|
|
|
Hi,
I'd like to use the VC IDE also with a non-MFC project.
Can I create a simple project which:
- runs a 'buildall.pl' script when I click on build icon (all dependency checking etc is done
from the build script itself).
- runs 'application.exe' when I click on run icon?
Thanks for help,
Moak
|
|
|
|
|
Anonymous wrote:
- runs a 'buildall.pl' script when I click on build icon
Yes, the IDE can perform both pre-link and post-build operations.
- runs 'application.exe' when I click on run icon?
Assuming your project is named 'application', then clicking the Run button will execute it.
|
|
|
|
|
DavidCrow wrote:
Yes, the IDE can perform both pre-link and post-build operations.
I wonder how? Do I need to create a specific project type, at which position would I enter my build script path?
Thanks, Moak
|
|
|
|
|
On the Project Settings (Alt+F7) dialog, you will see a Pre-link and a Post-build tab.
|
|
|
|
|
I only see a post-build step in the current settings (I have choosen a "tool project"). Entering a path in there has no effect for the 'build' button.
I guess, I have to choose a different type of project - anzthing you recommend?
Thanks again, Moak
|
|
|
|
|
I'm not familar with a "tool project." I do not see such an option in the Projects list.
|
|
|
|
|
Sorry, it was a "Utility project".
I tried a "Makefile" now, which let me specify everything I want. Well, basically it works, just the python-script has some problems being called from VC6. I post a new thread.
Thanks so far, Moak
|
|
|
|
|
I have a static picture control as the bottom-most control on a particular dialog box. When i create said box and show it, the picture control does not show up. I've tried setting the background mode to transparent, i've tried playing around with brushes, etc but to no avail.
Does anyone have any suggestions?
thanks in advance!
|
|
|
|
|
Hi ,
I would like to sort items contained by my columns into a CListCtrl when I click on the column header. There is a lot of example out there but they are all for Dialog App. How can I do this if I have a ClistCtrl into a CFormView? Up to now, It doesn't work.
I tried to catch message into my CformView class with OnNotify or OnChildNotify, but It don't seem to work.
Thanks for helping
Mykel
Everything's beautiful if you look at it long enough...
|
|
|
|
|
A list control is a list control, whether it's on a dialog or a form view. Assuming you are not already, you need to be processing the LVN_COLUMNCLICK message. Otherwise, provide a code snippet of what you are trying.
|
|
|
|
|
Hi!
I tried to catch it with OnNotify() but I'm not sure how to use it.
I tried this, but It's doesn't work:
BOOL CDataBaseManagerView::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult)
{
NMHDR *pHdr = (NMHDR*)lParam;
if(pHdr->code == HDN_ITEMCLICK)
{
// Do my stuff over here.
}
return CFormView::OnNotify(wParam, lParam, pResult);
}
thanks
Everything's beautiful if you look at it long enough...
|
|
|
|
|
|
BEGIN_MESSAGE_MAP(CMyView, CFormView)
//{{AFX_MSG_MAP(CMyView)
ON_NOTIFY(NM_CLICK, IDC_LIST1, OnClickList1)
ON_NOTIFY(NM_RCLICK, IDC_LIST1, OnRclickList1)
ON_NOTIFY(LVN_COLUMNCLICK, IDC_LIST1, OnColumnclickList1)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
void CMyView::OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint)
{
m_list.InsertColumn(0, "This is column 1");
m_list.InsertColumn(1, "This is column 2");
m_list.InsertColumn(2, "This is column 3");
m_list.InsertColumn(3, "This is column 4");
}
void CMyView::OnClickList1(NMHDR* pNMHDR, LRESULT* pResult)
{
NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
TRACE2("OnClickList1()\titem=%d\tsubitem=%d\n", pNMListView->iItem, pNMListView->iSubItem);
*pResult = 0;
}
void CMyView::OnRclickList1(NMHDR* pNMHDR, LRESULT* pResult)
{
TRACE("OnRclickList1()\n");
*pResult = 0;
}
void CMyView::OnColumnclickList1(NMHDR* pNMHDR, LRESULT* pResult)
{
NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
TRACE1("OnColumnclickList1()\tsubitem=%d\n", pNMListView->iSubItem);
*pResult = 0;
}
|
|
|
|
|
Did you ever get this working? I'm trying to do the exact same thing...
Mike Ellertson
|
|
|
|
|
What I posted is working code. You'll have to be more specific.
|
|
|
|
|
Ok, here's more specifics. I'm trying to get my list control to sort on a column heading click. You code just handles the click message. Do you know what additional code I'd have to add to get the list view to sort by the column heading that was clicked on?
Mike Ellertson
|
|
|
|
|
You'll need a handler for the LVN_COLUMNCLICK notification. In the handler, the column clicked is obtained like:
void OnColumnclick(NMHDR* pNMHDR, LRESULT * )
{
CWaitCursor cursorWait;
NM_LISTVIEW *pNMListView = (NM_LISTVIEW *) pNMHDR;
if (m_list.GetItemCount() > 0)
{
m_nSortColumn = pNMListView->iSubItem;
m_list.SortItems(CompareFunc, ...);
}
}
|
|
|
|
|
Hi All,
I need to integrate MapPoint software into my MFC database application. Basically what i want to acheive is to
get the data from the database and display it in the map. Application has to invoke the map and draw the route on it.
Any ideas will be appreciated.
Thanks,
|
|
|
|
|
What is the value of lSize?
|
|
|
|
|
Its correct.Equal to file size.
Mazy
No sig. available now.
|
|
|
|
|
I tried your code and lSize and i have the same value.
|
|
|
|
|
Yes,Same here.
Mazy
No sig. available now.
|
|
|
|
|
Ok, so what's the problem? You instructed it to read lSize bytes and it read i bytes, both of which were the same.
|
|
|
|
|
Thw point is that svRead does not contain all datas.
Mazy
No sig. available now.
|
|
|
|