|
i had created the controls with WS_TABSTOP. how do i set the tab order movement?
|
|
|
|
|
Trap the 'TAB' key in the parent window and move over the controls using GetNextDlgTabItem function. Hope this helps.
<bold>- Nilesh
<italics>"Reading made Don Quixote a gentleman. Believing what he read made him mad" -George Bernard Shaw
|
|
|
|
|
In a dll program, I use createmutex and releasemutex .
However, the dll still could not release from memory.
Is there a method to see which function are using the memory?
Thanks!
Zhou yuanxin
|
|
|
|
|
U mean see the DLL ?
If so DLL Spy will see the DLL actions.
Try see attach and detach to load and unlad DLL or drivers
|
|
|
|
|
Hi,
I want to know what are the terms used in conjunction with Message...
that is...
1) Message Map
2) Message pump
3) Message loop
4) Message handle
5) Message Queues.....
and anything else followed with messages....
Best Regards,
Janakiraman
|
|
|
|
|
Message man !!! The person who sits inside the computer and makes sure all the messages go where they should.
Is this some sort of pop quiz, or do you just want information about message routing ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi
I created a window, and the windows's client aera(CRichEditCtrl) was transparented by "SetLayeredWindowAttributes(hwnd,[clent back color],255, LWA_COLORKEY);",
but the mouse event is not be done.
How do it then it will catch the mouse event?
Help me!
|
|
|
|
|
This has probably nothing to do with the transparent thing. Which mouse events do you want to catch ? What kind of application are you working with ?
~RaGE();
|
|
|
|
|
I want catch the all of mouse event. It is a text edit application, and the background is transparent. But when it transparent the text cannot be selected when mouse double click or drag. I want to do it.
Thanks
|
|
|
|
|
I dont get C++
How do if and else statements work inside the the switch Entry handler. Can anyone clearify how to use if and else inside the Switch part? its marked from arrow to arrow thank you..... Hugs =P
void exitfkt(void)
{
MessageBox(NULL,"Unload Dll", "Test", MB_ICONINFORMATION | MB_OK);
}
// Loading of the driver at start of the driver
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch(ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
>>>>>> int SCO_AS6(void)
{
unsigned short error;
double measure_range;
unsigned short state;
double value;
error = SCO_AS6();
if (error != SCO_ERR_OPEN_DRIVER)
{
>>>> return TRUE;
}
else FALSE;
}
break;
// Can be left out
///////////////////////////////////////////////
case DLL_THREAD_ATTACH:
MessageBox(NULL,"Dll in Use", "Test", MB_ICONINFORMATION | MB_OK);
break;
case DLL_THREAD_DETACH:
MessageBox(NULL,"Dll unused by a Program", "Test", MB_ICONINFORMATION | MB_OK);
break;
///////////////////////////////////////////////
// If not needed can be left out
case DLL_PROCESS_DETACH:
atexit(exitfkt);
break;
}
return TRUE;
}
|
|
|
|
|
Anonymous wrote:
switch(ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
>>>>>> int SCO_AS6(void)
{
unsigned short error;
double measure_range;
unsigned short state;
double value;
error = SCO_AS6();
if (error != SCO_ERR_OPEN_DRIVER)
{
>>>> return TRUE;
}
else FALSE;
}
break;
I don't see the problem here. If ul_reason_for_call == DLL_PROCESS_ATTACH, then SCO_AS6() is called. It obviously returns an error code. If the error code is SCO_ERR_OPEN_DRIVER, it returns FALSE, otherwise it returns TRUE.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
For no reason i cant get it to work though it says } missing then ; missing. So i thought my code might be wrong .
void exitfkt(void)
{
MessageBox(NULL,"Unload Dll", "Test", MB_ICONINFORMATION | MB_OK);
}
// Loading of the driver at start of the driver
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch(ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
int SCO_AS6(void)
{
unsigned short error;
double measure_range;
unsigned short state;
double value;
error = SCO_AS6();
if (error != SCO_ERR_OPEN_DRIVER)
{
return TRUE;
}
else FALSE;
}
break;
case DLL_PROCESS_DETACH:
atexit(exitfkt);
break;
}
return TRUE;
}
|
|
|
|
|
it looks right somethign is still wrong nothign works,.... The idea should be working.
|
|
|
|
|
Have you tried stepping through the code to see what happens ? I've found an error below, this could couldn't possibly compile.
switch(ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
{
// This really sucks. Are you using C ? If not, why are these at the top ?
unsigned short error;
double measure_range;
unsigned short state;
double value;
error = SCO_AS6();
if (error != SCO_ERR_OPEN_DRIVER)
{
return TRUE;
}
else FALSE; // This should say else return FALSE;
}
break;
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
NVM The Fuc n Cofee getting me i didnt check my
.h files.
Lemme clean up there THANKS alot man !!!
Might have more problem later though LOL
|
|
|
|
|
Cillieacc0rd5o4 wrote:
with old C++
What do you mean ? Most of this stuff is C, not C++, that is, NO C++ compiler would treat any of this different. What compiler do you have ?
Cillieacc0rd5o4 wrote:
What u mean that thing on top?
You shouldn't define variables without giving them a default value, and you should define them when you need them, not in a block at the top. It compiles either way, I'm talking about writing *good* code here, not just code that compiles.
Cillieacc0rd5o4 wrote:
The examples had it there.
I'm sure they did. The only thing that matters is that you need else return FALSE, not just else FALSE. The rest is a lesson in good form, not writing code that compiles.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Its a C++ Compiler
I normally do Java. Did like C 10 years ago for 1 month. So pardon me for the nOoB questions.
Well I need it to compile that is understandable.
Written clean, i dont care about that right now. I need it to work first.
And dunno how to integrate the If else inside the switch. Or get it to work. Or what other methods i can use.
|
|
|
|
|
Cillieacc0rd5o4 wrote:
Its a C++ Compiler
Duh. Which one ?
Cillieacc0rd5o4 wrote:
So pardon me for the nOoB questions.
That's completely fine - that's what we're here for.
Cillieacc0rd5o4 wrote:
And dunno how to integrate the If else inside the switch. Or get it to work. Or what other methods i can use.
I've already shown you. Your code should be fine, except the error I pointed out.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I managed to get it to work THnx alot.
Well Visual c++ 6.0 errrr enterprise it hink this sh*t comp uses.
This fool keeps one wanting to add stuff to the program.
And i only have limited Very limited C++ Knowledge.
|
|
|
|
|
VC6 is a decent C++ compiler, I doubt at your level that you'd find any places where it deviates from the standard.
Cillieacc0rd5o4 wrote:
This fool keeps one wanting to add stuff to the program.
Is 'this fool' a lecturer ?
Cillieacc0rd5o4 wrote:
And i only have limited Very limited C++ Knowledge.
I suggest buying a book that starts low and moves slow, like 'teach yourself C++ in 24 hours', and working through it.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Nah that fool is from Testing Dept. Where i work at. I work in EDV Taking care of Networks of the company. I accationally write Java Code. Got temporarly assigned with this Fool to write a Programm For a Test Machine Robot. And it needs to be C++ a Language that i am learning as i write the project. So far i got 8 pages of codes in 1 week and 3 days. And this forum has helped me great deal on how the basic of C++ work =).
Worse thing that guy dont know how to program at all.
But yeah thanks guys!!!
PS: Got 2 C++ Books Here only one is usefull. the way teh other is written i dotn get it.
|
|
|
|
|
K all fixed but this if you can help.
term does not evaluate to a function
Error executing cl.exe.
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch(ul_reason_for_call)
{
{
case DLL_PROCESS_ATTACH:
int ScoMSGetAS();
unsigned short error;
unsigned short state;
double value;
>>>>>> error = SCO_AS6();
if (error != SCO_ERR_OPEN_DRIVER)
{
return ScoOpen();
}
else return FALSE;
}
break;
only prob left dun understand that though
|
|
|
|
|
Cilllieaac0rd wrote:
int ScoMSGetAS();
What is this meant to be ? It looks like a forward declaration of a function, which means it's in the wrong place. If ScoOpen returns an int then you need
int myInt = ScoMSGetAS();
if ScoMSGetAS is the name of an int you want to declare, then you need
int ScoMSGetAS;
I have to say, most of this stuff, the syntax is the same as Java.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I was trying to use somethign like this.
BTW i Couldnt log on before but its me again.
I am trying to use else if when the AS_SCO6 is executed it will give 0-5 digit depending on what error.
and it wanna do if or else for each 0 1 2 3 4 5 or just if 3 else rest.
Dunno the code for it though. cant find any info on t since i dunno what it is called.
{
case variable equals this:
do this;
break;
case variable equals this:
do this;
break;
case variable equals this:
do this;
break;
...
default:
do this
}
|
|
|
|
|
you've lost me entirely here. You seem to have provided a switch statement in what looks like VB, but what are you trying to do here ? If your compiler gave you some errors, then your code is wrong. You didn't say that, you said you didn't understand why there was an if/else inside a switch. Make sure your } do line up and the original code should work fine. Otherwise, if you want something else, explain it. These are all your own functions ? AS_SC06 is yours and you want to act depending on what the return value is ? Then you probably need another switch statement based on the return value. Your brackets will still need to line up in order for it to compile.
Christian Graus - Microsoft MVP - C++
|
|
|
|