|
Hello
I find that when I double-click a .dsw file (VC++ 6.0 workspace) it will launch VC++ 6.0 and open it as expected.
However if I double-click a second .dsw file while the first is still open, it reuses the first VC++ instance (effectively closing the first one) instead of spawning a second VC++ process thereby having two (which is what I want). In the end I have to remember to first start VC++ 6.0 and then open the workspace to prevent the closing of my first workspace.
I notice that this behavior does not occur with Visual Studio.NET (2003 anyways).
I did check all options and settings in VC++ 6.0 as well as the online product documentation here (to no avail):
http://msdn2.microsoft.com/en-us/library/aa468126.aspx[^]
Might anyone know how I can change things such that a new instance of VC++ 6.0 is started when a .dsw file is dbl-clicked when there is already a workspace open?
Thanks !
Sincerely,
Christopher Brack
|
|
|
|
|
Even I am interested in knowing how
Thammadi
|
|
|
|
|
Hi All,
I have an existing ActiveX DLL (Project in Visual Studio 6.0), I want to convert it to ActiveX EXE, I want to do it in VS 6.0 only, what is the best way to do that?
Please help me on the same.
Thanks,
Anand.
|
|
|
|
|
Anand Todkar wrote: ActiveX EXE
Uuh ?? What is an ActiveX exe ??? You mean you want to have a plain standard application ?
What does this ActiveX do ? And what are you trying to do exactly ?
|
|
|
|
|
Ok.. Forget ActiveX .. Is it possible to convert DLL created in V.S. 6.0 to EXE ??
Thanks,
Anand.
|
|
|
|
|
Hello!
I want to know that is possible to code a simple DLL, and when it´s loaded in a program, it will check for other loaded DLLs, and do simple actions, based on the loaded dlls, like send a msgbox, etc.
Example:
Program is running ( with the sample DLL that checks for my.dll ) -> my.dll is loaded by the program -> sample DLL will check that my.dll is loaded by the program and send a msgbox ("Hi, the my.dll is loaded by the program" ).
Anyone can post or link to example compilable source on how to do this?
Thanks in advance!
Chris Christian
|
|
|
|
|
Look at this article here
It is mainly about how to get loaded DLL reference counts, but it talks about a structure containing the "linked list of loaded modules", so it should help you with your problem
Hope this helps!
--PerspX
"Nowadays, security guys break the Mac every single day. Every single day, they come out with a total exploit, your machine can be taken over totally. I dare anybody to do that once a month on the Windows machine." - Bill Gates
|
|
|
|
|
Reading the article now. Thanks for the help.
Chris Christian
|
|
|
|
|
You're welcome, Chris
--PerspX
"Nowadays, security guys break the Mac every single day. Every single day, they come out with a total exploit, your machine can be taken over totally. I dare anybody to do that once a month on the Windows machine." - Bill Gates
|
|
|
|
|
Hello,
I have written a program using Visual C++ (derived from CDialog) that takes in a very large file and parses the information within the file into variables. So far, no problems with that. Due to the size of the file, this takes a few minutes to complete so I added a progress bar to my dialog to show that it is processing. Once I hit the button to begin the parse, everything works fine. The progress bar begins to grow, and the file is being parsed correctly.
Here lies my problem:
If I click anywhere on the screen and cause my dialog to lose focus, the GUI of the dialog freezes and no long responds. The parse still works correctly after I have clicked on the screen. My GUI begins to respond again once the parse function has completed.
I would just like to know how to remedy this problem? Thanks.
|
|
|
|
|
This sounds like a job for a worker thread.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
theallmightycpd wrote: I would just like to know how to remedy this problem?
you need either a classic "message pump" or you need to put the file reading into a worker thread that posts status messages back to the UI
|
|
|
|
|
Alright, so I had a feeling I would have to implement a worker thread. My problem is that within that thread, I need to be able to update my progress bar constantly and I know that you're not supposed to touch your GUI controls from within the worker thread. I understand that the work around is to use SendMessage() or PostMessage().
My code within my worker thread looks as follows: (m_prg is my progress control)
.
.
.
CStdioFile f1;
if( !f1.Open( pFileName, CFile::modeRead ) )
{ /* error */ }
int totSize = f1.GetLength();
m_prg.SetRange32(0, totSize); <--GUI freezes here
int curSize = 0;
m_prg.SetPos(curSize);
.
.
.
What I've got so far is that every time I want to call m_prg, I need to do it through SendMessage() or PostMessage(). The thing is that I know nothing about these functions. How do I implement them? I can't seem to figure it out.
Help would be greatly appreciated. Thanks.
|
|
|
|
|
|
The CProgressCtrl methods you are using use SendMessage to send the appropriate message to the
control.
I'm not sure why this is freezing the UI where you indicate, but if you want to try PostMessage,
then use it instead of calling the CProgressCtrl method.
For example:
//m_prg.SetRange32(0, totSize);
::PostMessage(m_prg, PBM_SETRANGE32, (WPARAM) 0, (LPARAM) totSize);
Mark
Mark Salsbery
Microsoft MVP - Visual C++
"Great job team! Head back to base for debriefing and cocktails."
|
|
|
|
|
If you choose the classic message pump route, there's an example of an MFC message pump
here[^]
Mark
Mark Salsbery
Microsoft MVP - Visual C++
"Great job team! Head back to base for debriefing and cocktails."
|
|
|
|
|
Maybe if you use of progress on the timer your problem will be solve.
|
|
|
|
|
sasOpen= InternetOpen(szClassName,INTERNET_OPEN_TYPE_DIRECT,NULL,NULL,INTERNET_FLAG_ASYNC);
assConnect = InternetConnect(assOpen,"???.???.???",INTERNET_INVALID_PORT_NUMBER,"sdfgdgdfg","dfgdgdfg",INTERNET_SERVICE_FTP,INTERNET_FLAG_PASSIVE,(long)NULL);
status = FtpGetCurrentDirectory(assConnect,curDir,&curdirLen);
why(GetLastError()); // this function displays the error message as string
//i get "overlapped i/o operation in progress"
i am trying to connect to my ftp server using the above code... opena nd connect are working well
but not the ftpgetcurrentdrectory...
what am i supposed to do ...
|
|
|
|
|
Since you've chosen to do the operation asynchronously, you are getting the appropriate error
because the operation hasn't completed.
For asynchronous operations you'll probably want to use InternetSetStatusCallback() and in the
callback you'll be notified when the operation completes (INTERNET_STATUS_REQUEST_COMPLETE).
Also, you probably shouldn't call GetLastError() unless there's actually an error. Not all
APIs reset the last error when they are successful.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
"Great job team! Head back to base for debriefing and cocktails."
|
|
|
|
|
ah, thanks for responding so quickly. thank you. thats nice... i will work with your reply and accordingly i will go for the rest
|
|
|
|
|
void CALLBACK internetCallback( HINTERNET hInternet,
DWORD_PTR dwContext,
DWORD dwInternetStatus,
LPVOID lpvStatusInformation,
DWORD dwStatusInformationLength
);
void CALLBACK internetCallback(HINTERNET hInternet, DWORD_PTR dwContext, DWORD dwInternetStatus, LPVOID lpvStatusInformation, DWORD dwStatusInformationLength)
{
msgbox("something is happening");
}
assOpen= InternetOpen(szClassName,INTERNET_OPEN_TYPE_DIRECT,NULL,NULL,INTERNET_FLAG_ASYNC);
InternetSetStatusCallback(assOpen,(INTERNET_STATUS_CALLBACK) internetCallback);
when i run the program the message dosent gets displayed...
what am i supposed to do ...
some help is needed??? will you...
|
|
|
|
|
When you call InternetConnect() you need to pass a value for the dwContext parameter.
From the docs:
"Note The callback function specified in the lpfnInternetCallback parameter will not be called
on asynchronous operations for the request handle when the dwContext parameter of HttpOpenRequest
is set to zero (INTERNET_NO_CALLBACK), or the connection handle when the dwContext handle of
InternetConnect is set to zero (INTERNET_NO_CALLBACK)."
Mark Salsbery
Microsoft MVP - Visual C++
"Thanks,I overlooked the docs."
|
|
|
|
|
wow, its working after giving the dwContext a value of 1... thank you a lot...
we will catch up later... i am working on further...
|
|
|
|
|
Here's a tip -
When using callbacks in C++, the callback needs to be a global function or a static member
function. Using C++ it's nice to encapsulate the function within a class but static member
functions can't access non-static members of the class.
This is where the dwContext comes in....you can pass a pointer to a class object then in the
callback, cast the passed context back to an object pointer. With that object pointer you now
have access to the entire class
Mark
Mark Salsbery
Microsoft MVP - Visual C++
"Thanks,I overlooked the docs."
|
|
|
|
|
i havent gone through c++ much... anyway this information i am saving for future purpose and one day i might be needing this because i am going to enhance my ftp program to a superficial one...
thank you for there tips...
|
|
|
|