|
From: <ten...@ne...> - 2003-08-05 18:14:35
|
That can't be (the unreachable) because in that case the action which
is taken just down and up shouldn't be done, and they're done.
My code (I forgot that, arj!, I knew I forget something... so I had it
unsent for a week):
case ID_UNIX:
{
int number;
LPTSTR text;
SendMessage(...;
if (!UNIX){
//instructions which are executed
SendMessage(...//The same again
}
}
break;
Anyway I did what you suggested (although with EM_SETMODIFY it's said
the function doesn't return any value. The value of the DWORD variable
where I return the value after calling sendmessage i 1 (dwSi =
SendMessane(...EM_SETMODIFY...); --->dwSi = 1), but has it any sense? If
dosumentation at this point is correct, none) I did a GetLastError there
(but that'a another **** point), and the message box is showed with "no
error".
But this is not the only time I get this kind of error.
Another time I did:
void func(int &tal){
POINT pt;
int y, x;
for (y = 0; y < tal; y++){
for (x = 0; x < tal; x++){
pt.x = x;
pt.y = y;
tal = _setintegerwithapoint(pt);
}
}
}
And neither x nor y are incremented, being tal > 100;
The same if I do pt.y and pt.x instead y and x in the loops; I have to
do the loop with x and y and then call a function which takes them and
makes parameter + 1;
This is only one of so many examples. And the instructions affected are
in the same block that other that are executed.
And if I insert a new line before or I change the order in the code it
is still not done. Although it is a simple instruction like f = j +h;
Abhijit Shylanath wrote:
>Hello, Carlos.
>
>
>
>> ...of lines of code which are not executed.
>>Or functions which does nothing or not what it's claimed they do...
>>e.g.:
>>case ID_LABEL:
>>SendMessage(GetDlgItem(hwnd, ID_EDIT), EM_SETMODIFY, (WPARAM)(UINT)TRUE,
>>0L);
>>break;
>>menu->label
>>menu->quit
>>Oh, SendMessage... EM_GETMODIFY.... says FALSE. Oh, what was
>>EM_SETMODIFY supposed to do. Wasn't it make EM_GETMODIFY return TRUE?????
>>
>>
>
>Maybe a bug in your code (no offence, just a random thought)? Have you
>tried a SendMessage(... EM_SETMODIFY ...) on startup and then immediately a
>dump with the return value from EM_SETMODIFY? Or a MessageBox() on the above
>case? Maybe the code is not reachable.
>
>--
>Abhijit Shylanath
>Homepage: http://mudeth.tripod.com/
>
>
>
>
|