messages

Localize Strings in Javascript

I'm currently using .resx files to manage my server side resources for .Net. The application that I am dealing with also allows developers to plugin javascript into various event handlers for client side validation, etc.. What is the best way for me to localize my javascript messages and strings? Ideally, I would like to store the str...

Trapping messages in MFC - Whats the difference?

Hi all, I was just wondering what (if any) the difference was between the following two message traps in MFC for the function, OnSize(..). 1 - Via Message map: BEGIN_MESSAGE_MAP(CClassWnd, CBaseClassWnd) ... ON_WM_SIZE() .. END_MESSAGE_MAP() 2 - Via afx_message: afx_msg type OnSize(...); They seem to be used interchangeably, ...

How to close a .Net Form from its PreFilterMessage() ?

Hi, I'm filtering the messages that come to a form with PreFilterMessage like this: print("code sample"); public bool PreFilterMessage(ref Message m) { if (m.Msg == WM_KEYDOWN && (int)m.WParam == VK_ESCAPE) { this.Close(); return true; } return false; } print("code sample"); but the matter...

MFC: Changing font of a List control

Hi guys, I need to at run time change the font of a List Control so as to used a fixed width font. I have seen some examples which suggest I should trap the NM_CUSTOMDRAW message, but I was wondering if there was a better way of doing it. Thanks. ...

How best to pass a message for the user between pages

So the chain of events is: The user submits a form. During the processing of the submission, there is a message generated, such as "Your record was saved." The user is redirected to a new page, say the search results. The new page needs to display the message. So, the question is how to get the message from step 2 to step 3? This is ...

What are your favourite funny lines from programming tools

Just for fun, what are your favourite funny lines from programming tools? For instance, from subversion: --This line, and those below, will be ignored-- Not terribly fun on its right context, but added to the fortune database: EDIT: I have marked the question as Communuity Wiki and reopened. ...

Why would you use a message based system?

What are the motivations for using a message based system? I'm seeing a lot about service buses such as NServiceBus and Mass Transit and I'm wondering what the benefits of the underlying methodology are. ...

Not getting all windows messages in MFC ActiveX Composite Control

Hi, I have a composite control with a declaration like this: class ATL_NO_VTABLE CFooCtrl : public CComObjectRootEx<CComSingleThreadModel>, public IDispatchImpl<CFooCtrl, &IID_IFooCtrl, &LIBID_FooLib>, public CComCompositeControl<CFooCtrl>, public IPersistStreamIni...

A recursive way to display Exception Messages in ASP.NET

Hello, I have started to make heavy use of exceptions, I'm sure I'll grow out of it as a learn the advantages and disadvantages the hard way, but until I've become an exception guru I'd like to know if this technique is acceptable. I intend to wrap, say a database exception in my own 'SorryFailedToSaveYourData' exception and then recur...

How to make Oracle error messages more verbose?

The message that drives me crazy is ORA-01008 - Not all variables bound. Is there a way to know which one of the 42 possible variable names I have misspelled without staring at the monitor till my eyes pop out? Update: I use ADO.NET to access the database. Perhaps it does lose some information in Oracle exceptions, as Justin Cave has s...

Disable messages in SQL2008 result set

Hi, further to these two questions, is there a way to disable the messages that may get sent along with the resultset in SQL2008? (please note this is nothing to do with the ANSI_WARNINGS setting. Or NOCOUNT.) Thanks for any help. Edit: It's not a problem with compatibility settings or table owners. And it's nothing to do with NOCOUNT...

SWIFT MT message validation

Hi, I am looking for java library or a vb addin that can be used for - SWIFT message syntax validation - Building SWIFT message from available data. - Retrieving the required tag/field data. Can anybody help me in this regard?? I have seen few of the available libraries like WIFE but all fails in catching errors if the message is ...

Using a Delegate with Messages

I'm learning about delegates and think I may have found a use for one. Basically what I have is a series of string properties that take in a minimum value and a maximum value, like so: string weightInvalid(min as int32, max as int32) There are several messages like this, all with unique messages but all sharing the same signature of ...

.Net database message brokering

I'm looking for a simple and reliable mechanism to perform application message brokering from the database level. I basically need changes in two distinct applications to generate messages to each other to indicate that changes have occurred between their common objects. The difficulty lies in the fact that both systems have their own un...

How to show Django auth messages only in admin interface?

Django's auth messages look pretty handy for notifying a CMS user of some configuration problem. The thing is that the messages are deleted on every page load if you include the "django.core.context_processors.auth" context processor, and you have to include that processor if you want to use the admin interface. I tried hacking around i...

CDialog not Receiving Windows Messages in ActiveX Control

I have an ActiveX control in MFC that manipulates images and I am trying to add TWAIN scanning functionality to it. I need to be able to receive a Windows Message back from the TWAIN driver that tells my control when an image has been scanned, so I have created a CDialog and I pass the HWND of the Dialog to the driver. ALl the sample c...

Keyboard input hesitation when held down?

Does anyone know why there is some hesitation when you hold down a keyboard key and try to process it? I'm calling a function right in my WinProc(...) that will move an image on the screen (OpenGL) when a key is held down. I press it and get a single response, then there is about .5 seconds of nothing, then it behaves as normal (moves 1 ...

HTML error checker.

I'm using Asp.net., Assuming I'm allowing user to post messages in my site with HTML tags. How do I ensure he has properly closed all the tags? Is there any HTML-tag-checker available that tries to parse tags and report errors if any? May be just like the BLOGGER has. ...

Can't terminate BizTalk instances in isolated adapter

Can anyone explain how I can remove service instances ? - I've got a few which the BizTalk console shows as "Running" - they are all in the Isolated Adapter - tried doing a Stop with Full Stop option ... - tried the Terminate Instance option ... - even tried deleting the BizTalk application But they're still there ?? my bad, ...

Objective-C: Smalltalk-style Messages vs. C-style Functions

When should I use messages versus C-style functions? ...