|
what do you mean "change the dimension of the drawing" ? by resizing the dialog ? or by setting the size manually with some numerical values ?
are your sure you're not computing some sizes in the OnInitDialog and never in the OnPaint ?
You could Invalidate the dialog....
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
I need one of my form fields to display the PCMCIA drive as the default drive. How can I find that drive or any other drive say a CD-ROM drive on a computer or laptop? Thanks!
|
|
|
|
|
I wrote a COM Server using ATL wizard, so i made a DLL, and want to use it on another machine - but, when i try to register my server using regsvr32 i have next message:
"LoadLibrary("the way to my dll") failed. The specified module could not be found".
Where the problem is???
|
|
|
|
|
is it a COM DLL ? or ordinary one ?
programming in VB is like riding a kiddy bike, while programming in C++ is like driving a Formula 1 racing car
|
|
|
|
|
hi,
ranjith , u are a great Puleeeeee da.I believe u r riding on Tiger.
by
baijumax
|
|
|
|
|
Does the path/file specified in the call to LoadLibrary() exist? Are you using an absolute or relative path name?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Assuming you have specified the path to your DLL correctly then your module is probably dependent on another module that is not present on the second machine. Check you are using a release version, or have installed the relevant debug libraries to the second machine. Try using the depends utility to see what modules your DLL is dependent on.
Mike
|
|
|
|
|
As i understood the machine i want to install on my dll, doesn't have some "dll's", that my program is required. Yes in my COM dll i have deal with MSXML and RAPI. I'll try to install both of them. But i have some questions about your message: what is the "release version" - is it options of compilor that i usually use where i can change - debug or release in visual studio?, and another question , what is the "relevant debug libraries"?
|
|
|
|
|
Rassul Yunussov wrote:
what is the "release version" - is it options of compilor that i usually use where i can change - debug or release in visual studio?
Yes I meant the debug/release options in Visual Studio. These control whether debug information is included in your DLL and also whether your DLL uses the debug or release versions of DLLs. This will affect whether it is using for example msvcrt.dll (release) or msvcrtd.dll (debug).
The best thing to do is use the Depends utility that is included with Visual Studio and point it at your COM DLL. It will then show you all the DLLs that your DLL depends on. You then need to ensure that all these DLLs are available and registered on the second machine.
Mike
|
|
|
|
|
So i installed active sync on machine, but nothing changed, i still got this error.
|
|
|
|
|
Hi,
Check whether your Dll using Another Dll in the Module.copy all dependent .dll register all of them then try to register your's.Use dependecy walker.
or
u can create a DCOM server that's reside in your computer.
by
baijumax
|
|
|
|
|
Hi all,
I am new to multithreading and hence I am facing lot of problems.
First let me explain what I am exactly doing in my program.
I have a monitor event which gets triggered very very fast. One thraed reads data from file which has say minimum 10,000 records, it reads each line, and triggers Monitor event which displays the line on UI. Hence as soon as a line is read from file, Moinitor event gets triggered. So I can say monitor event gets triggered 10,000 times if 10,000 lines are there in the file. During this raeding and displaying operation CPU usage is shown as 100%, after the reading of file is over, it is not 100%.
I have declared my monitor event as below first.
volatile HANDLE m_MonitorEvent;
m_MonitorEvent = CreateEvent(NULL, TRUE, TRUE, NULL);
ResetEvent(m_MonitorEvent);
//This event is set in the part of code which triggers this event.
SetEvent(m_MonitorEvent);
//Thread function
BOOL b_EventRunning = TRUE;
UINT ThreadProc(LPVOID lpVoid)
{
while(b_EventRunning == TRUE)
{
DWORD dwWaitResult = WaitForSingleObject(m_MonitorEvent, INFINITE);
switch (dwWaitResult)
{
case WAIT_OBJECT_0:
//Do the work
ResetEvent(m_MonitorEvent);
break;
default:
Sleep(1);
break;
}
}//end of while
}//end of ThraedProc
I used INFINITE in WaitForSingleObject because my this thraed has to run till the application is exited.
I am totally confused here...why my CPU is showing 100% while the thread is running.
Can anyone please let me know how to proceed further?
Your expert guidance will be of great help to me.
Thanks
|
|
|
|
|
Hi
as I don't know the context and what you try to do, I just may guess.
I see two problems. The minor one being the HANDLE to an event of beimg volatile. That means everytime your loop is executing the Handle will be retrieved anew. To my opinion it should not change throughout the lifetime of the thread.
The real big problem is Sleep(1).
You have an infinite loop, that means that the programlines are executed over and over again, with just a millisecond sleep at the end.
Try switching the number to 500 or so, to give the CPU more time to execute other threads/programs. Or try to avoid the loop.
Regards
GSte
|
|
|
|
|
Hi,
Thanks for your inputs..
Here are my answers:
Try switching the number to 500 or so, to give the CPU more time to execute other threads/programs. Or try to avoid the loop.
If I make Sleep(500), CPU time is not consumed, but the thraeding operation slows down..
Is there any other option without using sleep, to avoid eating up the CPU time.
Thanks
Madhavi
|
|
|
|
|
ledallam wrote:
During this raeding and displaying operation CPU usage is shown as 100%
its normal, if you are making a fast loop, you will end up with something like this.
if you dont want to slow the system down you may try to give that thread low priority, you will see 100% CPU usage the same way, but if some other process requests CPU time, your thread will "slow down" their work beacuse the OS will give CPU time to the process with higher priority.
|
|
|
|
|
Does anyone out there know where to start looking?
I want it fairly flexible so I can update the version and time stamp etc. for building my own custom make files from Visual C++
Cheers all,
Al.
"When I left you I was but the learner, now I am the master" - Darth Vader
|
|
|
|
|
Your question is somewhat vague. What exactly are you trying to accomplish? It hints at needing a touch utility, but I can't be for sure at this point.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
as David wrote, touch will change the date and time of a file.
normally, when a file is edited ( and saved ) , its time will automatically be modified; so no real use to modify the date itself.
or are you talking about the $Date$ or $Revision$ version control tag ?
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Hi Guys,
Thanks for replying to my message so soon. Sorry about the vague message I was just leaving work. Basically, I'm creating my own make file generator that scans the current .vcproj file for dependencies - which it does. However, I don't want it to be generating a makefile *every* time it compiles because the dependencies probably wouldn't have changed (unless a new file had been added or removed, but then it gets saved and a new time stamp), so my idea was to check if the .mak and .vcproj date and time stamps were the same, if they weren't my utility would generate the .mak file and set the date and time stamps to be the same as the .vcproj. I know I could just check if the .mak file is older than the .vcproj but I wanted proper versioning to be linked in as well and am currently extending my io class so it can do pointless things like this for any future tasks I might have . I'm using C++ (no MFC or anything) to do it, but google seems to give me a billion things I really don't want at all.
Hope you can help, thanks for taking the time to look over this message,
Al.
"When I left you I was but the learner, now I am the master" - Darth Vader
|
|
|
|
|
I eventually found this 'undocumented' function (well it is documented, but yet again its the last thing MSDN wants to pull out from its library) which does *exactly* what I want it to do. _futime(int, _utimbuf) allows you to modify the time accessed and modified of a file that you have currently loaded with a valid os descriptor handle (use _futime(char*, _utimbuf) for MFC or people who don't have an os descriptor handle - specify the filename and path of the file to change instead). The _utimbuf has two components (for access and modify sections of the file properties) that must both be valid for it to succeed. Its that easy! But yet again the absolute heap of crap that is MSDN pulls out a billion results that include everything BUT what your looking for. I only stumbled across this by complete and utter fluke. When are we gonna see a comprehensive and intelligent help engine with VS? I have .NET 2003 and its nowhere near as intelligent as Delphi v5 help engine which is now nearly 5 years old!
But at least code project is cool.
"When I left you I was but the learner, now I am the master" - Darth Vader
|
|
|
|
|
Hi,
I am new in using Visual C++ 6.0. I want to create a project which can accept Chinese Resoure file. I am trying to create a project with "Chinese as language for resource", but I don't see an option for Chinese Language. I do see "French, Germany, Italy etc...".
I appreciate if some one can help me in this.
Thanks
V V
|
|
|
|
|
I found a way to do this, so don't worry to answer this.
|
|
|
|
|
Hai,
I'm working on a C++ application.I declared two int variable as public.But when I assign those variables in one the member functions and try to use that value in the other member function, I could'nt get those values.When I debug the application I get some junk values assigned to those variables.What am I missing here?
Thanks in advance.
|
|
|
|
|
Hello,
Post some code so we can see whats going on...
Multiply it by infinity and take it beyond eternity and you'll still have no idea about what I'm talking about.
|
|
|
|
|
hai, Sorry for that..
class myclass
{
public :
int var1 ; int var2;
int cnt;
myclass(void);
myclass(int myvar);
int myfunc1();
int myfunc2();
}
myclass::myclass(void)
{ var1=0;var2=0; }
mycalss::mycalss(int myvar)
{this->cnt = myvar;}
int mycalss::myfunc1()
{
.....
var1 = 6758; //here I assign values to these variables
var2 = 674;
.....
}
int mycalss::myfunc2()
{
....
if(var1<7000 && var2> 500)/// Here I couldnt get those values that I assigned in func1()
....
}
while calling these function in main I call as
myclass myC;
myC.myfunc1();
myclass myC1(dcnt);
myC1.myfunc2();
what am I missing??
Thanks again.
|
|
|
|