forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problem with SendMessage
Goto page Previous  1, 2
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 6097
Location: Salford, UK

PostPosted: Tue Dec 03, 2019 7:54 am    Post subject: Reply with quote

It's good that it is now working for you although it can't have anything to do with the INCLUDE files.

I was going to suggest that you try using %if. This causes the following control to have the initial focus when the Window is opened.
Back to top
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2056
Location: Yateley, Hants, UK

PostPosted: Wed Dec 04, 2019 10:40 am    Post subject: Reply with quote

A problem that appears 'out of the blue' and then disappears, equally mysteriously, after a fresh recompile is a difficult one to track down, and wastes a lot of time looking for the reason, which may never be found. From my own experience, there are at least a couple of causes that are worth checking against.

One is the use of a variable that has not been properly initialised - but it needs to be one that isn't very important, or the error may be experienced after a recompile. Another reason is when you link in a superseded version of one or more routines, usually by accident and a misspelling of a path.

However, the one that really got me some years ago and led to me writing a post entitled 'When is a handle not a handle' was a misunderstanding of what a handle is when applied to a Clearwin+ graphics area. For most controls in a Windows application that have a handle, this is allocated by Windows, and CW+ simply reports it back. CW+ graphics areas need to be provided with a handle - or did. This applies to %gr and %pl. If you assume, wrongly, that a handle is passed back, then you will get anything that resides in the handle variable when the program runs. Needless to say, this makes moving between graphics areas quite difficult, as in some cases they may even have the same value for the handle.

Paul did some work on this (see items 407 and 408 in cwplus.enh) but my bet is on this as a cause. To get a handle passed back you need to give the option [handle]. But it never hurts to assign the user-supplied handle and work that way.

Eddie
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 1235
Location: Aerospace Valley

PostPosted: Wed Dec 04, 2019 11:37 pm    Post subject: Reply with quote

Paul wrote:
Quote:
"error 904 - Return type is expected" appears because the interface for SENDMESSAGE has already been provided (in the INCLUDE file).


I know Dan in his highly meritsble quest for 'real english' and meaningful error reporting will be wanting to know as well, but why doesn't error 904 read:-

Quote:
error 904 - interface for SENDMESSAGE included twice (in both files ****** and *****)


and before anyone states tafo, all other reasons for his failure shoul have their own error messages too surely.
_________________
''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... Smile "
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group