473,322 Members | 1,846 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

GetLParam

Hi all.

How do you use the GetLParam method to get the pointer to COPYDATASTRUCT
passed in a message inside the WndProc override?

Please see code at the bottom, which doesn't work. What the correct way to
do this?

TIA

Augie

void WndProc(Message *m)

{
// check message type

switch(m->Msg)

{

case WM_COPYDATA :

COPYDATASTRUCT *myCDS = (COPYDATASTRUCT *)m->GetLParam(typeof(COPYDATASTRUCT
*));

String *str;

// myCDS = (COPYDATASTRUCT *)m->GetLParam(typeof(COPYDATASTRUCT *));

// myCDS = __try_cast<COPYDATASTRUCT *>(m->LParam);

// str = String::Copy(myCDS->lpData);

str = String::Concat(str, S"\r\n");
statusTextBox->AppendText(str);

return;

break;

}

// call base function otherwise

Form::WndProc(m);

}
Nov 17 '05 #1
0 1347

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Anushya | last post by:
Hi I am trying to add image items to listview. Here how to handle if i need to add images?? Pls go thru the code. In the form where i have used this virtualListView, have handled...
2
by: Anushya devi | last post by:
Hi All I used listview and tried to update it by using Addrange. When the number of items is less, it works fine.. But I need to update nearly 200,000 items and it hangs. Also i need to add...
0
by: Laurent Lequenne | last post by:
Hello there, I'm trying to capture mouse events on a usercontrol as a Listview does not generate any mouse event when it is outside the client zone (Border / Scrollbar) . To do that I would like...
5
by: Michael C | last post by:
Hi all, I'm looking to determine when the size of a Column is changed in a ListView in detail view. Is there an event i can wire up to? Thanks, Michael C., MCDBA
1
by: Brian Keating EI9FXB | last post by:
Hello there, I've been playing with custom draw and am having a bit of difficulty, Namely the graphics function in this function throws invalid arg exception. Im pretty sure this is correct cause...
5
by: jan axelson | last post by:
My application is using RegisterDeviceNotification() to detect attachment and removal of a USB HID-class device. The form is receiving WM_DEVICECHANGE messages with wParam set to...
4
by: Lars Netzel | last post by:
Can I make a row in a list view NONE selectable or disabled or something? /Lars
4
by: Rob | last post by:
I've constructed a user control inherited from ListView so I can handle and respond to scrolling events (to keep 2 listviews scrolling in sync). My user control includes an Overrides of WndProc...
8
basti42
by: basti42 | last post by:
hello! how would i know if the USB Storage device is inserted and determine the drive letter? ======== VS 2005
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.