Click here to Skip to main content
15,884,859 members
Home / Discussions / C#
   

C#

 
GeneralRe: Coding search and replace on content of file Pin
Jonathan de Halleux12-Jan-04 1:44
Jonathan de Halleux12-Jan-04 1:44 
GeneralRe: Coding search and replace on content of file Pin
cgcrute12-Jan-04 2:13
cgcrute12-Jan-04 2:13 
QuestionHow to simulate map c++ collection in c# Pin
Rostrox11-Jan-04 5:15
Rostrox11-Jan-04 5:15 
AnswerRe: How to simulate map c++ collection in c# Pin
Kentamanos11-Jan-04 10:29
Kentamanos11-Jan-04 10:29 
AnswerRe: How to simulate map c++ collection in c# Pin
Heath Stewart11-Jan-04 10:30
protectorHeath Stewart11-Jan-04 10:30 
GeneralWindows Messages Pin
Stefan Troschuetz11-Jan-04 3:30
Stefan Troschuetz11-Jan-04 3:30 
GeneralRe: Windows Messages Pin
Niels Penneman11-Jan-04 3:34
Niels Penneman11-Jan-04 3:34 
GeneralRe: Windows Messages Pin
Heath Stewart11-Jan-04 11:41
protectorHeath Stewart11-Jan-04 11:41 
To expand on what Niels said, you'll want to P/Invoke that API:
[DllImport("user32.dll")]
private static extern IntPtr SendMessage(
  IntPtr hWnd,
  uint msg,
  IntPtr wParam,
  IntPtr lParam);
There are some shortcuts, too. If a param takes an address of a struct, rather than make several unsafe calls from the System.Runtime.InteropServices namespace, you can instead overload SendMessage. For instance, the TVM_SETITEM message for a TreeView Common Control (which System.Windows.Forms.TreeView encapsulates) requires the address of an <code>LPTVITEM for the lParam. You could overload SendMessage like so:
[DllImport("user32.dll")]
private static extern IntPtr SendMessage)
  IntPtr hWnd,
  uint msg,
  IntPtr wParam,
  ref LVITEM lvItem);
You'll still have to define the LVITEM struct, but this is pretty easy to do. See more information about that in the StructLayoutAttribute documentation.

 

-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
GeneralRunning Applications Pin
Paragass11-Jan-04 2:09
Paragass11-Jan-04 2:09 
GeneralRe: Running Applications Pin
Mazdak11-Jan-04 2:36
Mazdak11-Jan-04 2:36 
GeneralRe: Running Applications Pin
Paragass11-Jan-04 6:44
Paragass11-Jan-04 6:44 
GeneralRe: Running Applications Pin
Niels Penneman11-Jan-04 11:13
Niels Penneman11-Jan-04 11:13 
GeneralVirtual Screenscraper Question Pin
TuringTest110-Jan-04 20:45
TuringTest110-Jan-04 20:45 
GeneralRe: Virtual Screenscraper Question Pin
Mazdak11-Jan-04 9:46
Mazdak11-Jan-04 9:46 
GeneralRe: Virtual Screenscraper Question Pin
TuringTest111-Jan-04 19:50
TuringTest111-Jan-04 19:50 
Questionwhat compiler? Pin
OCARA10-Jan-04 17:43
OCARA10-Jan-04 17:43 
AnswerRe: what compiler? Pin
Mazdak10-Jan-04 19:13
Mazdak10-Jan-04 19:13 
GeneralRe: what compiler? Pin
OCARA11-Jan-04 9:45
OCARA11-Jan-04 9:45 
GeneralRe: what compiler? Pin
Mazdak11-Jan-04 10:05
Mazdak11-Jan-04 10:05 
GeneralRe: what compiler? Pin
Heath Stewart11-Jan-04 11:50
protectorHeath Stewart11-Jan-04 11:50 
GeneralRe: what compiler? Pin
Mazdak11-Jan-04 19:58
Mazdak11-Jan-04 19:58 
GeneralImages not showing in toolbar Pin
Anders Molin10-Jan-04 16:27
professionalAnders Molin10-Jan-04 16:27 
GeneralRe: Images not showing in toolbar Pin
Anders Molin10-Jan-04 16:36
professionalAnders Molin10-Jan-04 16:36 
GeneralSolved Pin
Anders Molin10-Jan-04 16:49
professionalAnders Molin10-Jan-04 16:49 
GeneralRe: Solved Pin
leppie10-Jan-04 23:35
leppie10-Jan-04 23:35 

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.