|
Because the definition of GetCurrentTime is
CTime GetCurrentTime(); And not void CTime::GetCurrentTime();
I think that this is a cuestion for the Microsoft Developers.....
Is True, Is more is more intuitive of the other form, but they developed it of that
way.
Cheers!!!!
Carlos Antollini.
|
|
|
|
|
I'm not sure of the exact implementation details, but did you notice that the GetCurrentTime method of the CTime class is a 'static' method? That is the reason for how it is used. Why it's declaration is such, I don't know. That relates to how the developers decided to do things.
Chris
|
|
|
|
|
Yeah GetCurrentTime is a static method that is why you call it using that syntax. The method create a CTime object in this way CTime(::time(NULL)). The GetCurrentTime is creating a new CTime Object of which the member m_time contains the latest time.The assignment operator copies this value
CTime tm;
tm=CTime::GetCurrentTime();// operator=(const CTime& timeSrc) comes into action
Mail back if you have more info
|
|
|
|
|
Yeah GetCurrentTime is a static method that is why you call it using that syntax. The method create a CTime object in this way CTime(::time(NULL)). The GetCurrentTime is creating a new CTime Object of which the member m_time contains the latest time.The assignment operator copies this value
CTime tm;
tm=CTime::GetCurrentTime();// operator=(const CTime& timeSrc) comes into action
Mail back if you have more info
|
|
|
|
|
Hello all,
I want to include an excel-type chart in my app. How can I add controls like the data grid and chart control in vc++ its easy in visual basic. Can I do similar things in VC++ 6?
Thankyou
|
|
|
|
|
Its easy to do... For example if you have just created a dialog type application you can right click on the dialog and pick Insert ActiveX Control, from here you can pick your ActiveX grid or excel controls.. or from the the menu bar in Visual C++ pick "Project" then "Add to Project" next chose components and controls.. then go to Registered ActiveX Controls folder.
Have Fun!
Rob Jones
|
|
|
|
|
Hi:
I´ve define a dual interface with connection points in VC++, and I want to send data to VB, but I don´t know what have to put in VB to finish the connection. Cuold someone help me? I would grateful if you would send me an example code. Thanks.
|
|
|
|
|
Do you want to say with "finish the connection"?
Carlos Antollini.
|
|
|
|
|
I don´t know the instructions that I have to put in VB to get that the server in VC++ send message to VB, VB catch this msg and display it. Cuold you respond me now?
|
|
|
|
|
CreateObject()
Carlos Antollini.
|
|
|
|
|
Look at the Implements keyword.
Quick pseudo code example to give basic idea.
Implements IConnection
Dim obj as Object
Dim Cookie as Long
private sub Form_Load()
set obj = CreateObject("myapp.object")
Cookie = obj.Advise(Me)
end sub
private sub Form_Unload()
obj.Unadvise(Cookie)
end sub
private sub IConnection_MyConnectionPoint
MsgBox "Called by VC++"
end sub
|
|
|
|
|
Hello,
I'd like to know if it is possible and if so how, to indeed patch a Windows function in order to make all programs use it in standard.
For example, softs that "skin" windows are able to change the default shape of windows. How such things can be achieved ? For example, how would it be possible to have windows with a border of 5 pixels wide instead of the regular 1-pixel ? Or how would it be possible to change the standardclose button image ?
Thank's in advance,
--Francois
|
|
|
|
|
i actually don't know how applications like TALISMAN "skin" windows, but there is a SDK from microsoft called "Detours", which enables you to replace a regular API function with your own. have a look at:
http://research.microsoft.com/sn/detours/
|
|
|
|
|
I have the handle of a window that has been created by an Active X and I want to hook its right click message.
Any idea ?
Thanks
|
|
|
|
|
You need to subclass the window. The topis is too complex to discuss it in detail here. Good starting point is CallWindowProc docs in MSDN. Paul DiLascia created MFC-based solution called CSubclassWnd - it first appeared in June 1997 issue of Microsoft Systems Journal. The article is available in 'Periodicals' section of MSDN.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
Hello,
I've encountered a CPropertyPage problem that has me very puzzled and
may be a bug. Perhaps someone has seen it and can offer an
explanation and/or solution.
Here's the situation.
Windows SDI app, VC++ 6.0, Windows NT 4.0. I used class wizard to
create the app and used CFormView for the view class. Added a
dialog box and using the dialog editor changed its properties to:
Style: Child, Border: Thin, Title bar, Disabled. I then added
a single Edit Box. Then using class wizard I created a CPropertyPage
class based on this dialog and also created a CPropertySheet class.
Added code to show them.
Everything works as expected, except: You cannot set the focus on
the edit control by clicking on it with the mouse. You can only
set focus to it by using the tab key.
I have a very small project that shows the problem clearly.
If anyone has any insight it would be greatly appreciated.
Dougb
|
|
|
|
|
I am working on an Explorer-type app, and would like to hide the tree view (left side). Note that I don't want to delete or destroy it, since the tree conatins important structural data that I don't want to lose. I've found no examples for thids. Some suggest setting the row width to zero, but the spplitter bar still appears. Any suggestions?
|
|
|
|
|
I'm afraid there's no silver bullet here - you'll have to play tricky. When user switches the tree off, reparent the panes using ::SetParent or CWnd::SetParent, hide the tree and destroy the splitter.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
Hi
I stored two points in an xml file and retrieved them in OnOpenDocument()
but How can I pass these values to View to draw a line with the points?
Pathi
bhikshapathi_g@semanticspace.com
|
|
|
|
|
Overide your document's OnOpenDocument() and OnSaveDocument() members.
-Ben
---------
On the topic of code with no error handling -- It's not poor coding, it's "optimistic"
|
|
|
|
|
Hi,
How can i unregister an ActiveX in my computer ?
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Hi,
Use regsvr32 with the /u option.
Regards,
Alwin
|
|
|
|
|
Use regsvr32. Call it without parameters to get the usage information.
HTH,
Thomas
I am a signature virus!
Help me spread and copy me to your sig!
|
|
|
|
|
There's also some registry hacks that add register and unregister to the right click menu. They're either on this site or codeguru. If the file is located in "%windows%\downloaded program files" then you can right click on it and select remove.
|
|
|
|
|
Here is how I do it on my machine (for adding right click menu option)
Open your registry using RegEdit (not regedit32)
Find The key HKEY_CLASSES_ROOT\dllfile\Shell
Create a new Key call it RegisterIt
HKEY_CLASSES_ROOT\dllfile\shell\RegisterIt\
in the default string change it to "Lets register this"
Create a subkey call it Command
HKEY_CLASSES_ROOT\dllfile\shell\Register\command
in the default string type the "regsvr32 "%1""
And there you go.
cheers
Alfadhly
It is Illogical to define an inventor by his invention
|
|
|
|