Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Clark Lin
hw3d
Commits
14fab71d
Commit
14fab71d
authored
Dec 09, 2018
by
chili
Browse files
wm char and mouse stuff
parent
1046bb2c
Changes
1
Hide whitespace changes
Inline
Side-by-side
hw3d/WinMain.cpp
View file @
14fab71d
...
@@ -25,6 +25,21 @@ LRESULT CALLBACK WndProc( HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam )
...
@@ -25,6 +25,21 @@ LRESULT CALLBACK WndProc( HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam )
SetWindowText
(
hWnd
,
"Dangerfield"
);
SetWindowText
(
hWnd
,
"Dangerfield"
);
}
}
break
;
break
;
case
WM_CHAR
:
{
static
std
::
string
title
;
title
.
push_back
(
(
char
)
wParam
);
SetWindowText
(
hWnd
,
title
.
c_str
()
);
}
break
;
case
WM_LBUTTONDOWN
:
{
const
POINTS
pt
=
MAKEPOINTS
(
lParam
);
std
::
ostringstream
oss
;
oss
<<
"("
<<
pt
.
x
<<
","
<<
pt
.
y
<<
")"
;
SetWindowText
(
hWnd
,
oss
.
str
().
c_str
()
);
}
break
;
}
}
return
DefWindowProc
(
hWnd
,
msg
,
wParam
,
lParam
);
return
DefWindowProc
(
hWnd
,
msg
,
wParam
,
lParam
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment