Click here to Skip to main content
12,062,966 members (31,736 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 Pin
Gideon Engelberth20-Oct-09 11:20
memberGideon Engelberth20-Oct-09 11:20 
GeneralRe: Call Dispose on anything Pin
supercat920-Oct-09 11:38
membersupercat920-Oct-09 11:38 
GeneralRe: Call Dispose on anything Pin
S. Senthil Kumar2-Nov-09 21:33
memberS. Senthil Kumar2-Nov-09 21:33 
GeneralRe: Call Dispose on anything Pin
Paulo Zemek26-Oct-09 10:13
memberPaulo Zemek26-Oct-09 10:13 
AnswerHow about doing this instead... Pin
Daniel Flower2-Nov-09 2:54
memberDaniel Flower2-Nov-09 2:54 
GeneralRe: How about doing this instead... Pin
PIEBALDconsult2-Nov-09 4:13
memberPIEBALDconsult2-Nov-09 4:13 
General(C++) Trick or Treat ( Make/Expand our tricks.h file) [modified] Pin
Daniel L Kelly12-Oct-09 15:24
memberDaniel L Kelly12-Oct-09 15:24 
GeneralRe: (C++) Trick or Treat ( Make/Expand our tricks.h file) [modified] Pin
Michael Dunn13-Oct-09 9:13
sitebuilderMichael 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) Pin
sashoalm16-Oct-09 22:10
membersashoalm16-Oct-09 22:10 
GeneralRe: (C++) Trick or Treat ( Make/Expand our tricks.h file) Pin
Jörgen Sigvardsson21-Oct-09 7:04
memberJörgen Sigvardsson21-Oct-09 7:04 
GeneralA clever backup... Pin
Rozis12-Oct-09 11:07
memberRozis12-Oct-09 11:07 
GeneralRe: A clever backup... PinPopular
Dave Kreskowiak12-Oct-09 16:13
mvpDave Kreskowiak12-Oct-09 16:13 
GeneralRe: A clever backup... Pin
Bizit Deb14-Oct-09 21:26
memberBizit Deb14-Oct-09 21:26 
GeneralRe: A clever backup... Pin
Like2Byte18-Oct-09 10:07
memberLike2Byte18-Oct-09 10:07 
GeneralXml Serialization Bug + Control.Invoke Bug (Or: My Adventures In .NET!) [modified] Pin
The_Mega_ZZTer28-Sep-09 16:44
memberThe_Mega_ZZTer28-Sep-09 16:44 
GeneralRe: Xml Serialization Bug + Control.Invoke Bug (Or: My Adventures In .NET!) Pin
BillWoodruff5-Oct-09 5:40
memberBillWoodruff5-Oct-09 5:40 
GeneralDifferences between vb.net and c# Pin
adgonz24-Sep-09 9:25
memberadgonz24-Sep-09 9:25 
GeneralRe: Differences between vb.net and c# [modified] Pin
Luc Pattyn24-Sep-09 9:50
mvpLuc Pattyn24-Sep-09 9:50 
GeneralRe: Differences between vb.net and c# Pin
dojohansen20-Oct-09 1:53
memberdojohansen20-Oct-09 1:53 
GeneralRe: Differences between vb.net and c# Pin
Chris Meech24-Sep-09 10:03
memberChris Meech24-Sep-09 10:03 
GeneralRe: Differences between vb.net and c# Pin
adgonz25-Sep-09 6:51
memberadgonz25-Sep-09 6:51 
GeneralRe: Differences between vb.net and c# Pin
dojohansen20-Oct-09 1:55
memberdojohansen20-Oct-09 1:55 
GeneralRe: Differences between vb.net and c# Pin
cjb11024-Sep-09 22:31
membercjb11024-Sep-09 22:31 
GeneralRe: Differences between vb.net and c# Pin
adgonz24-Sep-09 23:18
memberadgonz24-Sep-09 23:18 
GeneralRe: Differences between vb.net and c# Pin
cjb11025-Sep-09 6:27
membercjb11025-Sep-09 6:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    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.160204.4 | Last Updated 5 Feb 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid