kandi X-RAY | Neatpad Summary
kandi X-RAY | Neatpad Summary
Neatpad
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Neatpad
Neatpad Key Features
Neatpad Examples and Code Snippets
Community Discussions
Trending Discussions on Neatpad
QUESTION
LRESULT WINAPI TextViewWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
TextView* ptv = (TextView*)GetWindowLong(hwnd, 0);
switch (msg)
{
case WM_NCCREATE:
if ((ptv = new TextView(hwnd)) == nullptr)
return FALSE;
SetWindowLong(hwnd, 0, (LONG)ptv);
return TRUE;
}
...ANSWER
Answered 2020-Aug-20 at 14:49Per the GetWindowLong()
documentation:
nIndex
Type: int
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.
...
The following values are also available when the hWnd parameter identifies a dialog box.
DWL_MSGRESULT
0
Retrieves the return value of a message processed in the dialog box procedure.
The code in question is for a window that wraps a TextView
object. The window is NOT a dialog box, and there is an InitTextView()
function beint called that registers a WNDCLASSEX
whose cbWndExtra
field is set to sizeof(TextView*)
when calling RegisterClassEx()
:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Neatpad
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page