|
Well, you can distribute a new exe, or make a patch that updates the old one. Or load the functionality that you might update from dlls, and update those
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Thanks Christian. I realize that just replacing the old exe with a new one is the easiest option, but this is not as elegant as distributing an upgrade that is nice and small, and only replaces the bits of the program that are out of date. So I guess I would like to make "a patch that updates the old one". But how do I do that? Once I have compiled my exe, surely I can't change anything in its code?
Thanks for replying!
Mick
|
|
|
|
|
Oh right, so I think I understand. I have to compile each class as a dll, then replace the dlls that are being upgraded, leaving the remainder as they are?
Mick
|
|
|
|
|
You can do that, choosing just the classes that you're likely to change. Or you can use a tool which basically diffs the two exes ( old and new ) and then makes a program which takes the differences, and merges them into the existing ( old ) app on the client machine.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
In MS Studio VC++ 6.0, I want use the following code to get Local PC IP Address, However IPString is always returned as "0.0.0.0" why???
Thanks for any suggestion.
void CDispipDlg::OnButton1()
{
// TODO: Add your control notification handler code here
CMySocket pp;
CString IPString;
UINT nPort;
pp.Create();
if(pp.GetSockName(IPString,nPort))
{
AfxMessageBox(IPString);
}
else
{
AfxMessageBox("Got an Error");
}
}
|
|
|
|
|
Hi again, I have another problem.
I'm creating a test COM server to learn more about the COM interface.
Now I tried to call call the server via C, and everything works fine.
But when I'm trying to call the server using VBScript then always the same error occurs:
800A01A8 - Object required
The script looks like this:
Dim t
Set t = CreateObject( "atlcom.TestInterface" ) (the interface gets loaded here, I used OutputDebugString to make that sure!)
t.MsgBox "Test" <- this is the error line.
I don't know what is wrong.
Do you have any ideas?
Don't try it, just do it!
|
|
|
|
|
[edit]And why was this post awarded a 1? Did I hurt anybody's feelings or what? [/edit]
VBScript can only handle IDispatch-based COM objects.
BTW, this isn't the best forum for COM questions..
--
Arigato gozaimashita!
|
|
|
|
|
ah thanks, didn't know that!!
Don't try it, just do it!
|
|
|
|
|
|
Hi
I'm trying to design a control, derrived from CStatic with keyboard navigation support. When user press the Tab button I call GetNextDlgTabItem and then SetFocus, but, for example, if the next control in tab order is button it draws inproperly - the focus rect is drawn, but the button does not look as default.
|
|
|
|
|
Hi all, I'm kinda new to C++ and I'm using it to try and understand object orientated programming.
I've got a few classes written which I have copied from a book and stripped down to the bare minimum so I can try and see what is going on. Basically I have 3 classes ( TruckLoad, Box and List ). As far as I understand it List is a aggregation of the Box class so that multiple instances of the Box class can be stored ( container class - I think ). TruckLoad is a class which contains a list of the box objects. So the dimensions of each box are stored in each instance of the box object which is stored in the TruckLoad list.
I am trying to store a list of characters instead of a list of numbers. I tried changing all the 'double' declarations to 'char' but a number of errors were produced. If I wanted to store a list of characters instead of a list of numbers how would I do this? For example when the program is run it produces:
The largest box in the first list is 100 by 100 by 100
Press any key to continue
What I am asking if I wanted to produce the following how would I do it?
The largest box in the first list is one hundred by one hundred by one hundred
Press any key to continue
If you want to take a look at the classes I've put together, you can download all the entire project files here:
www.hostmaster-x.co.uk/c++/
Thank you in advance.
CaptainChainsaw
|
|
|
|
|
I have a dialog in a DLL that I need to set to the system tray. Is that possible and if o how can I do that?
|
|
|
|
|
You mean real dialogs? Like quicklaunch bar?
Don't try it, just do it!
|
|
|
|
|
Yes a real dialog.
I have a dialog window in my DLL file and I want to send that dialog do the system tray is that possible?
|
|
|
|
|
Do you want a tray icon which activates a dialog on click, or a deskband? It's not clear what you mean.
--
Arigato gozaimashita!
|
|
|
|
|
For your information guys ,
Quick launch bar is not in system tray , it is on taskbar. System tray is the area where system time is displayed.
You need to add just one icon there and your application will get notified when user clicks/dblclicks on that icon. Then you can display a dialog box.
See Win32 API called Shell_NotifyIcon in MSDN for more help.
|
|
|
|
|
Here's an article[^] that covers this. Try using the search function (available on every page of Code Project) using "system tray" (including the quotes) as the search phrase.
Software Zen: delete this;
|
|
|
|
|
Is there a way to capture the pressing of a KB key in a CDialog item? The usual handler (ON_WM_KEYDOWN) don't work at all. Thanks!
|
|
|
|
|
By default, most keypresses within a dialog are going to be processed by the control within the dialog that has the focus. For example, if you've got a check box, an edit control, and a button within the dialog, one of those controls will process keypresses if they've got the focus.
Software Zen: delete this;
|
|
|
|
|
Yes, I know that but I thought that there's a direct way. I don't know how to send the message from the control to the dialog. I tried with SendMessage() (in OnKeyDown() of my control) but I'm not sure for the way to refer to the dialog and the right set of parameters. Could you give me some example? Thanks in advance!
|
|
|
|
|
Hi everyone, I have a problem with linking COM interface and class ids from my own COM server dll.
The class is called CLSID_TestInterface.
It is declared in a machine generated header file called atlcom.h:
EXTERN_C const CLSID CLSID_TestInterface;
The definition is (also machine generated .c file):
MIDL_DEFINE_GUID(CLSID, CLSID_TestInterface,0x50DC50D4,0xAE1E,0x4B05,0x84,0x99,0xF2,0xFE,0x2F,0xEF,0xA8,0xD2);
When I include atlcom.h in the client app and use the class id for CoCreateInstance then there will be this linker problem:
... unresolved external symbol _CLSID_TestInterface ...
My question is:
Where does the compiler get the class id of a client server dll from? / What am I doing wrong?
Don't try it, just do it!
|
|
|
|
|
You'll also need to include the .c file too, as this is the file that defines the value of the CLSID.
Sorry talking crap.
From MSDN
SUMMARY
A GUID must be initialized exactly once. For this reason, there are two different versions of the DEFINE_GUID macro. One version just declares an external reference to the symbol name. The other version actually initializes the symbol name to the value of the GUID. If you receive an LNK2001 error for the symbol name of the GUID, the GUID was not initialized.
You can make sure your GUID gets initialized in one of two ways:
If you are using precompiled header files, include the INITGUID.H header file before defining the GUID in the implementation file where it should be initialized. (AppWizard-generated MFC projects use precompiled headers by default.)
If you are not using precompiled headers, define INITGUID before including OBJBASE.H. (OBJBASE.H is included by OLE2.H.)
Although personally, I'd recommend using the COM smart pointer method via #import as I find it a much cleaner way of using COM
Michael
CP Blog [^]
|
|
|
|
|
|
In my application I trap the end of entering text in an edit control with an OnKillfocus... function. When I press the ENTER key the commands in the OnKillfocus... function are executed but then my entire application terminates. I use GotoDlgCtrl(...) to set the focus to another control which works but then the application terminates. Do I need to trap the ENTER key and do something else? Thanks.
|
|
|
|
|
Is it a dialog-based application ?
If so, then pressing Enter is the same thing as clicking on the default button, which generally is Ok. What happens is that when you press Enter, the focus first moves from the edit box to the default button (thus firing the OnKillFocus event) and causes a click on the default button, thus terminating the application.
To fix this, change the default button of your application to something else. Alternatively, you can trap the enter keypress (WM_KEYDOWN event) or override the default OnOK handler, omitting the call to CDialog::OnOK, which will terminate the dialog.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|