|
Try using Debug/Threads on the IDE Menu when debugging your process.
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
GetLastError()
TOXCCT >>> GEII power
|
|
|
|
|
I get the error on exiting my application:
The thread 'Win32 Thread' (0x3e0) has exited with code 3 (0x3)
I don't know if it's a really big issue, I guess not, but still I'd like to know what's up with that every time
|
|
|
|
|
exit codes != to 0 dont mean that there has been an error.
you must find out what this code represent, but for that, get (and give us if you want) more infos on that thread...
TOXCCT >>> GEII power
|
|
|
|
|
I'd really like to give you that info, but unfortunately, I have no idea which threads return that code. I guess it's some internal MFC thread or something.
|
|
|
|
|
Hi!
I am using the win32 api c++.
I have a problem when I try to get some variables from textboxes and comboboxes.
<br />
string code;<br />
char getvalues;<br />
<br />
code.append("your values are: "); <br />
GetDlgItemText(hwnd, IDC_E1, &getvalues,20);<br />
code.append(&getvalues);<br />
code.append(" from e1- ");<br />
GetDlgItemText(hwnd, IDC_E2, &getvalues,20);<br />
code.append(&getvalues);<br />
code.append(" from e2- ");<br />
.....<br />
Well this code works fine if there are no spaces or special characters between the values in the boxes
but when there is a value like "text-decoration" or "text decoration" it gives an error. The error comes when the code.append(&getvalue) is processed.
I want to use the code in a javascript generation application.
Thank you very much for your answers in advance!
Well... I am a beginner ...
|
|
|
|
|
getvalues is a type char and you are telling GetDlgItemText that it is 20 bytes long. It's not so you will get undesirable behavior.
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
get CWnd object of your control
GetWindowText(ACString);
that's easier.
I'm not sure but can you add more then 1 char to something defined as char somename? (better char* somename) maybe thats your mistake?
I would go for the first try. CStrings are for once really managable.
Good luck.
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
Scolinks wrote:
string code;
char getvalues;
shouldn't this be :
<br />
string code;<br />
char getvalues[20+1]<br />
?
I Dream of Absolute Zero
|
|
|
|
|
hi all ,
sorry for my english , french.
try to explain :
i have build à dll in vc++.
this dll need microsoft dll and is called by few exe.
My boss don't want install ms dll on a system path or in path of each exe
Any idea ?
Please helpppppp..........
thx
|
|
|
|
|
You could staticly link the MS dll's to yours. This will make your dll larger, but it will mean that you do not have to re-distribute distribute the dependent dlls.
I Dream of Absolute Zero
|
|
|
|
|
There is a registry key called 'App Paths' in the registry.
HKEY_LOCAL_MACHINE\Software\Microsoft\Widnows\CurrentVersion\App Paths
For each EXE you specify, you can also specify additional folders' that the application will use to search for a DLL.
So, put all your DLL into one folder, and create an app paths entry for each of your special EXE files.
Good luck!
|
|
|
|
|
thx for this trip
works fine for simple exe but
infortunatly , i have services NT too who try acces this dll.
not work for services , any idea?
thx
|
|
|
|
|
What if you try
BOOL SetCurrentDirectory(LPCTSTR lpPathName);
to the location where the DLL are before loading the DLL?
If that does not work, I think you have a set of constraints that can not be satisfied.
Also, if you control ALL of the DLL loading and codes, you can always use explicit full file paths in all calls to LoadLibrary, instead of using only the file name.
|
|
|
|
|
Do not use MFC, or link the MFC Dlls staticly in your project.
Enjoy it.
Rodrigo Pinho Pereira de Souza
|
|
|
|
|
Am I correct in assuming that you can fire 2 timer processes, possible concurrently, in an application. One timer process may be running and waiting for a flag to be set in another timer process.
Thanks,
Jerry
|
|
|
|
|
If you mean timer threads, then yes
|
|
|
|
|
I am only using 2 SetTimer() functions. How do you set up timer threads??
Jerry
|
|
|
|
|
jerry1211a wrote:
How do you set up timer threads??
Calling SetTimer() within a thread.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Real concurrency is only possible on multi-processor hardware. Otherwise you have the appearance of concurrency by the OS switching thread context.
The only way to acquire concurrency or even simulated concurrency is with multiple threads. If your process only has a single thread then your code executes synchronously. You can have two timers but only one at a time will execute.
For win2k and above OS you can use the CreateTimerQueueTimer() APIs which handle worker thread creation for you. Otherwise for older OS's you will have to generate your own threads.
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
Thanks...have a good day.
Jerry
|
|
|
|
|
you don't have to use thread if you feel it's not needed.
you can use 2 SetTimer (). the code you have to add to make the difference btween the 2 is into the OnTimer(UINT nIDEvent) function.
just test nIDEvent . if it matches the ID of your 1st timer, then the 1st timer times out, otherwise, it is the 2nd.
and you can set like that as many timers as you want... (growing up subsequently you OnTimer() function)
TOXCCT >>> GEII power
|
|
|
|
|
I have copied SDI app project from one computer to another. Visual studio on the first is installed on d: partition, so when I try to build app on second I get this error:
MySDIApp.hpj<br />
HC5011: Error: MySDIApp.hpj : <br />
Cannot open the file "d:\Microsoft Visual Studio\VC98\MFC\include \afxhelp.hm."
Which setting should I change to fix this problem?
|
|
|
|
|
There may be other ways but i have always edited the .hpj file.
pete
|
|
|
|
|
Thanks for help "on help";). I couldn't find hpj file on the second computer, but I found it in the folder I copied the project from and edited it.
|
|
|
|