|
Well I have exahusted all the options I have. If you have any other ideas please feel free to share them with me.
I might be wrong but I assume if a person knew how to do this it would not be a difficult project.
|
|
|
|
|
Hi,
Ultimate Grid supports Multifonts OnSetup().
But how can I use Editing cell (multiline + multifont)as
CRichEditCtrl class with user-defined actions?
Thanks
|
|
|
|
|
I included Window Mouse Hook in my app, when compiled I get this:
"error C2065: 'WH_MOUSE_LL' : undeclared identifier"
???
g_hMouseHook = SetWindowsHookEx(WH_MOUSE_LL,MouseProc,GetModuleHandle(NULL),0);
|
|
|
|
|
Did you bother looking in winuser.h for why:
#if (_WIN32_WINNT >= 0x0400)
#define WH_KEYBOARD_LL 13
#define WH_MOUSE_LL 14
#endif // (_WIN32_WINNT >= 0x0400)
"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
|
|
|
|
|
can any body suggest me some code to set the system time?
please help.
thanks in advance.
|
|
|
|
|
SetSystemTime
Wasn't too hard
You need special privileges, though.
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal. George Orwell, "Keep the Aspidistra Flying", Opening words
|
|
|
|
|
And see GetSystemTime() and SetLocalTime() .
|
|
|
|
|
Hi all,
I want to convert my CString string/variable into lowercase characters....Is there any API for doing so.........
thanks in advance
|
|
|
|
|
why?
dont you know about str.MakeLower(); function,
it is as simple as that.
if that is not working for you,
then i can suggest something else.
-- modified at 8:08 Wednesday 5th September, 2007
|
|
|
|
|
i m working in mfc so this function is not available there
|
|
|
|
|
CString is from MFC.
so follow this.
CString str;
str="HELLO";
str.MakeLower();
now this should work.
|
|
|
|
|
if your problem is solved, please indicate the same in your main subject by prefixing [SOLVED] to your subject.
|
|
|
|
|
Can you help me.
Help to be going to create Virtual IP using "iphlp" libarary raise just there is example code using c++
wait for your advice.
thank you.
ps : thanks is add "iphlp" library fils(iphlp.h , iphlp.dll ...)
|
|
|
|
|
There is no need to repeat your question. When and if somebody is able to help you, they will reply to your origional post!
|
|
|
|
|
I think I saw your question 6 hours ago why but you asked again?
|
|
|
|
|
Hi All
I have a confusion related to global and local variables...
why global variables are initialized to zero whereas local variables are not...
What is the reason behind this.
Please suggest me the answer.
Thanks & Regards
|
|
|
|
|
Global variables can be used within any function from anywhere within your code, local variables can only be used within scope that they were created ( usualy a single function ). It's good practice and reduces many bugs if you initialize all your variables when you create them, regardless of what the books tell you.
|
|
|
|
|
thanks WalderMort
it is fine that we should initialize each var while creating it,
but wondering that why global variables are initialized to zero by compiler whereas local variables are not..
Please help to understand the logic
Thanks & Regards
|
|
|
|
|
In a debug build, variables are initialized, but you will find that within a release build, they are not. This is one of the main reasons why people complain that their release build doesn't work. Take the following example:
bool bIsEqual;<br />
<br />
if ( ... )<br />
bIsEqual = true;<br />
<br />
if ( bIsEqual )
....
|
|
|
|
|
Hi
could not understand your example
I wrote an example As follows:
int pg;
int _tmain(int argc, _TCHAR* argv[])
{
int pl;
int s;
printf("Global %d \n", pg);
printf("Local %d \n" , pl);
scanf("%d", &s);
return 0;
}
and while printing pl prompts an error message
"Run-Time Check Failure #3 - The variable 'pl' is being used without being defined."
any comments on this....
|
|
|
|
|
rajeevktripathi wrote: "Run-Time Check Failure #3 - The variable 'pl' is being used without being defined."
At compile time, you have got a "warning C4700: local variable 'pl' used without having been initialized".
As you have enabled "Runtime checks" (probably a Debug-build), the runtime complains that you use this variable without prior assignment to it.
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal. George Orwell, "Keep the Aspidistra Flying", Opening words
|
|
|
|
|
rajeevktripathi wrote: why global variables are initialized to zero whereas local variables are not...
During the CRT initialization routine ( wWinMainCRTStartup function ), there is special code for intializing the c objects and c++ objects. You can find a function called _initterm() called from the wWinMainCRTStartup. That function does all this.
|
|
|
|
|
rajeevktripathi wrote: why global variables are initialized to zero whereas local variables are not...
You'll likely see a difference in initialization between release and debug compiles of your program. In debug mode, since the frame pointer is always pushed onto the stack at routine entry, variables are almost always assigned locations on the stack (e.g., 0). In the release mode, optimizations of the compiler (and other factors) may detect that the frame pointer is not needed, so the frame pointer is not pushed onto the stack, thus no initial value.
"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
|
|
|
|
|
Would this warrent taking any safeguards for reader writer lock?
Thread 1 pushes items to the back of a vector.
Thread 2 pops the first item ( if not empty ), does some action, and loops constantly.
The vector contains only pointers. I'm not worried about the execution time of thread 2, but it's critical that Thread 1 isn't required to wait? Using Mutex's or critical sections all involve using the WaitXXX functions. If a safeguard is required, would setting a simple bool be adequate enough to prevent Thread 2 from reading the data while Thread 1 is writing?
|
|
|
|
|
definitely this will work,
in one of my project, i had to implement it.
sure that, it will work even for you,
any more suggestions required,
please.
|
|
|
|