Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Help Me!! Translation some line Source from C++ to Delphi

Posted on 1999-06-30
4
Medium Priority
?
582 Views
Last Modified: 2011-10-03
Help Me it??
1.)    int buffsize;
       RGNDATA *buff;
       POINT TopLeft;
       // Get the size of buffer required
       buffsize = GetRegionData(region, 0, 0);
       //buff  = What is ???? I don't know it
       buff = (RGNDATA *) new BYTE [buffsize];
2.)    HWND hWnd;
       WPARAM vwParam;
       //Can  vwParam = hWnd ??
       //in  Delphi vwParam How to similar hWnd
       vwParam = (LPARAM) hWnd;
3.)   WPARAM wParam;
       LPARAM lParam;
       //What is cwpStruct???
       //I don't know it translation to Delphi is
       CWPSTRUCT *cwpStruct = (CWPSTRUCT *) lParam;
       MyHandle(cwpStruct->message, cwpStruct->hwnd,cwpStruct->wParam, cwpStruct->lParam);
0
Comment
Question by:jintajak
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 12

Accepted Solution

by:
rwilson032697 earned 240 total points
ID: 1385596
Here goes... The source you have here is a bit bitsey...

1)
Buffsize : Integer;
Buff : PRGNDATA;
TopLeft : TPoint;

buffsize := GetRegionData(region, 0, 0);
buff := GetMem(BuffSize);

2)
hWnd:HWND;
vwParam : WPARAM;
vwParam := hWnd;

3)
wParam : WPARAM;
lParam : LPARAM;
cwpStruct : PCWPStruct;

cwpStruct := PCWPSTRUCT(lParam);
MyHandle(cwpStruct^.message, cwpStruct^.hwnd,cwpStruct^.wParam, cwpStruct^.lParam);


Cheers,

Raymond.
0
 
LVL 12

Expert Comment

by:rwilson032697
ID: 1385597
Oh, I should mention, all these types are declared in Windows.pas - a very illuminating file to look for things in!

Cheers,

Raymond.

0
 

Author Comment

by:jintajak
ID: 1385598
uffsize := GetRegionData(region, 0, 0);
buff := GetMem(BuffSize);

It not work ?? --->GetMem
0
 
LVL 12

Expert Comment

by:rwilson032697
ID: 1385599
Oops, little syntax error on the GetMem...

GetMem(buff, BuffSize);

Cheers,

Raymond.

0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question