winapi - How to detect mouse click multiple times using Visual C++? -
i have started working win32 api. trying create simple window application writes hello world when run it. want catch clicks , give same 'hello world' text window once again(not going delete first one.) different -random if possible- font/color. got show first 'hello world' , got catch first click , show 'hello world' second time. couldn't manage other clicks. how can solve this?
here got far:
case wm_lbuttondown: { hdc = getdc(hwnd); hfont hfont, holdfont; hfont = (hfont)getstockobject(ansi_var_font); if (holdfont = (hfont)selectobject(hdc, hfont)) { textout(hdc, 10, 50, text("hello world"), strlen("hello world")); selectobject(hdc, holdfont); } textscreen(hwnd, i); endpaint(hwnd, &ps); releasedc(hwnd, hdc); }
Comments
Post a Comment