Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* ej26_SubClaseBoton
- Ejemplo para manejar una subclase con el contro Boton */
- #include <radc++.h>
- Form form1("Subclase boton - RAD C++ Ejemplo");
- Icon icon1(IDI_APPLICATION);
- Button btn;
- FormProcedure form1Proc(FormProcArgs) {
- ON_CLOSE() Application.close();
- ON_COMMAND_BY(btn) {
- form1.caption = "Subclase boton oprimido";
- }
- return 0;
- }
- WNDPROC oldprocedure=NULL;
- ControlProcedure btnProc(ControlProcArgs) {
- ON_LEFT_CLICK_RELEASE() {
- form1.caption = "release";
- SendMessage(GetParent(hwnd),WM_COMMAND,wParam,lParam);
- }
- return CallWindowProc(oldprocedure, hwnd, message, wParam, lParam);
- }
- rad_main()
- // form1.setDProcedure((FORMPROC)form1Proc);
- form1.procedure = form1Proc;
- btn.create("button1",AUTO_ID,100,100,100,100,form1,true,true,false,false,0,true,icon1);
- SetClassLong(lbl.hwnd,GCL_STYLE,(LONG)(CS_VREDRAW| CS_HREDRAW));
- oldprocedure = (WNDPROC)btn.setWProcedure(btnProc);
- rad_end()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement