|
Hi!
I use Soap 3.0. But I don't install SoapToolkit SDK. I want do a program install (SoapInstall.msi) for use Soap.
Pls Help me!
Thanks!
|
|
|
|
|
Hi comunity,
i need litle help to use this function to draw a arrow on listcontrolheader, where should i implemented this funcion OnPaint() ??? I coment out this lines in :
// change the item to owner drawn.
/*HD_ITEM hditem;
hditem.mask = HDI_FORMAT;
VERIFY( GetItem( iSortColumn, &hditem ) );
hditem.fmt |= HDF_OWNERDRAW;
VERIFY( SetItem( iSortColumn, &hditem ) );*/
and i change the SortHeaderCtrl.h with the function OnPaint(),
//{{AFX_MSG(CSortHeaderCtrl)
// NOTE - the ClassWizard will add and remove member functions here.
afx_msg void OnPaint();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
and i change the SortHeaderCtrl.cpp with the function OnPaint(),
where should i call this OnPaint(), witch place in my SortHeaderCtrl.cpp to show an arrow on a Listheader?? I hope you can understand me
With best regards
Mirsad
|
|
|
|
|
Depending on how finicky you are, you can do it using NM_CUSTOMDRAW.
Here's something what I did:
<br />
void CSortHeaderCtrl::OnNMCustomdraw(NMHDR *pNMHDR, LRESULT *pResult)<br />
{<br />
LPNMCUSTOMDRAW pNMCustomDraw = reinterpret_cast<LPNMCUSTOMDRAW>(pNMHDR);<br />
<br />
*pResult = CDRF_DODEFAULT;<br />
<br />
if (pNMCustomDraw->dwDrawStage == CDDS_PREPAINT)<br />
*pResult = CDRF_NOTIFYITEMDRAW;<br />
else if (pNMCustomDraw->dwDrawStage == CDDS_ITEMPREPAINT)<br />
*pResult |= CDRF_NOTIFYPOSTPAINT;<br />
else if (pNMCustomDraw->dwDrawStage == CDDS_ITEMPOSTPAINT)<br />
{<br />
CDC* pDC = CDC::FromHandle(pNMCustomDraw->hdc);<br />
ASSERT_VALID(pDC);<br />
if (!pDC)<br />
return;<br />
<br />
<br />
int nColumn = static_cast<int>(pNMCustomDraw->dwItemSpec);<br />
<br />
if (nColumn == m_nSortColumn)<br />
}<br />
}<br />
Pssst. You see that little light on your monitor? That's actually a government installed spy camera. Smile and wave to big brother!
|
|
|
|
|
Hi Jack,
thank you for help, hmm, i'm scare that is litle to hi for my level(beginner) but i try it!
regards
mirsad
|
|
|
|
|
hi,
where can i find this : OnNMCustomdraw(NMHDR *pNMHDR, LRESULT *pResult)
mirsad
|
|
|
|
|
I am looking for a simple way to add a title row/bar to the CListBox similar to Windows Task manager. Must be resizable and scrool horizontally.
Thanks for your help. Vaclav
Vaclav
|
|
|
|
|
|
You can't with CListBox . You'll need to use CListCtrl instead.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Hi everybody,
I am busy writing an setup program for my application. I am using some shell functions like SHGetSpecialFolderLocation to get Program files location. The problem is that this function requires a specific version of a shell dll to be present on the system. What do I do if I install the app on a older system like NT or 98 and the version of the system dll is old ? Is there a set of redistributable shell objects that will ensure the application work on all environments or is there another solution to this problem ?
Help appreciated.
Regards
Ramsus
Carpe Deum
|
|
|
|
|
Ramsus wrote:
I am using some shell functions like SHGetSpecialFolderLocation...What do I do if I install the app on a older system like NT or 98 and the version of the system dll is old ?
That function is available on Windows NT4 and later, and Windows 95 and later. Perhaps you were thinking of SHGetFolderLocation() , which did not come out until Windows 2000, and Windows Me.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Hello,
I have a very strange error in my multithreaded application. The situation is as follows:
[thread 1]
I have one dialog window open, this dialog spawns 2 threads (thread 2, thread 3] when it is initialized.
[thread 2]
This thread spawns two other threads (thread 4, thread 5). After spawning those threads, it retrieves data from a buffer
The two other threads are identical and retrieve data from 2 diffenrent COMM ports and put the data in the buffer.
When data is successfully retrieved, it notifies thead 3.
Before shutting down, it notifies the monitor thread (3) and shuts down thread 4 and 5. It waits until the threads are cleaned up.
[thread 3]
Its sole purpose is to monitor thread 2 and notify the dialog when data is arrived.
This thread cleans up itself after it recieved the notification that thread 2 is stopped.
[thread 3, thread 4]
These two threads retrieve data from two different COMM ports. The retrieved data is stored in a std::vector managed by thread 2.
You may think that I have too much thread for this purpose (2 would be enough for this type of work), but this is by design. The extra monitor thread is used because this is a test application. In the real application the monitor threads do some real work.
Now for the problem. Everything works like a charm, except when I try to stop thread 2. It actually manages to stop thread 3 and 4. After that, the thread is cleaned up (the thread 2 and 3 are gone in PView thread 2 not). But then, BANG the program crashes in the middle of the following function: AfxUnlockTempMaps at the following line: pThreadState->m_pSafetyPoolBuffer = malloc(pApp->m_nSafetyPoolSize);
The error message in the output window of VS2005 is:
Unhandled exception at 0x02845922 (dbghelp.dll) in TestInput.exe: 0xC0000005: Access violation reading location 0x0152070c.
The location is always the same and no pointer is even near that address...
I noticed that the problem does not occur when thread 3 and 4 stop sending data to the buffer of thread 2. Here are some code snippets:
The call where the data is added to the buffer of thread 2
m_pConsumer->AddDataToInternalBuffer(Data);
The AddDataToInternalBuffer function
void AddDataToInternalBuffer(SERIAL_DATA& SerialData)
{
INTERNAL_LOCK();
m_InternalBuf.push_front(SerialData);
}
Does anybody have a clue what might be happening?
Blog[^]
|
|
|
|
|
I still don't know why the problem occurred, but it was in the dbghlp.dll library when the function CheckStack64 was called. This function call was made from within the Visual Leak Detector libray and without linking to that lib, everything works fine.
Blog[^]
|
|
|
|
|
how to call new dialog box(new form) by clicking a button in a current form
|
|
|
|
|
That's not really complicated. In your handler function from the button, just created the dialog and call DoModal:
void CYourMainForm::OnButton()<br />
{<br />
CYourDialog Dialog;<br />
Dialog.DoModal();<br />
}
Of course, the DoModal function will not return until the dialog has been closed.
Hope this helps
|
|
|
|
|
cedric code is right, but considering you use MFC.
however, you talk about forms, which reminds me a little about .NET framework. If so, prefer posting sich questions on Managed C++ Forum instead.
the code would be so :
void MyDialog::OnButtonClick() {
Form myForm = new Form();
myForm.ShowDialog();
}
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
toxcct wrote:
however, you talk about forms
He might be a VB programmer migrating to VC++
--
Help me! I'm turning into a grapefruit!
Buzzwords!
|
|
|
|
|
See here.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Hi,
I am developing a marker application. Basically allows free-hand drawing with the mouse. When i draw a line, i want the window below also to visible. I am not able to create a transparent Pen for this? i tried BS_HOLLOW, but it doesn't draw at all.
hdc = CreateDC(TEXT("DISPLAY"),NULL,NULL,NULL);
lb.lbColor = rgbCurrent;
lb.lbHatch = NULL;
lb.lbStyle = BS_SOLID;
//hNewPen = CreatePen(PS_SOLID,10,rgbCurrent);
//SetROP2(hdc,R2_MERGEPEN);
hNewPen = ExtCreatePen(PS_GEOMETRIC,10,&lb,0,NULL);
//SelectObject(hdc,CreateBrushIndirect(&lb));
//SetDCBrushColor(hdc,rgbCurrent);
SelectObject(hdc,hNewPen);
MoveToEx(hdc, PrevX, PrevY, NULL);
LineTo(hdc, CurrX, CurrY);
DeleteDC(hdc);
........
Can anyone help?
Hercules
|
|
|
|
|
how can i display any string in debug window.In visual c++ 6.0
shumyla
|
|
|
|
|
With the TRACE Exmple:
int nPippo = 4;
TRACE("Numero Item = %d\n",nPippo);
You can formatted the message like CString format and add the parameter..
Too many plans make the health badly...
|
|
|
|
|
|
can the operators 'new' and 'delete' be overloaded?
"faith, hope, love remain, these three.....; but the greatest of these is love" -1 Corinthians 13:13
|
|
|
|
|
|
Yes, new and delete operators can be overloaded.
Use the following signatures.
1.) new :- void* operator new( size_t p_stBlock );
2.) delete :- void operator delete( void* p );
Rahim Rattani
Software Engineer,
Matrix Systems (Pvt) Ltd.,
Karachi - Pakistan
|
|
|
|
|
It's slightly complicated in that you can overload operator new and operator delete but you can't overload the new and delete operators in the same sense as overloading, say '+'. The reason is that your overloaded
operator<code> new is only responsible for allocating memory, but someone must call the constructor, right? Same goes for delete, you can free memory, but someone must call the destructor. <br />
<br />
Regards<br />
Senthil<br />
_____________________________<br />
<font face="Verdana" size="1"><a href="http://blogs.wdevs.com/senthilkumar">My Blog</a> | <a href="http://www.codeproject.com/script/articles/list_articles.asp?userid=492196">My Articles</a> | <a href="http://geocities.com/win_macro">WinMacro</a></font>
|
|
|
|