|
Jay03 wrote: For the first part..... what do STATIC POINTERS DO?
Static is in terms of scope. Like any static variable, a static pointer is shared by all instances of this class, rather than a specific instance. As a matter of fact, it exists before any instance is created. That is why we refer to it as <class_name>::<pointer_name>.
Jay03 wrote: In the last part. ObjectRootPtr is pointer to an ObjectRoot object.
Correct.
Jay03 wrote: Now this ObjectRootPtr was pointing to ms_instances[21] of size 21.
Well, a correct interpretation should be "Now you define a (static) array (say, 21) of such pointers (ObjectRootPtr)".
Best,
Jun
|
|
|
|
|
If i have an ftp server such as:
tennis.tournament.com:9662
Is there a way in a web browser to pull up that site and include the user id and password in the string so that this data is not prompted.
So for example:
tennis.tournament.com:9662:username:passwd
I know this is possible but the exact characters in between the user name and passwd i am not sure of.
Thanks,
|
|
|
|
|
When i use SHellexecute, i am able to to use the user id and password to get to the ftp server. However, i am attempting to play a .avi file that is on that ftp server. If i were to attach the .avi file name like so:
strFtpVideoLocation = "ftp://usr:paswd@lrgftp.monster-ga.com:9662/test.avi";
ShellExecute(AfxGetMainWnd()->m_hWnd,"open",strFtpVideoLocation, NULL, NULL, SW_SHOWNORMAL );
this does not work to play the video
But i can do
strFtpVideoLocation = "ftp://usr:paswd@lrgftp.monster-ga.com:9662/";
ShellExecute(AfxGetMainWnd()->m_hWnd,"open",strFtpVideoLocation, NULL, NULL, SW_SHOWNORMAL );
without the .avi file name and this takes me to the server with all the files and i have to double clip on the clip that i want. I just want to be able to play it and not have a user double click it to play.
-- modified at 16:45 Friday 23rd June, 2006
|
|
|
|
|
My first post, here. Hope you can help.
Two questions.
1. In a CListCtrl displayed in Report view mode, with a header labeling the columns, I need to trap a mouse right button down message with the cursor in the header. The control has a native function to trap the left mouse button on a click in the header, but neither control nor the dialog are able to see the right mouse button when the header is clicked. It would also be nice to have MFC tell me which column was clicked, but I can do that with a little math on the mouse position and the CHeaderCtrl pointer. (NOTE: I have tried subclassing the CListCtrl CHeaderCtrl member to no avail.)
2. The dialog in question is resizeable. I want to resize and relocate controls on the dialog when it is resized. I can do that in the OnSizing() handler but redraw is very clumsy. I'd rather do it all at once when the resize has stopped. However I can't seem to detect the left mouse button up message from the dialog when the mouse is moving the dialog border. Any way to detect when resizing has finished?
Development is in Visual Studio .Net Professional, 2003 edition
Any suggestions?
Thanks in advance
Scott
Scott P. Chapman
Voss Scientific Inc.
scottc@vosssci.com
|
|
|
|
|
Dear colleagues,
Does anyone know of a way to create a Netscape plugin (in C++) that would be always active for whatever MIME type is currently loaded?
What I need is to slightly modify the contents of any and all pages opened. Please direct me to where to look for a solution.
The Netscape Plugin SDK documentation gives no answer to this. Is it really impossible to "filter" page content?
Thanks in advance!
|
|
|
|
|
in My MDI, i have two toolBars. when run app, the standard toolBar is on top, another toolBar is below it. How can I manage the second toolBar beside the standard toolBar?
thanks
|
|
|
|
|
class CMainFrame : public CMDIFrameWnd
{
CToolBar m_wndToolBar;
CToolBar m_wndToolBar2;
};
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
EnableDocking(CBRS_ALIGN_ANY);
DockControlBar(&m_wndToolBar);
RecalcLayout();
CRect rect;
m_wndToolBar.GetWindowRect(rect);
rect.OffsetRect(rect.right, 0);
m_wndToolBar2.EnableDocking(CBRS_ALIGN_ANY);
DockControlBar(&m_wndToolBar2, AFX_IDW_DOCKBAR_TOP, rect);
return 0;
}
Ovidiu Cucu
Microsoft MVP - Visual C++
-- modified at 12:34 Saturday 24th June, 2006
|
|
|
|
|
Thank you very much. I spend lots of time trying to figure it out.
|
|
|
|
|
Hi,
Fortitudine Vinsinues!
|
|
|
|
|
Best,
Jun
|
|
|
|
|
Sorry. I don't know what happened. I just pressed the enter key and the message got posted before I could type my question!!
My question:
I have often come across statements such as 'this program has the following modules' or 'the program should have accounting,financing etc modules'.
What exactly are modules? How can one create different modules and then integrate it into the main program in vc++6 using mfc?
Thanks,
Tara
Fortitudine Vinsinues!
|
|
|
|
|
A module is a unit of related code. It is just an organizational term. For example, you may have an accounting module that supports balancing checkbooks, producing income statements, calculating interest and dividends, etc., that is all compiled into a library and used by the main application (which, presumably, would have something to do with accounting). Alternatively, that module could be built as part of the application itself.
The term "module" doesn't convey enough information to tell you how the application is organized, just that it is organized into compartments.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
OK.
I am coding a program that has seprate dialog boxes that do something with budget, payroll, piecharts etc. There are no individual libirary made but the dialog boxes have their own classes. So can I call safely call budget, payroll as modules?
Fortitudine Vinsinues!
|
|
|
|
|
Technically, anything that is encapsulated and full-functional by itself (that is, doesn't rely on something else to fulfill its purpose) can be called a "module". In your case, it is better to call them classes (assuming that is what they are) since the term "class" is a specific type of module (that is, it conveys more information than just calling it a "module").
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
Module is probably one of the most frequently used terms in software development. This is a definition from Wiki:
"In computer science, a module is a software entity that groups a set of (typically cohesive) subprograms and data structures. Modules are units that can be compiled separately, which makes them reusable and allows multiple programmers to work on different modules simultaneously. Modules also promote modularity and encapsulation (i.e. information hiding), both of which can make complex programs easier to understand..."
Best,
Jun
|
|
|
|
|
TheinstruTara wrote: What exactly are modules?
One example would be Microsoft Office. The modules that comprise it are Word, Excel, Access, etc. You can add or remove the modules without affecting the others.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
How are they made? How do I go about making them in vc++6. Is mfc enough?
Fortitudine Vinsinues!
|
|
|
|
|
As you see now, module is a pretty vague term. On Windows, they can be a library (Lib/DLL), COM component, executable, now assembly, etc.
TheinstruTara wrote: How do I go about making them in vc++6.
Approximately, if you have a peice of code that accomplish some well defined functionality and you want it to be reusable by other applications, you may build it into a module.
TheinstruTara wrote: Is mfc enough?
Yes. Many other tools/technologies are available as well, like Win32, ATL, etc.
Best,
Jun
|
|
|
|
|
Thank you.
Fortitudine Vinsinues!
|
|
|
|
|
TheinstruTara wrote: How do I go about making them in vc++6.
However you want.
TheinstruTara wrote: Is mfc enough?
Certainly.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hello everybody, I come directly to the point. I want to make a simple game that starts with a DialogBox(using MFC probably?) and then the user can choose between windowed mode and fullscreen(graphics) mode so I could use the OpenGL libraries.The problem is that I can't figure out how to create the fullscreen mode after the user pushes the coresponding button.Do I have to use any API functions or MFC?
|
|
|
|
|
Getting the basics done won't be too hard, but handling some more complex actions will be (I'll explain that in a minute). To create a full-screen window, you will need to create a window type that grabs the whole screen instead of the client area. You can look at some of the screen saver examples on this site for that, or look at some of the OpenGL and/or DirectX examples all over the internet.
The tricky part is going to be handling things like Alt-Tab (which means a loss/restore of the screen device and all input devices).
Instead of showing the dialog, you could approach it the way that most games do these days and allow for a command line switch (if you use the DirectX helper classes, this is built in for you). I'm not sure if the OpenGL libraries give that to you for free, but I've seen a number of samples that allow for it, so at the very least, it wouldn't be too difficult to find a solution for it.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
http://nehe.gamedev.net/[^] has some good tutorials. I think Lesson 2 shows how to toggle between windowed and full screen mode.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
Unfortunatelly NeHe doesn't explain how to do that using MFC,only using windows API and its very difficult to create a dialog box by this way
|
|
|
|
|
nyquisttt wrote: I am new to managed c++.
So, why posting in the C++ forum ? Use the managed forum[^] instead.
Cédric Moonen
Software developer
Charting control
|
|
|
|