امتیاز موضوع:
  • 0 رأی - میانگین امتیازات: 0
  • 1
  • 2
  • 3
  • 4
  • 5
ارگومانهای توابع SetWindowLongوGetWindowLongوSetLayeredWindowAttributes
نویسنده پیام
m_vb66 آفلاین
در حال پیشرفت
***

ارسال‌ها: 253
موضوع‌ها: 60
تاریخ عضویت: فروردین ۱۳۸۷

تشکرها : 114
( 52 تشکر در 35 ارسال )
ارسال: #1
ارگومانهای توابع SetWindowLongوGetWindowLongوSetLayeredWindowAttributes
سلام اطلاعاتی در مورد توابع گفته شده در عنوان تایپیک و ارگومانهای ورودیشون میخواهم البته برای vb
ممنون
(آخرین ویرایش در این ارسال: ۰۸-اردیبهشت-۱۳۸۷, ۱۰:۴۳:۰۶، توسط m_vb66.)
۰۸-اردیبهشت-۱۳۸۷, ۱۰:۴۱:۲۴
ارسال‌ها
پاسخ
ajlajlajl آفلاین
مدیر بازنشسته
*****

ارسال‌ها: 2,192
موضوع‌ها: 70
تاریخ عضویت: مهر ۱۳۸۴

تشکرها : 932
( 2618 تشکر در 1020 ارسال )
ارسال: #2
RE: ارگومانهای توابع SetWindowLongوGetWindowLongوSetLayeredWindowAttributes
توی msdn هست

میزان رای دشمن است!
[تصویر:  cff100.png]
۰۸-اردیبهشت-۱۳۸۷, ۱۱:۲۰:۲۳
وب سایت ارسال‌ها
پاسخ
تشکر شده توسط : m_vb66
m_vb66 آفلاین
در حال پیشرفت
***

ارسال‌ها: 253
موضوع‌ها: 60
تاریخ عضویت: فروردین ۱۳۸۷

تشکرها : 114
( 52 تشکر در 35 ارسال )
ارسال: #3
RE: ارگومانهای توابع SetWindowLongوGetWindowLongوSetLayeredWindowAttributes
متاسفانه سی دی هام خراب شده
۰۹-اردیبهشت-۱۳۸۷, ۰۹:۰۰:۴۷
ارسال‌ها
پاسخ
lord_viper غایب
مدیر کل انجمن
*****

ارسال‌ها: 3,949
موضوع‌ها: 352
تاریخ عضویت: بهمن ۱۳۸۴

تشکرها : 5193
( 9875 تشکر در 2650 ارسال )
ارسال: #4
RE: ارگومانهای توابع SetWindowLongوGetWindowLongوSetLayeredWindowAttributes
کد:
The GetWindowLong function retrieves information about the specified window. The function also retrieves the 32-bit (long) value at the specified offset into the extra window memory of a window.

LONG GetWindowLong(

    HWND hWnd,    // handle of window
    int nIndex     // offset of value to retrieve
   );    


Parameters

hWnd

Identifies the window and, indirectly, the class to which the window belongs.

nIndex

Specifies the zero-based offset to the value to be retrieved. Valid values are in the range zero through the number of bytes of extra window memory, minus four; for example, if you specified 12 or more bytes of extra memory, a value of 8 would be an index to the third 32-bit integer. To retrieve any other value, specify one of the following values:

Value    Action
GWL_EXSTYLE    Retrieves the extended window styles.
GWL_STYLE    Retrieves the window styles.
GWL_WNDPROC    Retrieves the address of the window procedure, or a handle representing the address of the window procedure. You must use the CallWindowProc function to call the window procedure.
GWL_HINSTANCE    Retrieves the handle of the application instance.
GWL_HWNDPARENT    Retrieves the handle of the parent window, if any.
GWL_ID    Retrieves the identifier of the window.
GWL_USERDATA    Retrieves the 32-bit value associated with the window. Each window has a corresponding 32-bit value intended for use by the application that created the window.


The following values are also available when the hWnd parameter identifies a dialog box:

Value    Action
DWL_DLGPROC    Retrieves the address of the dialog box procedure, or a handle representing the address of the dialog box procedure. You must use the CallWindowProc function to call the dialog box procedure.
DWL_MSGRESULT    Retrieves the return value of a message processed in the dialog box procedure.
DWL_USER    Retrieves extra information private to the application, such as handles or pointers.


Return Values

If the function succeeds, the return value is the requested 32-bit value.
If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

Reserve extra window memory by specifying a nonzero value in the cbWndExtra member of the WNDCLASS structure used with the RegisterClass function.
کد:
The SetWindowLong function changes an attribute of the specified window. The function also sets a 32-bit (long) value at the specified offset into the extra window memory of a window.

LONG SetWindowLong(

    HWND hWnd,    // handle of window
    int nIndex,    // offset of value to set
    LONG dwNewLong     // new value
   );    


Parameters

hWnd

Identifies the window and, indirectly, the class to which the window belongs.

nIndex

Specifies the zero-based offset to the value to be set. Valid values are in the range zero through the number of bytes of extra window memory, minus 4; for example, if you specified 12 or more bytes of extra memory, a value of 8 would be an index to the third 32-bit integer. To set any other value, specify one of the following values:

Value    Action
GWL_EXSTYLE    Sets a new extended window style.
GWL_STYLE    Sets a new window style.
GWL_WNDPROC    Sets a new address for the window procedure.
GWL_HINSTANCE    Sets a new application instance handle.
GWL_ID    Sets a new identifier of the window.
GWL_USERDATA    Sets the 32-bit value associated with the window. Each window has a corresponding 32-bit value intended for use by the application that created the window.


The following values are also available when the hWnd parameter identifies a dialog box:

Value    Action
DWL_DLGPROC    Sets the new address of the dialog box procedure.
DWL_MSGRESULT    Sets the return value of a message processed in the dialog box procedure.
DWL_USER    Sets new extra information that is private to the application, such as handles or pointers.


dwNewLong

Specifies the replacement value.



Return Values

If the function succeeds, the return value is the previous value of the specified 32-bit integer.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
If the previous value of the specified 32-bit integer is zero, and the function succeeds, the return value is zero, but the function does not clear the last error information. This makes it difficult to determine success or failure. To deal with this, you should clear the last error information by calling SetLastError(0) before calling SetWindowLong. Then, function failure will be indicated by a return value of zero and a GetLastError result that is nonzero.

Remarks

The SetWindowLong function fails if the window specified by the hWnd parameter does not belong to the same process as the calling thread.
If you use the SetWindowLong function and the GWL_WNDPROC index to replace the window procedure, the window procedure must conform to the guidelines specified in the description of the WindowProc callback function.
Calling SetWindowLong with the GWL_WNDPROC index creates a subclass of the window class used to create the window. An application should not subclass a window created by another process. The SetWindowLong function creates the window subclass by changing the window procedure associated with a particular window, causing Windows to call the new window procedure instead of the previous one. An application must pass any messages not processed by the new window procedure to the previous window procedure by calling CallWindowProc. This allows the application to create a chain of window procedures.

Reserve extra window memory by specifying a nonzero value in the cbWndExtra member of the WNDCLASS structure used with the RegisterClass function.
You must not call SetWindowLong with the GWL_HWNDPARENT index to change the parent of a child window. Instead, use the SetParent function.
۰۹-اردیبهشت-۱۳۸۷, ۱۰:۳۹:۱۴
وب سایت ارسال‌ها
پاسخ
m_vb66 آفلاین
در حال پیشرفت
***

ارسال‌ها: 253
موضوع‌ها: 60
تاریخ عضویت: فروردین ۱۳۸۷

تشکرها : 114
( 52 تشکر در 35 ارسال )
ارسال: #5
RE: ارگومانهای توابع SetWindowLongوGetWindowLongوSetLayeredWindowAttributes
یک چیزهایی دست گیرم شد اگه یک توضیح فارسی هم بگین حتما متوجه میشم
۱۰-اردیبهشت-۱۳۸۷, ۱۰:۰۰:۳۰
ارسال‌ها
پاسخ
ajlajlajl آفلاین
مدیر بازنشسته
*****

ارسال‌ها: 2,192
موضوع‌ها: 70
تاریخ عضویت: مهر ۱۳۸۴

تشکرها : 932
( 2618 تشکر در 1020 ارسال )
ارسال: #6
RE: ارگومانهای توابع SetWindowLongوGetWindowLongوSetLayeredWindowAttributes
چون فکر کنم برای transparent کردن فرم یا تغییر شکلش دنبال این تابع ها هستید. فکر کنم نمونه کد زیر بدردتون بخوره.


فایل‌(های) پیوست شده
.rar   SetLayeredWindowAttributes.rar (اندازه: 1.93 KB / تعداد دفعات دریافت: 9)

میزان رای دشمن است!
[تصویر:  cff100.png]
۱۰-اردیبهشت-۱۳۸۷, ۱۱:۲۳:۴۵
وب سایت ارسال‌ها
پاسخ
m_vb66 آفلاین
در حال پیشرفت
***

ارسال‌ها: 253
موضوع‌ها: 60
تاریخ عضویت: فروردین ۱۳۸۷

تشکرها : 114
( 52 تشکر در 35 ارسال )
ارسال: #7
RE: ارگومانهای توابع SetWindowLongوGetWindowLongوSetLayeredWindowAttributes
ممنون پس کارشون لایه کردن و حذف رنگه یک چیزی مثل فتوشاب
۱۱-اردیبهشت-۱۳۸۷, ۱۰:۰۵:۱۵
ارسال‌ها
پاسخ


موضوعات مرتبط با این موضوع...
موضوع نویسنده پاسخ بازدید آخرین ارسال
  [سوال] Question تغییر متن یک node در treeview با توابع API Kadilak 0 1,741 ۲۶-خرداد-۱۳۹۳, ۲۲:۰۶:۵۳
آخرین ارسال: Kadilak
  کار توابع api candy1 8 8,281 ۱۴-خرداد-۱۳۸۸, ۱۵:۳۰:۴۴
آخرین ارسال: candy1
  توابع api lord_viper 0 4,555 ۱۱-آبان-۱۳۸۷, ۲۳:۴۲:۱۰
آخرین ارسال: lord_viper
  RegisterWindowMessage SendMessageTimeout ObjectFromLresult کار این توابع چیه m_vb66 0 3,853 ۲۲-اردیبهشت-۱۳۸۷, ۰۹:۰۵:۱۴
آخرین ارسال: m_vb66
  نحوه استفاده از توابع API در ++c zacaria 3 3,864 ۰۹-بهمن-۱۳۸۶, ۲۰:۴۲:۱۰
آخرین ارسال: Mamad2003
  توابع TAPI endedivooneh 3 4,634 ۳۰-شهریور-۱۳۸۶, ۰۱:۰۹:۴۹
آخرین ارسال: ali.jyan
  فایل های TXT مربوط به توابع API blest 2 4,283 ۲۷-تير-۱۳۸۶, ۰۴:۲۳:۳۳
آخرین ارسال: Pedram_HookEx
Rolleyes در خواست کمک از کرکرها در مورد توابع api ها jaber 0 2,221 ۰۱-اسفند-۱۳۸۵, ۰۱:۵۷:۱۳
آخرین ارسال: jaber

پرش به انجمن:


کاربرانِ درحال بازدید از این موضوع: 1 مهمان

صفحه‌ی تماس | IranVig | بازگشت به بالا | | بایگانی | پیوند سایتی RSS