Click here to Skip to main content
11,410,529 members (57,947 online)

Clever Code

RSS Feed RSS feed

Showcase your best code, your most elegant solution, or your most hard fought subtle bug you've found and fixed. Please, do not post programming questions in this forum - they will be removed.

 
GeneralRe: Call Dispose on anything PinmemberS. Senthil Kumar3-Nov-09 5:48 
GeneralRe: Call Dispose on anything PinmemberPIEBALDconsult3-Nov-09 10:09 
GeneralRe: Call Dispose on anything Pinmembersupercat919-Oct-09 11:04 
GeneralRe: Call Dispose on anything PinmemberPIEBALDconsult19-Oct-09 11:07 
GeneralRe: Call Dispose on anything PinmemberGideon Engelberth19-Oct-09 12:34 
GeneralRe: Call Dispose on anything Pinmembersupercat919-Oct-09 14:17 
GeneralRe: Call Dispose on anything PinmemberGideon Engelberth20-Oct-09 11:20 
GeneralRe: Call Dispose on anything Pinmembersupercat920-Oct-09 11:38 
GeneralRe: Call Dispose on anything PinmemberS. Senthil Kumar2-Nov-09 21:33 
GeneralRe: Call Dispose on anything PinmemberPaulo Zemek26-Oct-09 10:13 
AnswerHow about doing this instead... PinmemberDaniel Flower2-Nov-09 2:54 
GeneralRe: How about doing this instead... PinmemberPIEBALDconsult2-Nov-09 4:13 
General(C++) Trick or Treat ( Make/Expand our tricks.h file) [modified] PinmemberDaniel L Kelly12-Oct-09 15:24 
GeneralRe: (C++) Trick or Treat ( Make/Expand our tricks.h file) [modified] PinsitebuilderMichael Dunn13-Oct-09 9:13 
For quick loading of string resources:
#define _S(id) (CString(LPCTSTR(id)))
And use it like this:
MessageBox ( hwnd, _S(IDS_TITLE), _S(IDS_MESSAGE), MB_OK );
This constructor trick is actually documented, although I haven't seen it used too often. Note that this macro is the release version; the debug version is a real function that checks whether the LoadString() succeeds.

--Mike--
Dunder-Mifflin, this is Pam.
modified on Thursday, October 22, 2009 6:36 PM

GeneralRe: (C++) Trick or Treat ( Make/Expand our tricks.h file) Pinmembersashoalm16-Oct-09 22:10 
GeneralRe: (C++) Trick or Treat ( Make/Expand our tricks.h file) PinmemberJörgen Sigvardsson21-Oct-09 7:04 
GeneralA clever backup... PinmemberRozis12-Oct-09 11:07 
GeneralRe: A clever backup... PinmvpDave Kreskowiak12-Oct-09 16:13 
GeneralRe: A clever backup... PinmemberBizit Deb14-Oct-09 21:26 
GeneralRe: A clever backup... PinmemberLike2Byte18-Oct-09 10:07 
GeneralXml Serialization Bug + Control.Invoke Bug (Or: My Adventures In .NET!) [modified] PinmemberThe_Mega_ZZTer28-Sep-09 16:44 
GeneralRe: Xml Serialization Bug + Control.Invoke Bug (Or: My Adventures In .NET!) PinmemberBillWoodruff5-Oct-09 5:40 
GeneralDifferences between vb.net and c# Pinmemberadgonz24-Sep-09 9:25 
GeneralRe: Differences between vb.net and c# [modified] PinmvpLuc Pattyn24-Sep-09 9:50 
GeneralRe: Differences between vb.net and c# Pinmemberdojohansen20-Oct-09 1:53 
GeneralRe: Differences between vb.net and c# PinmemberChris Meech24-Sep-09 10:03 
GeneralRe: Differences between vb.net and c# Pinmemberadgonz25-Sep-09 6:51 
GeneralRe: Differences between vb.net and c# Pinmemberdojohansen20-Oct-09 1:55 
GeneralRe: Differences between vb.net and c# Pinmembercjb11024-Sep-09 22:31 
GeneralRe: Differences between vb.net and c# Pinmemberadgonz24-Sep-09 23:18 
GeneralRe: Differences between vb.net and c# Pinmembercjb11025-Sep-09 6:27 
GeneralRe: Differences between vb.net and c# Pinmemberadgonz25-Sep-09 6:54 
GeneralRe: Differences between vb.net and c# PinmemberIan Shlasko25-Sep-09 7:06 
GeneralRe: Differences between vb.net and c# PinmemberPIEBALDconsult25-Sep-09 9:13 
GeneralRe: Differences between vb.net and c# PinmvpLuc Pattyn25-Sep-09 10:50 
GeneralRe: Differences between vb.net and c# Pinmemberadgonz28-Sep-09 1:25 
GeneralRe: Differences between vb.net and c# PinmemberHenry Minute26-Sep-09 14:02 
GeneralRe: Differences between vb.net and c# PinmemberMichael Eber7-Oct-09 14:27 
GeneralRe: Differences between vb.net and c# Pinmemberpeterchen12-Oct-09 6:44 
GeneralRe: Differences between vb.net and c# PinmemberGideon Engelberth29-Sep-09 13:20 
GeneralRe: Differences between vb.net and c# PinmemberMichael Eber7-Oct-09 14:31 
GeneralRe: Differences between vb.net and c# PinmemberSteven J Jowett11-Oct-09 0:13 
GeneralRe: Differences between vb.net and c# PinsitebuilderMichael Dunn13-Oct-09 9:17 
GeneralRe: Differences between vb.net and c# PinmemberMauro Leggieri23-Oct-09 2:39 
GeneralEmbedding Collection Controls (Or Any Object) in the TAG Property of Treeview. [modified] PinmemberNobia4-Sep-09 23:33 
GeneralRe: Embedding Collection Controls (Or Any Object) in the TAG Property of Treeview. PinmemberPIEBALDconsult5-Sep-09 2:11 
GeneralRe: Embedding Collection Controls (Or Any Object) in the TAG Property of Treeview. Pinmemberdaveauld5-Sep-09 2:35 
GeneralRe: Embedding Collection Controls (Or Any Object) in the TAG Property of Treeview. PinmemberlivanCreep15-Sep-09 23:29 
GeneralRe: Embedding Collection Controls (Or Any Object) in the TAG Property of Treeview. Pinmemberdarkelv21-Sep-09 4:29 
GeneralRe: Embedding Collection Controls (Or Any Object) in the TAG Property of Treeview. PinmemberAdis H.5-Sep-09 4:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web03 | 2.8.150414.5 | Last Updated 25 Apr 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid