|
I got a little proglem here though
The computer which I am interested in is on LAN. that is the computer running SQL SERVER and where SQLSERVERAGENT service should be running.
the problem is
OpenSCManager function returns RPC server not available if I use the following call:
::OpenSCManager( "\\servername", SERVICES_ACTIVE_DATABASE, SC_MANAGER_ALL_ACCESS );
and it paase and returns a handle if I make this call
hscManager = ::OpenSCManager( "servername", SERVICES_ACTIVE_DATABASE, SC_MANAGER_ALL_ACCESS );
the subsequent call to ::OpenService passes if i do this
hscService = ::OpenService( hscManager, serviceName, SERVICE_ALL_ACCESS );
but then the call to QueryServiceStatus fails if i do the following
::QueryServiceStatus( hscService, lpServiceStatus )
the error code says Invalid Handle (i assume hscService ).
What am i doing wrong here?
If the calls to openscmanager and openservice paas the QueryServiceStatus fails. but if I append "\\" to the servername the openscmanager fails.
what is going on here??
Anyone can help?
|
|
|
|
|
Ok. I've tried putting in every valid path combination in the projects settings, but the .obj files ALWAYS ends up under $(ProjectDir)/Debug. No matter what I do. Any ideas?
/Rob
|
|
|
|
|
I remember having problems with this a while ago.
Check that the 'Object File Name' (C/C++ - Output Files) is set to the location that you expect, if visual studio can't work out what the location means it will output to the default location (with no warnings or errors). Specifically check that you have a trailing slash.
$(IntDir)/
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts your aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
Will check that. Because the odd thing is that the buildlog.html file does end up in the directories specified, but not any of the output files *.obj etc. etc.
Thanks Andrew.
|
|
|
|
|
Indeed Andrew,
I think the problem arised from having VC++ 6 projects ported to VS .NET . The "output files" section as you pointed out, was ".\Debug/" . By clicking the combobox and selecting "<inherit project defaults>", the correct path was setup, i.e. "$(IntDir)/" and everything worked A OK.
Thanks again Andrew,
/Rob
|
|
|
|
|
I'm trying to hide various portions of a window, much like what windows media player ( versions 9 and 10, i believe ) does with the titlebar... only im trying to hide the bottom of the application instead of the titlebar. Does anyone know the window properties i need to manipulate to perform this?
I don't want to just make the window height 0 because that really isn't efficient, in my opinion.
Thanks in advance for any help
Regards,
will
|
|
|
|
|
Blast! I forgot how to do that. But never fear there are a lot articles at CP that tell you all you need to know. Windows, button, etc...
Have Fun!
INTP
|
|
|
|
|
You can do something like that using SetWindowRgn()
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Does anyone know how i can check a menu item? evrytime i click this item in the menu i want it to get checked
the menu is from resource...
I have no idea
|
|
|
|
|
search for CMenu::SetCheck() or something like that...
TOXCCT >>> GEII power [VisualCalc]
|
|
|
|
|
If you made own class like MessageBox from what class it would be derivatived and why?
|
|
|
|
|
if you mean you want to reproduce MessageBox-like Classes, CDialog seem to be a good class...
otherwise, please precise a bit more what you want.
TOXCCT >>> GEII power [VisualCalc]
|
|
|
|
|
Yes, I want to create a MessageBox-like class with extended features. But, why not CWnd class instead CDialog?
|
|
|
|
|
because CWnd is not a class for dialogs... or you recreate your own CmyDialog !!??!! i advise you not to... lol
use CDialog to create dialog boxes...
TOXCCT >>> GEII power [VisualCalc]
|
|
|
|
|
ell, thanks you.
I'll think about this.
|
|
|
|
|
Is there a trick displaying large document with ScrollView in SDI MFC?
Currently my text display stutters and scroll lags behind when I scroll the document.
|
|
|
|
|
Yogi Berra: "Only draw what needs to be drawn"
Use CDC::RectVisible/PtVisible/GetClipBox/etc to determine which part of the viewable area of screen is marked for redraw, and only draw the part of the document that resides within it/intersects with it.
Drawing the entire document each time is a sure fire bog down.
Pssst. You see that little light on your monitor? That's actually a government installed spy camera. Smile and wave to big brother!
|
|
|
|
|
Here is what I changed so far
pDC->GetClipBox(RectClip);
ScrollClip=GetScrollPosition();
begin=ScrollClip.y/18;
zone=(RectClip.bottom)/18+1;
pos = DataList.FindIndex(begin);
mPt.y=ScrollClip.y;
for(i = begin; (i < (begin+zone)) && (i< nbrData); i++){
pPairing = (CData*)DataList.GetNext(pos);
mPt.x=0;
prefix.Format("%d: ", i);
pDC->TextOut(mPt.x, mPt.y, prefix+pPairing->PrintOut());
mPt.y+=18;
}
The scroll bar still lags a little but at least it's more responsive now. The other problem I have is if I scroll too fast the display will overlap.
|
|
|
|
|
Is there any way to call the CWinApp::OnFileNew except from cliking on the menu item with the default ID_FILE_NEW ;
Because Of the fact the CWinApp::OnFileNew is a protected member function of CWinApp i Couldn't call AfxGetApp()->OnFileNew()
Then I tried
ON_REGISTERED_MESSAGE(MY_REGISTERED_MESSAGE,CWinApp::OnFileNew) and i posted the message from my CView function but didn't work as i expected.
So maybe i was thinking I could fake the effect of cliking on the the menu or pressing the accelerator combination so that i can have the result something like you know FireCommand(ID_FILE_NEW); then the handler of CWinApp ON_COMMAND(ID_FILE_NEW,CWinApp::OnFileNew) does the required job
Is there any way to get around this
|
|
|
|
|
|
Get a pointer to your document template, and call OpenDocumentFile(NULL) on it. This will create a new document.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
I have a dialog app. In my main window I have the application icon. I wrote a dialog with property sheet and did this:
m_psh.dwFlags |= PSP_USEHICON;
m_psh.dwFlags ^= PSH_HASHELP;
m_psh.hIcon = AfxGetApp()->LoadIcon(IDI_PROPSHEET);
I think I can change this icon when I load each property sheet but I do not need to. What I do need is that now my apps other dialogs do not have an icon. So how am I to put an icon on the corner of each of my other dialogs?
Thank you
|
|
|
|
|
If your dialog is a CDialog, its base class is CWnd so you can call the SetIcon() member function and don't forget to destroy the icon once you've finished with it.
HTH
"Oh, I'm sick of doing Japanese stuff! In jail we had to be in this dumb kabuki play about the 47 Ronin, and I wanted to be Oshi, but they made me Ori!"
|
|
|
|
|
BOOL CmyDialog::OnInitDialog() {
CDialog::OnInitDialog();
SetIcon(m_hIcon, TRUE); <font color=#008000>
SetIcon(m_hIcon, FALSE); <font color=#008000>
}
TOXCCT >>> GEII power [VisualCalc]
|
|
|
|
|
Hi
I have an MDI application which deal with 3 types of document: let's say IMAGE, TEXT, SHEET. this is a classical doc/view architecture with multidoct emplate.
I'd like to have an modeless dialog which execute (when a button in this dialog is clicked) an action on the current topmost visible mdi child, only if it is an image. That means, if the current open window is a TEXT window, the button does nothing. But if it is a IMAGE window, it runs the process. How to get the actual topmost MDI view and its type? (in fact, I need a pointer to the actual topmost ImageView window)
BTW I've tried to maintain a ImageView pointer, called *currentView, which is set to the actual active ImageView but it does not work well because when the user closes the ImageView, the pointer is not set to the next open ImageView window (in this case we suppose there are several imageview window open).
Please, Help, I can't find a solution for those pb.
Thank you very much in advance
regards
Guy LECOMTE
|
|
|
|