|
Well I really fully understand what u wanted to say..Anyway i will try to clear with what i have understood..
What is the relation between TREE class and CMasterview Class..If there no relation then that varibale will be out of scope only...
cheers,
Super
------------------------------------------
Too much of good is bad,mix some evil in it
|
|
|
|
|
w1,w2,w3 are members of class MASTER, they are not global variables. You need an instance of the class MASTER containing them. Public means that you can access them from any code, not only from methods of the MASTER class.
MASTER m1,*m2;
m2 = new MASTER();
m1.w1 = 1;
m2->w1 = 2;
Pavel
Sonork 100.15206
|
|
|
|
|
I'm reimplementing a project that currently uses a ListView as the major interface. This list displays a lot of items that themselves contain lists. But to see the contained lists you currently double-click an item and a new dialog-based editor window opens.
I'd like to redo this with an "expanding listview" rather like the Macintosh version of a treeview with the little triangle widget on the left. However, both the main listview and the subitems have column headings, and of course they are completely different from each other. So I probably want to have a second header control appear when a tree is expanded, and dragging the header column sizes should only change the columns for the item or subitem entries. Then of course all of the line items have to allow single/multiple selection, cut/paste and drag/drop, both to other places in the current listview, but also to other listview windows in the same project.
I have a hunch I'm going to end up having to build this thing myself from pretty much scratch, and GUI stuff is *not* my stong point!
So does anyone have suggestions on where I can find this contol? Or more likely, suggestions on which pieces I might grab to start making this thing?
Thanks a bunch!
Loren
|
|
|
|
|
How can I find out whether a scrollbar associated with a CScrollView window is currently being shown?
|
|
|
|
|
You can use CWnd::GetScrollBarInfo
|
|
|
|
|
Use it how? GetScrollInfo() only seems to access information about the position, range, and page of a scrollbar. I need to find out whether the scrollbar is currently being displayed.
|
|
|
|
|
The function name is GetScrollBarInfo. If your view inherits from CScrollView, you can see if the bar is shown by comparing the client size against the total scroll size :
CRect rectClient;
GetClientRect( rectClient);
CSize sizeScroll = GetTotalSize();
BOOL bSbVert = rectClient.Height() < sizeScroll.cy;
BOOL bSbHorz = rectClient.Height() < sizeScroll.cx;
|
|
|
|
|
Hi, does anyone know for some good (read step-by-step) tutorial on "transfering" win32 program as windows screensaver?
I have alaready done graphics detail as Win32 program (.exe) but I don't know hoe to make it as ss. I read somewhere (among other docs in MSDN) that it must have three function, but also it requires to exported and/or that program (during compilation) should not be Win32 program but instead a DLL.
I've tried all this above but I could not get ss, so I'm asking for help (tutorial, howto...) on making ss in VCbutnot on graphics technique (such as GL, DD...).
Thanks.
|
|
|
|
|
Check out Mike's Normal Code Project Screen Saver which is straight Win32. I don't cover the minute details, because MSDN was enough info for me to go on, but maybe you can gleam something from the code.
--Mike--
If it doesn't move and it should: WD-40. If it moves and it shouldn't: duct tape.
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
This article does'nt write on subject I am interested in, as such it did'nt helped me at all.
Instead, I am (as I wrote above) intereseted in "procedure" in "completing" screen saver in Visual C++ environment.
Thanks.
|
|
|
|
|
Just got Visual C++ .NET and am having a problem that I can't figure out. I am trying to use the CRecordset::GetFieldValue function. .NET is giving me errors telling me that it can't convert from a CString to a CDBVariant.
I'm using it like this:
recordset.GetFieldValue("Field", TestString);
This works fine in VC++ 6.0, but now it doesn't work in .NET?? Am I doing something wrong? I selected to create a regular dll file, but everywhere that I call this it tells me the same error.
|
|
|
|
|
Hello everyone,
This is kind of a LAZY question but I will ask it anyway..
Does anyone have a good way of calculating file transfer rates? I have an application where I transfer files.. On my status bar I have a pane for the progress bar, transfer rate and the name of the file being transferred..
In the transfer rate I have
int nSpeed = 0;
CString strRate;
strRate.Format("%dKb of %dKb - %dKbps",wParam/1000, m_dwFileLength/1000, nSpeed);
This works fine minus the speed of course
I would like to show the speed.. (nSpeed)
What would be my best bet for calculating the speed?
Thanks,
Rob
|
|
|
|
|
Never mind I figured it out...
|
|
|
|
|
Hi,
Im trying to use STL in my MFC program in VC++. It keeps on giving me errors.
Im sure there is a simple way to fix it, but i have no idea what that way is. Can someone help?
Cheers
Dor
|
|
|
|
|
Well, unless you give us some details of the problem, you might be better off trying here[^]...
he he he. I like it in the kitchen! - Marc Clifton (on taking the heat when being flamed)
Awasu v0.4a[^]: A free RSS reader with support for Code Project.
|
|
|
|
|
Taka Muraoka wrote:
you might be better off trying here[^]...
LOL
Yeah please post the error you are getting..
|
|
|
|
|
Well, i include all the right things and it gives me this error on the line that i declare the list object on:
c:\program files\microsoft visual studio\vc98\include\ios.h(146) : error C2872: 'streambuf' : ambiguous symbol
I know that the code works when its not using MFC, this error only comes up when in an MFC project
Cheers
Dor
|
|
|
|
|
This is almost certainly caused by your having #include'd mismatching files. Most STL objects come in two versions, one that lives in the global namespace (this is the old style) that you get by #include'ing <iostream.h> The newer version lives in the std namespace - you this by #include'ing <iostream> (nb: no ".h")
So if you #include *both* files and have a using namespace std directive somewhere, when the compiler finds a reference to an STL class, streambuf in your case, it has two matching possibilities i.e. ::streambuf and std::streambuf and doesn't know which one to use.
he he he. I like it in the kitchen! - Marc Clifton (on taking the heat when being flamed)
Awasu v0.4a[^]: A free RSS reader with support for Code Project.
|
|
|
|
|
But the #include <list> only appears once in the project.
should i be using using namespace std; with this version, and should it appear in the header file of the class, and should it be global or local to the class?
sorry, im bombarding you with questions!
Cheers
Dor
|
|
|
|
|
You need to be careful when typing in #include statements here. the < looks like the start of an HTML tag and doesn't get processed properly - use <
Never put "using namespace std" in a header file - it should always go in the .cpp file, *after* all your #include's. It is not something that is global/local to a class but instead something that relates to an entire file, during the compilation process.
This kind of thing is almost impossible to track down without having access to a full copy of the source. The reason why it is working previously but not with MFC is that MFC is #include'ing its own version of the STL headers, probably the old .h ones while your code is #include'ing the new ones. I would try fiddling around with your #include's. You might want to turn off pre-compiled headers while you're doing this since it will almost certainly cause you grief
he he he. I like it in the kitchen! - Marc Clifton (on taking the heat when being flamed)
Awasu v0.4a[^]: A free RSS reader with support for Code Project.
|
|
|
|
|
Cool, Thanks heaps for you help
Dor
|
|
|
|
|
Now I using OLE to implement drag&drop. the OLE does not do more thing about image show unless a simple state cursor, I would like listen your think about maintain a image show between drop source AND drop target when user draging.
Thanks
|
|
|
|
|
You could manage yourself the drawing of the image when mouse moves if drag&drop occurs in the same application, and after having determinate the image to draw when dragging begins.
One small village of indomitable geeks still holds out against the invaders. And life is not easy for the managers legionaries who garrison the fortified camps of Microsoftum, Javum, Ceplumplum and Vebasum
|
|
|
|
|
Hi.
I want to display YV12 format frames by building a FilterGraph in DirectShow. Those frames are captured from a file. So, I create a source filter inherited from CSource and a output pin inherited from CDynamicOutputPin. Then, I connect this source filter with the Video Renderer filter which is supported by DirectX 8.0 (The CLSID of that filter is CLSID_VideoRenderer).
In DirectX 8.0 SDK, it emphasizes that the Video Renderer, when it is initially connected to the upstream filter, will always insist on a RGB format, so I should let the Video Renderer negotiate a dynamic format change to the appropriate YUV color space after the graph goes into a run state.
But, it only works in the RGB exchange (ex: RGB32 to RGB24). If I attempt to change the output formats into YV12, the return value of the function IPinConnection::DynamicQueryAccept running in CDynamicOutputPin::ChangeMediaType fails. Why??
I think that it could be the argument's problem. Before the output pin of my source filter calls the ChangeMediaType function, we should prepare a CMediaType argument for it. The CMediaType argument is filled with the new media type we want.
The following is my settings of the CMediaType:
majortype = MEDIATYPE_Video;
subtype = MEDIASUBTYPE_YV12;
formattype = FORMAT_VideoInfo;
pbFormat = (BYTE *)pVideoInfo;
cbFormat = sizeof(VIDEOINFOHEADER);
How to setting up the data of VIDEOINFOHEADER will be fine for YV12 type??
And, the format type (FORMAT_VideoInfo) is correct??
Thanks.
Bert Chen
|
|
|
|
|
Hi everyone
I'm developing an application, and in that application i added a dialog on his right, this dialog have a tab control on it. The problem is that i can not see the tabs on the dialog when i add more tabs, only appear the tab control with no tabs.
thanks
|
|
|
|