|
Is there an easy way to create a dialog app that when executed doesn't appear but is still running in the background?
Thanks in advance!!
Rob Jones
|
|
|
|
|
Do you expect your dialog to be always invisible? Or only until some event occurs?
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
|
If your app targets NT/W2K only, you can consider creating a service. If you need to run on Win9x, hiding main window should work.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
I Use ShowWindow(SW_HIDE)
Cheers!!!!
Carlos Antollini.
|
|
|
|
|
I *finally* figured out how to use the CTime class successfully...
CTime CurrentTime = CTime::GetCurrentTime();
or
CTime CurrentTime;
//blah blah
CurrentTime = CTime::GetCurrentTime();
I don't get it. Why do you have to do it that way, and why doesn't the following work...
CTime CurrentTime;
CurrentTime.GetCurrentTime();
- John
------------------------------------------------
Before you critisize a man, walk a mile in his shoes. Then when you critisize him, you are a mile away and have his shoes.
|
|
|
|
|
CTime tm = CTime::GetCurrentTime();
If you want to Know the Hour or the minutes, you can do:
CTime tm = CTime::GetCurrentTime();
int nHour = tm.GetHour();
int nMin = tm.GetMinute();
etc.
Regards...
Carlos Antollini.
|
|
|
|
|
I think my question was unclear. I don't understand why the CTime object has to be initialized that way. Why can't it be initialized like this:
CTime tm;
tm.GetCurrentTime();
- John
|
|
|
|
|
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?
|
|
|
|