|
disable the related menuitem in the system menu and the button will be disabled at the same time...
|
|
|
|
|
|
GetSystemMenu(FALSE)->RemoveMenu(SC_CLOSE, MF_BYCOMMAND);
|
|
|
|
|
RemoveMenu or ModifyMenu.
Regards,
FarPointer
|
|
|
|
|
of course Fisrt Hi FarPointer
whats the problem?
|
|
|
|
|
he doesnt wants to remove it all he wants is to disable it .
Regards,
FarPointer
|
|
|
|
|
yes (he wants only disable)
|
|
|
|
|
It is so simple when you know it
-- Ricky Marek (AKA: rbid)
-- "Things are only impossible until they are not" --- Jean-Luc Picard
My articles
|
|
|
|
|
--------------------------------------------------------------------------------
hello ,
can u tell me one this ,
is there any point in MDI application u newly created with CrichEditView base class and execute it and then write something on editor and it will find left to right . how i can find right to left .
????
in my application reverse happen , it is finding right to left but i want to find left to right
thanks in advance
sachin gupta
|
|
|
|
|
I am a novice c programmer. My programs are very floating point intensive - some can take days to run. Most of the CPU time is spent in long loops doing various tasks. I would like to know what the best way of optimising this sort of program for dual cpu processors is. It would be possible to break the loop into 2 bits. I'm guessing it has something to do with multithreading.
Do dual cpu machines automatically distribute the load without specific coding?
|
|
|
|
|
Windows does distribute threads of execution between multiple processors. You need to be careful, however. If your algorithm requires that you use thread synchronization primitives like critical sections, mutexes, or other types to synchronize the two threads, your application can end up running slower.
Software Zen: delete this;
|
|
|
|
|
m_581 wrote: I would like to know what the best way of optimising this sort of program for dual cpu processors is.
Multithreading is an advanced topic.
Without seeing the code, and understanding the problem the app is trying to solve, nobody is going to be able to you an answer.
Start reading up on multithreading topics.
VS2005 has also added support for OpenMP:
http://msdn.microsoft.com/msdnmag/issues/05/10/OpenMP/[^]
m_581 wrote: Do dual cpu machines automatically distribute the load without specific coding?
Not the way you want.
...cmk
Save the whales - collect the whole set
|
|
|
|
|
i can't understand that how sscanf() take any number of param we want. When i see it definition, i see that it prototype is something like this:
sscanf(char *xx,char *yy,...);
I wonder: can we write a function that can take any param like sscanf();
Thank you very much!
|
|
|
|
|
following is one function I coded before, I simplify it now, please have a look:
sz is definded as char sz[1000] bellow:
in real code, sizeof sz should be dynamically alloced.
in C++, params of a function are ordered in memory.
//---------- function
BOOL MyFormat(const char*pszFmt,...)
{
//align to sizeof(int) for args after pszFmt
const char*pszArg=(char*)&pszFmt+((sizeof(pszFmt)+sizeof(int)-1)&~(sizeof(int)-1));
int iBuf=_vsnprintf(sz,999,pszFmt,(char*)pszArg);
if((iBuf>=0)&&(iBuf<1000)) return 1;
sz[0]=0;
return 0;
}
//-----------------
I deleted too many lines, if it doesn't work, i will test again for u, above is an idea only - but I guess it works.
A special image tool for Windows C++ programmers, don't miss it!
The world unique Software Label Maker is waiting for you and me ...
A nice hyper tool for optimizing your Microsoft html-help contents.
-- modified at 4:05 Sunday 2nd April, 2006
|
|
|
|
|
Hey, I guess the address of the params in function are placed together,it's right? So I write this code and it works:
int fun(int x,...){
int *next = (int*)(&x+1);
cout<<*next<
|
|
|
|
|
Yes you can , the three ... after the second comma stands for elippse notation which means the function can take any number of params ,
fun(int ,int ,...);
This means the fun function will take a minimum of two args and if wanted can take any number of other types of args also .
Regards,
FarPointer
|
|
|
|
|
Look at the va_start() , va_arg() and va_end() macros.
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"
|
|
|
|
|
if u look at definitions of va_xxx()s, they are just about memory addresses of params.
A special image tool for Windows C++ programmers, don't miss it!
The world unique Software Label Maker is waiting for you and me ...
A nice hyper tool for optimizing your Microsoft html-help contents.
|
|
|
|
|
includeh10 wrote: if u look at definitions of va_xxx()s, they are just about memory addresses of params.
On some systems, but not on all. And the memory addresses are not the same on all systems. Use the macros - they're there for a reason.
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"
|
|
|
|
|
Having read some material about toolbar part of MFC, I can't find how to implement the output window(the same as workspace window) in VC6.0, does it inherit from some CControlBar?I don't know how to add the triangle and close button beside it? does anybody know?
Thanks.
have a good day
|
|
|
|
|
WorkSpace Window and the output window are two different windows, the first one showing the class and file information and the second one showing the information regarddng the build,debug,find etc.
While Workspace window is implmented using property sheet ,and list controls .
Output Windows using a richedit control.
if you want more info u can use spy for it .
And i feel it should be derived from CDialogBar with the property sheets embedded in it .
Regards,
FarPointer
|
|
|
|
|
currently I have to convert it into the access 97 version. is there any way I can use it directly? e.g. is there any service pack or something like this?
Thank you very much!!!
-------------------
I am learning C++ and English
|
|
|
|
|
|
this is exactly what I am looking for!
Thank you very much!!!
-------------------
I am learning C++ and English
|
|
|
|
|
hey, working with winpcap and trying to create a dll, my source is working, except the compiler will not build my project because it is complaining about unreferenced identifiers, which are referenced in the wpcap.lib file. I added the lib to my files using project > add to project > files.. and that didn't work. I then tried adding the reference via ALt + F7 > link tab and that didn't work either. I am rather new to visual studio and am at a loss. What do I need to do to link the library to my project? thanks in advance.
nada
|
|
|
|