|
Thanks alot for this its working perfectly !!!
Hope to be able to help you once,
Ariel.
|
|
|
|
|
I have written a program using VisC++.
However, when I moved it to another location (not the place that VisC++ automatically puts things) the program stopped working properly.
I used the Release build configuration, and I can't seem to figure out what has gone wrong.
I do use some external data files, but they are in the same (relative) place as they were when they were in VisC++ MyProjects folder.
Does anyone know how to get my program working properly. Can it be my code? Because the program works perfectly when it is in the automatic location, just not anywhere else.
|
|
|
|
|
I don't think there's enough information here to provide you with a specific answer.
You're going to have to debug your app and find out what's failing. You can change the target directory for the compiled .exe to another location and use the standard debugger, or you could insert a small number of MessageBox calls to give you visual feedback that your application has reached a particular point in its execution.
Good Luck.
|
|
|
|
|
Many, many, many times when people ask for help they say things like "stopped working" and usually it is necessary to ask them for clarification of what they mean. You are not the first by far.
One good reason for us to ask for clarification is that many times when people ask for help they are able to help themselves simply by thinking through the problem enough to explain to someone else. Sometimes the cause of a problem is so obvious that it is easily overlooked.
|
|
|
|
|
Hi:
I have got an Exe A and a service B.
Is there any method that I only need ExeA and when I run ExeA,
ServiceB just comes out of it and is copied to a remote ( and local )
computer and then installed and started on it.
I know the second part may be a difficult one but if you could just
help me on how to piggybag ServiceB inside ExeA and extracted at
runtime
automatically.
I have tried one thing that I have tried to
read the Exe file in a char* or BYTE* and then saved it in a string to
display the contents in the dialog but it works for txt files etc.
but not for an Exe.
The I tried to Open the Exe in notepad and saved it with a different name but that new Exe is not valid . So the option of reading the Exe file and saving it temporarily in your ExeA as a variable and then extracting that is not working .
Any other trick or a hint......
|
|
|
|
|
import "B" into A's project as a custom resource. then use FindResource, LoadResource, UnlockResource in A to get a BYTE pointer to B. open a file, dump the contents of B into the file and... that's it.
-c
|
|
|
|
|
does anyone know of any (free?) MPG video frame extraction code?
it's fine with me if it uses the WiMP (Windows Media Player) in a non-visible window...
-c
|
|
|
|
|
How do I erase a class from ClassWizard?
Deleting the cpp and h?
That's not enough.
Any hints?
Thanks
|
|
|
|
|
remove the files from the project. rename the files. access classwizard. It will then through up a dialog asking you to locate it, you can click the remove button and it will remove it from classwizard.
I believe you can also delete the clw file and rebuild it which will refresh the classwizard class list.
-Erik
|
|
|
|
|
After deleting the files, delete them from the list of files for the project. I do not know how much of a difference that will make, but it is easy to do.
|
|
|
|
|
Microsoft recommends to simple delete the .clw file.
|
|
|
|
|
Try deleting the classwizard generated file with extension .clw in the project folder and then come back
to loading your project and click CTRL+W to generate new class wizard information or the .clw file once more.
The VC++ will prompt you to the files selection to generate the class wizard .clw file again, select all and press OK.
Note that you should not have the source .cpp and .h files of the class in question inside the folder anymore ie. delete or move them away.
Ask again and if I come up with news, I'll post here again.
Masoud
|
|
|
|
|
Hi,
I have a small application that I write with Visual C++ 6.0.
I have print the source files frequently.
However, for a couple of day I can print one of my cpp file.
The program is compiling and linking properly. The other files print well.
I have rename the file with printing problem but without succes.
I have put this file in another project, but whitout succes.
This file can be print with notepad or else, but Visual C++ refuse to print it.
Does anyone have a suggestion to solve it?
Thanks
Claude
|
|
|
|
|
try to look at file with any hex view (in msdev file/open/open as: binary)
normaly line ends with 0d 0a, there a no 00 inside etc.
try to find any like this problem by backup original file version and iterating removing lines untill will not work
next possibility you named file by any "extreme" name (prn)
t!
|
|
|
|
|
I am trying to hook the windows system clock so that I can execute code in it's context and subclass it. But when I try to hook it explorer (which owns the thread crashes)crashes. Here is the relevent portion of code
timeinfodll = AfxLoadLibrary("Tray");
LPCLOCKHOOK clockhook;
LPSETCLOCKHOOKID setclockhookid;
if (timeinfodll != NULL)
{
clockhook = (LPCLOCKHOOK)GetProcAddress(timeinfodll, "ClockHook");
setclockhookid = (LPSETCLOCKHOOKID)GetProcAddress(timeinfodll, "SetHookId");
if (clockhook == NULL || setclockhookid == NULL)
{
// handle the error
FreeLibrary(timeinfodll);
return FALSE;
}
else
{
CRect rect;
HHOOK hook;
CWnd *clockwnd;
clockwnd = new CWnd();
GetTrayWnd(clockwnd);
//This function crashes explorer
hook = SetWindowsHookEx(WH_CALLWNDPROC, clockhook,
AfxGetInstanceHandle(), cGetWindowThreadProcessId (clockwnd->m_hWnd, NULL));
//Send an unimportant message to the window so to stimulate the whole thing foward//
clockwnd->GetClientRect(&rect);
clockwnd->SendMessage(WM_SIZE, rect.right, rect.bottom);
FreeLibrary(timeinfodll);
return TRUE;
}
}
|
|
|
|
|
The SetWindowsHookEx would not execute in explorer's address space so it is not causing it to crash. SetWindowsHookEx would cause the dll's DllMain to execute, right? What does the DllMain do for DLL_PROCESS_ATTACH?
|
|
|
|
|
I have an application that uses a worker thread for communication for another application. During certain process-to-process communication calls a warning dialog needs to be displayed that will not allow the user to change any onscreen controls (a modal dialog essentially). This warning dialog is opened before the communication call and closed after it, this may take 3-5 seconds. I am currently trying to use PostMessage from the worker thread back to the main thread in order to display the warning dialog. This does not completely work though. Does anyone have any suggestions on what I could try?
|
|
|
|
|
Is this the same as:
http://codeguru.earthweb.com/bbs/wt/showpost.pl?Board=vc&Number=167929
|
|
|
|
|
The application runs in background and poll for an event.
If the event apears, the application should come to the top of the screen.
this code works only with WIN-NT
::SetForegroundWindow(GetSafeHwnd() ); //funktioniert evtl nicht unter Win9x
is there a function for Win9X + NT
Have somebody code that work ?
Thanks
|
|
|
|
|
Try
::SetWindowPos(hWnd,HWND_TOPMOST,X,Y,width,height,SWP_SHOWWINDOW);
|
|
|
|
|
On Win 98 and 2K, SetForegroundWindow() has been restricted so you can't just bring any ol' window to the top.
Check out the SetForegroundWindow() docs in MSDN - there's a good explanation of the behavior.
|
|
|
|
|
Hi Guys,
i just can't figure it out. in my workspaces i have to set all my source files to use 'automatic use of pre-complied headers', other wise i get:
Debug/MyApp.pch' is not a valid precompiled header file
i don't know what i've set in the project settings, but everytime i change or add something to the resources (dialogs especially), a complete re-build of the project occurs. this is really starting to p$%$ me off.
any direction appreciated
thanks and stressed
Peter
|
|
|
|
|
Are you including "StdAfx.h" in all the source files?
|
|
|
|
|
If your stdafx.h files have:
#include "resource.h"
in them then that would cause a recompile of your pre-complied headers, right?
|
|
|
|
|
Hello to all !!!
I'm quite new to DLL and I have a simple (I think) question.
Can I have a Dialog (from resource) in a DLL and have the implementation in the main program (exe) and be able to load and display that dialog from the main exe ??? If so, how can I do it !?!?!? Can someone explain to me how such a thing can be done.
Thanks in advance for any help
Have a nice day !
|
|
|
|