Visual Basic, .NET, ASP, VBScript
 

   
   
     

Форум - Общий форум

Страница: 1 |

 

  Вопрос: Тип данных LPCTSTR Добавлено: 26.10.02 18:09  

Автор вопроса:  Visual Buddy | Web-сайт: www.roberts.narod.ru

Есть функция DoSetCellString(long col, long row, LPCTSTR string) (из контрола EasyGrid). Что такое LPCTSTR и как конвертировать в него обычный стринг?

Ответить

  Ответы Всего ответов: 2  

Номер ответа: 1
Автор ответа:
 CyRax



Разработчик Offline Client

ICQ: 204447456 

Вопросов: 180
Ответов: 4229
 Web-сайт: basicproduction.nm.ru
 Профиль | | #1
Добавлено: 27.10.02 00:00

Не знаю, то ли это что тебе нужно. Во всяком случае синкаксис схожий.

============

LPCTLSTYLE
32-bit pointer to a CTLSTYLE structure. Use PCTLSTYLE to create pointers that match the compiler memory model.

--------------

CTLSTYLE (3.1)

 

#include <custcntl.h>

typedef struct tagCTLSTYLE {
    UINT    wX;
    UINT    wY;
    UINT    wCx;
    UINT    wCy;
    UINT    wId;
    DWORD   dwStyle;
    char    szClass[CTLCLASS];
    char    szTitle[CTLTITLE];
} CTLSTYLE;

The CTLSTYLE structure specifies the attributes of the selected control, including the current style flags, location, dimensions, and associated text.

Member ;Description

wX Specifies the x-origin, in screen coordinates, of the control relative to the client area of the parent window.
wY Specifies the y-origin, in screen coordinates, of the control relative to the client area of the parent window.
wCx Specifies the current control width, in screen coordinates.
wCy Specifies the current control height, in screen coordinates.
wId Specifies the current control identifier. In most cases, you should not allow the user to change this value because Dialog Editor automatically coordinates it with a header file.
dwStyle Specifies the current control style. The high-order word contains the control-specific flags, and the low-order word contains the Windows-specific flags. You may let the user change these flags to any values supported by your control library.

szClass Specifies a null-terminated string representing the name of the current control class. You should not allow the user to edit this member, because it is provided for informational purposes only. This string should be no longer than the CTLCLASS value.
szTitle Specifies with a null-terminated string the text associated with the control. This text is usually displayed inside the control or may be used to store other associated information required by the control. This string should be no longer than the CTLTITLE value.

Comments

An application calls the ClassStyle function to display a dialog box to edit the style of the selected control. When this function is called, it should display a modal dialog box in which the user can edit the CTLSTYLE members. The user interface of this dialog box should be consistent with that of the predefined controls that Dialog Editor supports.

See Also

CTLINFO, CTLTYPE
-----------------------

CTLINFO (3.1)

 

#include <custcntl.h>

typedef struct tagCTLINFO {
    UINT    wVersion;
    UINT    wCtlTypes;
    char    szClass[CTLCLASS];
    char    szTitle[CTLTITLE];
    char    szReserved[10];
    CTLTYPE Type[CTLTYPES];
} CTLINFO;

The CTLINFO structure defines the class name and version number for a custom control. The CTLINFO structure also contains an array of CTLTYPE structures, each of which lists commonly used combinations of control styles (called variants), with a short description and information about the suggested size.

Member ;Description

wVersion Specifies the control version number. Although you can start your numbering scheme from one digit, most implementations use the lower two digits to represent minor releases.
wCtlTypes Specifies the number of control types supported by this class. This value should always be greater than zero and less than or equal to the CTLTYPES value.
szClass Specifies a null-terminated string that contains the control class name supported by the dynamic-link library (DLL). This string should be no longer than the CTLCLASS value.
szTitle Specifies a null-terminated string that contains various copyright or author information relating to the control library. This string should be no longer than the CTLTITLE value.
Type Specifies an array of CTLTYPE structures containing information that relates to each of the control types supported by the class. There should be no more elements in the array than specified by the CTLTYPES value.

Comments

An application calls the ClassInfo function to retrieve basic information about the control library. Based on the information returned, the application can create instances of a control by using one of the supported styles. For example, Dialog Editor calls this function to query a library about the different control styles it can display.

The return value of the ClassInfo function identifies a CTLINFO structure if the function is successful. This information becomes the property of the caller, which must explicitly release it by using the GlobalFree function when the structure is no longer needed.
See Also

CTLSTYLE, CTLTYPE
---------------

  CTLTYPE (3.1)

 

#include <custcntl.h>

typedef struct tagCTLTYPE {
    UINT    wType;
    UINT    wWidth;
    UINT    wHeight;
    DWORD   dwStyle;
    char    szDescr[CTLDESCR];
} CTLTYPE;

The CTLTYPE structure contains information about a control in a particular class. The CTLINFO structure includes an array of CTLTYPE structures.

Member ;Description

wType Reserved; must be zero.
wWidth Specifies the suggested width of the control when it is created using Dialog Editor. The width is specified in dialog-box coordinates.
wHeight Specifies the suggested height of the control when it is created using Dialog Editor. The height is specified in dialog-box coordinates.
dwStyle Specifies the initial style bits used to obtain this control type. This value includes the control-defined flags in the high-order word and the Windows-defined flags in the low-order word.
szDescr ;Defines the name to be used by other development tools when referring to this particular variant of the base control class. Dialog Editor does not refer to this information. This string should not be longer than the CTLDESCR value.

See Also

CTLINFO, CTLSTYLE

Ответить

Номер ответа: 2
Автор ответа:
 vitOS



Вопросов: 1
Ответов: 17
 Web-сайт: www.litmodern.narod.ru
 Профиль | | #2
Добавлено: 27.10.02 11:16

Если тебе из ВБ нужно вызывать  АПИ-функцию, то ничего конвертировать не нужно, великий ВБ сам всё расчехлит. Вообще-то LPCSTR - указатель на нуль-терминированую строку ограниченной длины.

Ответить

Страница: 1 |

Поиск по форуму



© Copyright 2002-2011 VBNet.RU | Пишите нам