|
Don't problem with that.
You must to have the service in a exe file, but you can make dlls to manage messages, connctions with databases, etc. You only need the main loop in a exe with the basic functions of the service, like onservicestart, onservicestop, etc. You always need to have the control of your service in a exe file, if you are using dll for make other things, is not a problem, you only need to have care with some points....;)
Regards
My software never has bugs. It just develops random features.
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
Carlos Antollini wrote:
You must to have the service in a exe file, but you can make dlls to manage messages, connctions with databases, etc.
Thanks a lot for your quick answer.
Was very useful for me, because make me clear
enough what I have to do.
Regards,
Miguel
|
|
|
|
|
Could anybody helps me how to call Excel math functions from VC++ ??
Especially functions with direct parameters / not parmeters from the cells /
as a
ACCRINT
POWER
etc.
Mira
|
|
|
|
|
Do you want to interact with Excel for some reason, or do you just want the functions in math.h ?
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Picture the daffodil. And while you do that, I'll be over here going through your stuff.
|
|
|
|
|
I've got the following problem, andwould be pleased to have any info or tip to solve it:
I use for my OpenGL scene texture objects which I load in the texture memory (on a Nvidia GeForce2 GTS). I'll check they are resident using glAreTexturesResident, everything is fine. The problem is when I delete these textures objects (using glDeleteTextures), and re-create others, those can't no more be loaded as resident, as if the previously ones were not freed from the texture memory, and still use the space. The consequence is the frame rate abruptly falls, logically.
If anybody has info, please help ! TIA.
K.
|
|
|
|
|
I need something about registry backup. If You someone help me with sourse where I can see new or old information about it I'll be glad very match... sanks...
|
|
|
|
|
I forget the names, but the registry is in two files, you need only to copy them somewhere.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Picture the daffodil. And while you do that, I'll be over here going through your stuff.
|
|
|
|
|
In win98 you can make copy of system.dat and user.dat,both of which are hidden files in the windows folder.In NT and wn2000 I think you should create an update emergency repair disk.(see your operating system doc)
Mazy
Don't Marry a Person You Can Live With...
Marry Someone You Can Not Live Without
|
|
|
|
|
There is a system backup tool with win98 that backs up your registry, along with a few other things, so take a look if you have win98. Or you can do it manually (system.dat, user.dat, as mentioned in the previous post).
Simon
"It's one for you, nineteen for me."
Sonork ID 100.10024
|
|
|
|
|
You can export your entire registry as a text file [.reg] and zip it. Later on, double-click it to get things back.
Nish
Nish was here, now Nish has gone;
He left his soul, to turn you on;
Those who knew Nish, knew him well;
Those who didn't, can go to hell.
I like to on the Code Project
Sonork ID 100.9786 voidmain
www.busterboy.org
|
|
|
|
|
Hi,
I'm new to vc++ and i'm writing an application which is using propertysheets(just like the clock in the systray) and it is required to be minimized to the systray. Everything is working fine in dialog box but when it comes to CPropertySheet i couldn't find any event which i can catch and minimize my application to the systray. I tried using WM_DESTROY but of no use and i figured out(rightly or wrongly) that WM_CLOSE, WM_CANCELMODE, WM_CANCEL are not being called???
I'm in a fix and i'm not getting any answers. Any ideas????
Thanx in advance,
Rohit
Rohit
|
|
|
|
|
Handle WM_SIZE
If the handler shows that the window is minimizing, then do a ShowWindow(SW_HIDE) and add you app to the systray.
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
Thanx Jon,
But i'm sorry to say that i forgot to mention that i'm using SHELL_NOTIFYICON and the application is working just fine i.e. it minimizes to the systray, but the problem starts when i try to use CPropertySheet instead of CDialog class. And still i'm succesful in a way that the application is still(i.e. the CPropertySheet application) being minimized to the systray. But, when i close the application by either pressing 'x' or cancel or ok button the icon is removed from the tray.
For that matter i have to catch the close or cancel event of the PropertySheet so that i can, based on some var minimize it to the systray or exit the application.
Again thanx for atleast taking some time to read and reply
Pls try to find a solution for me??
Rohit
|
|
|
|
|
When your dialog receives a WM_CLOSE message, it closes. And this sounds like what is causing your icon to be removed from the tray.
You can handle the WM_CLOSE message yourself, with classwizard. The implementation it gives you will have a line to call OnClose() in the base class. If you leave that line in place, then your dialog will close.
Therefore, in your overridden OnClose() member, you need to NOT call the base class implementation, and instead do stuff to hide your window, and install your tray icon.
This will all work fine. Until you want to close your window for real!!! A way to sort this out (that i've used before):-
class CMyDialog
{
....
BOOL bClose;
}
CMyDialog::InitDialog()
{
....
bClose=FALSE;
....
}
CMyDialog::OnClose()
{
if (bClose)
{
CDialog::OnClose();
} else
{
}
}
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
Look up Shell_NotifyIcon.
You need to use that to add an icon to your sytem tray. And then hide your window or dialog.
Nish
Nish was here, now Nish has gone;
He left his soul, to turn you on;
Those who knew Nish, knew him well;
Those who didn't, can go to hell.
I like to on the Code Project
Sonork ID 100.9786 voidmain
www.busterboy.org
|
|
|
|
|
Thanx Nish,
But i'm sorry to say that i forgot to mention that i'm using SHELL_NOTIFYICON and the application is working just fine i.e. it minimizes to the systray, but the problem starts when i try to use CPropertySheet instead of CDialog class. And still i'm succesful in a way that the application is still(i.e. the CPropertySheet application) being minimized to the systray. But, when i close the application by either pressing 'x' or cancel or ok button the icon is removed from the tray.
For that matter i have to catch the close or cancel event of the PropertySheet so that i can, based on some var minimize it to the systray or exit the application.
Again thanx for atleast taking some time to read and reply
Pls try to find a solution for me??
Rohit
|
|
|
|
|
Can u explain as to which one of them is your problem :
(1) How to catch the CLOSE message, so that you can properly override it according to your needs?
or
(2) You have already overriden the close function and want to know how to minimize the application to the taskbar again ?
-kashif
peace to all
|
|
|
|
|
Hi,
Thanx Kashif
My problem is i'm not able to find a suitable event to catch where i can hide my window.
Anyways i have found a work around.
But still thanx
Rohit
|
|
|
|
|
Assuming that you have already overridden the OnClose() method (WM_CLOSE message) and want to hide the application again here's what you should do.
/* get the handle of the application and simply hide through the code similar to the pne given below. Since your application icon already exists in the taskbar you need not put it there again. Simply hiding the main window should do the trick*/
::ShowWindow(GetParent()->GetSafeHwnd(), SW_HIDE);
hope it helps,
-kashif manzoor
peace to all
|
|
|
|
|
Hello,
I wonder how to change the class name of the CDialog created with MS Visual C++ 6? By default it is '#32770' but I want to use another class name for my app. I can't find the answer anywhere. Please help!
CK
|
|
|
|
|
Add the following to your PrecreateWindow function:
// Remove 'Untitled' from caption
cs.style &= ~(LONG) FWS_ADDTOTITLE;
if( !CFrameWnd::PreCreateWindow(cs) )
return FALSE;
if (NULL == m_winClassName)
{
m_winClassName = RegisterSimilarClass("MyClassName", cs.lpszClass, IDR_MAINFRAME);
if (!m_winClassName)
return FALSE;
}
cs.lpszClass = m_winClassName;
and add the RegisterSimilarClass function as follows:
static LPCSTR RegisterSimilarClass(LPCSTR lpszNewClassName,
LPCSTR lpszOldClassName, UINT nIDResource)
{
// Get class info for old class.
//
HINSTANCE hInst = AfxGetInstanceHandle();
WNDCLASS wc;
if (!::GetClassInfo(hInst, lpszOldClassName, &wc)) {
TRACE("Can't find window class %s\n", lpszOldClassName);
return NULL;
}
// Register new class with same info, but different name and icon.
//
wc.lpszClassName = lpszNewClassName;
wc.hIcon = ::LoadIcon(hInst, MAKEINTRESOURCE(nIDResource));
if (!AfxRegisterClass(&wc)) {
TRACE("Unable to register window class%s\n", lpszNewClassName);
return NULL;
}
return lpszNewClassName;
}
Replace IDR_MAINFRAME with the ID of your dialog. This *should* work, I've done it in a doc/view app, and the code is off MSDN, it's by Paul De Lascia.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Picture the daffodil. And while you do that, I'll be over here going through your stuff.
|
|
|
|
|
The PreCreateWindow function is not called when creating a dialog box:
(From Visual C++/MFC Frequently Asked Questions)
Why isn't my CDialog::PreCreateWindow() getting called?
PreCreateWindow does not get called when you create a dialog box. If you would like to init some data/controls for a dialog box, you have to trap the OnInitDialog message and then do your stuff there. PreCreateWindow is used to modify params for a window that you are creating.
I am going to try to debug into the creation of CDialog, maybe I will see where the class name is assigned...
|
|
|
|
|
- Manually edit your
.rc resource file and add the following to the definition of your dialog template:
IDD_TEST_DIALOG DIALOGEX 0, 0, 185, 92
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW
CAPTION "Test"
FONT 8, "MS Sans Serif"
<font color="#ff0000">CLASS "MYDIALOGCLASS"</font>
BEGIN Of course you can replace "MYDIALOGCLASS" with whatever name you please.
- Register the new class somewhere before the creation of the dialog (
InitInstance is a good place):
WNDCLASS wc;
GetClassInfo(NULL,"#32770",&wc);
wc.lpszClassName="MYDIALOGCLASS";
AfxRegisterClass(&wc); - Enjoy!
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hey, it works. Thank you very much!
CK
|
|
|
|
|
Made a cd writing application and when it was creating the ISO I had a modeless dialog box, it was there for about 15 minutes and it crashed
It doesnt crash when its just there for a few minutes
anyone seen this before???
|
|
|
|