|
Thanks to both of you for your inputs...
Madhavi
|
|
|
|
|
Add this:
AfxGetMainWnd()->GetSystemMenu(FALSE)->RemoveMenu(
SC_MOVE, MF_BYCOMMAND | MF_GRAYED); to the OnNewDocument method.
Then implement ON_WM_NCHITTEST() of the CMainFrame as follows:
UINT CMainFrame::OnNcHitTest(CPoint point)
{
UINT x=CMDIFrameWnd::OnNcHitTest(point);
return (x==HTCAPTION) ? HTTRANSPARENT : x;
} Strange requirements, anyway...
"though nothing
will keep us together
we can beat them
for ever and ever"
rechi
|
|
|
|
|
Hi!
I've recently changed my computer and my project has some problem registering one of it's component ever since. I'm pretty sure the path is fine (used to be on h:, now on f . All other components register fine. I get that error:
error PRJ0019: A tool returned an error code: "Performing registration"
If I try to do a regsvr32 mydll.dll in the Debug or Release folder, I get this error:
LoadLibrary("mydll.dll") - The specified module could not be found.
Now, if I try to debug that component by adding regsvr32 to the command line and $(TargetPath) for the parameters, I get a a different error:
LoadLibrary("f:\some old path that I don't use for months") - The specified module could not be found.
Finally, if I move mydll.dll to another folder (outside the project tree), it will register just fine!
I suspect that $(TargetPath) is the culprit, but I don't know where to look for that value.
Thanks!
|
|
|
|
|
Hello.Well i can't help you to solve ur problem but your problem gives me an outside chance to solve my problem.
I reckon that you must know how to make release folder for vc 6 application.
Please tell me the steps involved.
ThankYou.
|
|
|
|
|
Its posible that your project file is still referencing things on your h: drive.
Open your .dsp file in notepad and search for h:
|
|
|
|
|
I have a poject. My teacher ask me do it in Console Screen. And I have to show it by Vietnamese. But I don't Know how to use Vietnamese in Console or any font in Console...Please help me! Thank
|
|
|
|
|
Ok, VC++ tells me the same errors all the time:
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _sprintf allready defined in LIBCD.lib(sprintf.obj)
As far as I understand it, it is a problem with incompatibel iostream librarys. VC++ chooses the right version itself but now there is a conflict since I build something in that requires different iostream versions.
I put some png reading code in my previous well working project. I used the same code in another project without any trouble. But last time it was an MFC application and now it is a simple VC++ win32 application project.
Maybe the way I linked the library caused some trouble too. I had to use that methode:
extern "C" <br />
{<br />
#include "png.h"<br />
#include "pngconf.h"<br />
}
other includes are
#include "ddraw.h"<br />
#include "windows.h" <br />
#include "windowsx.h"<br />
#include "mmsystem.h"<br />
#include "iostream.h"<br />
#include "conio.h"<br />
#include "stdlib.h"<br />
#include "malloc.h"<br />
#include "memory.h"<br />
#include "string.h"<br />
#include "stdarg.h"<br />
#include "stdio.h"<br />
#include "math.h"<br />
#include "io.h"<br />
#include "fcntl.h"
How can I get rid of this annoying link errors? Every help is welcome.
|
|
|
|
|
ryuki wrote:
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _sprintf allready defined in LIBCD.lib(sprintf.obj)
MSVCRT is a release version (MSVCRTD is the debug version)
LIBCD is a debug version (LIBC is the release version)
so, it looks like you're mixing release and debug versions of your app and LibPng. make sure you link debug to debug libraries and release to release.
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
I just tried something and could fix the problem for the moment.
I changed the compiler argument from /MLd to /MDd for debugging and /ML to /MD for release. Now I only got a last warning for MSVCRT.lib (only debug mode):
LINK : warning LNK4098: Standard library "MSVCRT" is in conflict with another library; /NODEFAULT:Library used
(sorry, I have to translate all messages since I did not use the englisch localisation, so the warning can look different from the one you get)
|
|
|
|
|
In the properties of your project, try to specify libcd.lib (and perhaps libc.lib as well) in the field entitled Ignore Specific Library, in the tab Linker > Input.
|
|
|
|
|
Hi everybody!!
I have to call a function "PutData()" each :
- 2 seconds.
- Every time OnDraw() is called (event)
For that I must use "WaitForMultipleObjects" to call PutData() every time one of the two events above happens.
My problem is how can I synchronize (I think I need a handler as I've seen in MSDN) the event that means that OnDraw() has been called with "WaitForMultipleObjects"???
Thanks you very much.
|
|
|
|
|
javi_jmc wrote:
For that I must use "WaitForMultipleObjects" to call PutData() every time one of the two events above happens.
No, you don't.
Set a timer every two seconds, and call PutData in OnDraw, and when the timer fires.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
in my app, i use CreateProcess() to launch a command.com.
but, I can not find the program from "Process view", instead, I find 2 other programs:
1) Redir32.exe
2) Winoldap.exe
could someone explain why command.com is not launched? what are the 2 exe used for?
includeh10
|
|
|
|
|
Command.com is a part of good old DOS. Windows 95/98/ME also have it for the command prompt. Its something like cmd.exe(Command Prompt) in Windows 2000/XP.
Since .com files are deprecated in Win2K/XP, Windows has to emulate a Virtual DOS Machine(VDM) in order to be able to run command.com. As a matter of fact, you are running a VDM instead of command.com when you are executing command.com, and Redir32.exe and WinOldAp.exe are parts of VDM and that's what Windows "Process view" sees instead of command.com.
Hope it helped.
|
|
|
|
|
|
Geek humor.
--
Schni Schna Schnappi! Schnappi Schnappi Schnapp!
|
|
|
|
|
The dll I wrote which has some shared data segment that being used by mutiple exes compiled on 32bit compiler and it worked. However, as I compiled the same project using the amd64 compiler by microsoft SDK 1415 and tested on x64 system, the shared data doesn't seems to be working anymore(each exe seems creates its own copy of those variables). I am wondering is there something changed on amd64 compiler that I did not notice. Anyadvice will be appreciated. t
This is how I did to create the shared variables
#pragma data_seg(".timerTOD") // shared with all procs
struct something
{
double a
int b
} variable_name = {0};
#pragma data_seg() // back to normal data
#pragma comment(linker, "/SECTION:.timerTOD,RWS")
|
|
|
|
|
Don't know if it will help, but we use the
#pragma data_seg( ".MyName" )
in the source file and
SECTIONS<br />
.data READ WRITE<br />
.MyName READ WRITE SHARED
in the module's definition file.
Maybe the AMD compiler/linker does not know the pragma
#pragma comment(linker, "/SECTION:.timerTOD,RWS")
|
|
|
|
|
Are the exes and the dll all compiled with the 64-bit compiler?
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"
|
|
|
|
|
Hi!
My application is automatically started when Windows is lauching. Sometimes Shell_NotifyIcon will fail. I do not have an error code since I haven't been to reproduce that bug very often.
My guess is that the desktop is not ready or something. Do you think that it would be safe to do something like:
BOOL bRes;
do
{
bRes = Shell_NotifyIcon(...);
}while(bRes = FALSE);
Thanks!
|
|
|
|
|
I can't remember it exactly (it's in my BugReporter article here on CP), but there's a way you can register a message to notify you when the taskbar gets repainted so that you can put the icon back in the system tray. Otherwise, when explorer.exe crashed and restarted, my icon would be gone from the system tray.
I don't know if that helps any, but I tried.
My articles
www.stillwaterexpress.com
BlackDice
|
|
|
|
|
LukeV wrote:
Do you think that it would be safe to do something like:
No. If there's an error with your input you'll have yourself a nice little infinite loop.
I had this happen to me last night, although it happened for all programs. It turned out I had a virus, so I did a system restore and it's all good now . I doubt that's your problem though.
I've never had any problems with applications I've written doing this. I've heard of a few programs that add a few seconds delay during their startup to give Windows time to initialise properly. That might cure the problem. Other than that, there's not much you can do other than verifying that your input is correct.
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"
|
|
|
|
|
Hi,
I utilize Visual C++ .NET 2003 with MFC.
When I open a file, MFC works with Serialize(CArchive& ar) method.
ar is created by the MFC framework.
If I want to specify the initial directory in the open file dialog box, I have to set it with the member lpstrInitialDir of the OPENFILENAME structure.
My question is how to create the ar CArchive type to be able to call the Serialize method generated by MFC ?
Thanks,
Claude
|
|
|
|
|
Can anybody help me to find detailed information about "Win32_PerfRawData_PerfProc_Thread"
class Win32_PerfRawData_PerfProc_Thread : Win32_PerfRawData
{
string Caption;
uint32 ContextSwitchesPerSec;
string Description;
uint64 ElapsedTime;
uint64 Frequency_Object;
uint64 Frequency_PerfTime;
uint64 Frequency_Sys100NS;
uint32 IDProcess;
uint32 IDThread;
string Name;
uint64 PercentPrivilegedTime;
uint64 PercentProcessorTime;
uint64 PercentUserTime;
uint32 PriorityBase;
uint32 PriorityCurrent;
uint32 StartAddress;
uint32 ThreadState; !!!
uint32 ThreadWaitReason; !!!
uint64 Timestamp_Object;
uint64 Timestamp_PerfTime;
uint64 Timestamp_Sys100NS;
};
Microsoft provides only very limited information about "ThreadState" and "ThreadWaitReason"
I need to find out why paticular thread in other application is waiting.
Thanks
Alex.
|
|
|
|
|
Per MSDN, there are at least 21 values that ThreadWaitReason can have. Likewise, ThreadState can have one of eight values.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|