|
|
Thanks Riazi, This code was really a help, a little modification should get me going.
Thanks
Anand
|
|
|
|
|
|
Hi,
I have a listview with a background image by using the LVM_SETBKIMAGE message. The textcolor is set to transparent by using LVM_SETTEXTBKCOLOR with CLR_NONE so the image is shown behind any text within the listview. When I set an image for a subitem (report view), the text isn't drawn transparent but with a solid background. Is it possible to add images to subitems and have the text drawn transparent and if so, how do I do it?
Thanks in advance,
Aart Onkenhout
|
|
|
|
|
Hello:
While building a project containing many DLLs the VC++ 6.0 compiler stopped automatically if there was an error in a DLL. New Visual Studio .NET always continues in building although my fix usually requires rebuilding of all subsequent DLLs. Now I have to stop it manually and it is very annoying. Is there an option that stops building after an error?
Thanks Mirek
|
|
|
|
|
Press ESC on your keyboard!
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
Rickard:
I know how to stop building manually. My question is how to force it to stop automatically. I'm converting a VC++ project to new VS .NET and the project consists of 32 subprojects with more than 2 millions lines. Currently I'm somewhere in the middle and I get hundreds of warnings/errors after every build. So during building I always have to scroll back through hundreds of output lines to check if there was an error or not (and stop it if there is an error). Of course I could change the startup project always after I finish a DLL or I could use the "Build (selection only)" command but I'm always very disappointed when I see that someone has changed something what was good (better than after the change). But may be I'm wrong and there is an option that solves this problem.
Regards Mirek
|
|
|
|
|
mireks wrote:
So during building I always have to scroll back through hundreds of output lines to check if there was an error or not
I have no idea about what you want, and moreover I'm novice...
but (I'm sure that you'll know this) you can press F4 to go through the errors and warnings found...
If nobody answers you and you didn't know it... it can help you...
Hope this helps...
|
|
|
|
|
Joan: thank you for your answer but, unfortunately, it doesn't solve the problem. What I want: My project is large and consists of 32 subprojects (DLLs). When I'm building this project and if there is an error (for example in a DLL #5) then I want Visual Studio to stop building so that I could fix the error. VC++ 6.0 and all previous versions really stopped but new VS .NET continues in building (a DLL #6 and all other DLLs) and writes thousands of other warnings/error messages. I can stop it myself but sometimes it is difficult to notice that there was an error. In my case it doesn't make any sense to continue in building if there is an error, it is just a waste of time (especially if building takes about 20 minutes). I don't know why Microsoft has made this change. I can live with it but - as I've already written - it is annoying.
Regards Mirek
|
|
|
|
|
mireks wrote:
I know how to stop building manually
Argh... Again I read a message carelessly!
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
How to create a Table(Like Msword Tables) in Windows Application?
|
|
|
|
|
Use CListCtrl with gridlines
|
|
|
|
|
I have an aplication wich splits the window in two: one is a TreeView for navigation on the document and the other side can be a CFormView, CListView ou just a CView. My problem is that, after I've created menu accelerators and their message processing routines, I cannot get the messages sent to the window on the right. I also cannot get the ON_PRINT messages. I've even tried to send ON_COMMAND messages to the window on the right and it still does not catch them. What am i doing wrong ?
Thanks
Nelson Gonçalves
|
|
|
|
|
Where do you send the messages to?
I usually send the messages to the CMainFrame , where they are catched and relayed to the relevant view.
Or maybe you can use the simpler UpdateAllViews() broadcast? Just define your own HINT-constants. You can then use the pHint for sending more complicated data (or better, a pointer to it).
My opinions may have changed, but not the fact that I am right.
|
|
|
|
|
I do not re-directionated messages. I have a funy bug, because i can catch mouse messages on the CView() window,on the rigth, but no other message. All I want is to catch keyboard accelerators on the CView(). I don't think that the UpDateAllViews() will work. I think I should work on the mainframe
Nelson Gonçalves
|
|
|
|
|
Sorry, I thought you wanted to send messages from one view to the other.
For your acceletators, try to use CMainFrame or the CMDIChildWnd.
My opinions may have changed, but not the fact that I am right.
|
|
|
|
|
Ok, thank you for your time.
Nelson Gonçalves
|
|
|
|
|
What's the difference between CCriticalSection and CSingleLock ?
When should i use CCriticalSection and when CSingleLock ?
|
|
|
|
|
Hi..
you use CSingleLock and CCriticalSection to control access to a resource you only need to wait on one object at a time and just one thread at a time can access this resource.
|
|
|
|
|
Hi,
I am working on an application in which the mainframe is split into four panes. Two panes are folderviews and the other two are fileviews. I created a separate view for each pane.
The folderviews are derived from CFormView and consist of a CTreeCtrl and some CBitmapButtons. Both folderviews are identical, yet I have to do all coding twice. As far as I know I cannot create a single class and derive both folderviews from this class as dialog id's have to be unique.
Is there any way around this problem. It seems like a waste of code and I do not like the double maintenance.
Woody
|
|
|
|
|
how I can change the tiltle Bar, StatusBar and Dialog BackGround Color....
Thanks In advance
|
|
|
|
|
For dialogs (and even StatusBar??) you can implement CWnd::OnCtlColor , there reacting on CTLCOLOR_DLG. If this doesn't work for status bars you could try OnEraseBackground .
And what about title bars? I remember that I've seen some articles about that here on CP;)
|
|
|
|
|
BOth Not works,
OnEraseBackground errases background, but how I set new background eg (Dialog with RED background)
|
|
|
|
|
OnCtlColor works for sure when used for dialogs. Here's an example:
HBRUSH CMyDialog::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
switch (nCtlColor)
{
case CTLCOLOR_DLG:
{
CBrush* back_brush;
COLORREF color;
color = (COLORREF) GetSysColor(COLOR_BTNFACE);
back_brush = new CBrush(color);
return (HBRUSH) (back_brush->m_hObject);
}
}
return(CDialog::OnCtlColor(pDC, pWnd, nCtlColor));
}
And a solution for OnEraseBackground could look similar to this:
BOOL CSampleView::OnEraseBkgnd(CDC* pDC)
{
CBrush backBrush(RGB(255, 128, 128));
CBrush* pOldBrush = pDC->SelectObject(&backBrush);
CRect rect;
pDC->GetClipBox(&rect);
pDC->PatBlt(rect.left, rect.top, rect.Width(),
rect.Height(), PATCOPY);
pDC->SelectObject(pOldBrush);
return TRUE;
}
*both examples taken fom MSDN and slightly modified
|
|
|
|
|
yes u are right...OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
works well,....
UPDATES In Initial Requirements.... ;P
Now I want to change the Background of Property Sheet.
OnCtColor works well for property pages, but not works for Property Sheet...
ALthough Property Sheet to inherit from CWnd....
|
|
|
|