winapi - Change border color of Rectangle function in c++ -


how can change border color of rectangle function in c++/masm32?

you can try this, just giving example can change according requirement.

bool crectangledlg::onerasebkgnd(cdc* pdc) {     cbrush brushblue(rgb(0, 0, 255));// inner color blue.    cbrush* poldbrush = pdc->selectobject(&brushblue);     // create , select thick, black pen    cpen penblack;    penblack.createpen(ps_solid, 3, rgb(255, 0, 0));// red color width 3    cpen* poldpen = pdc->selectobject(&penblack);     // our client rectangle    crect rect;    getclientrect(rect);// pass rect coordinates here     // shrink our rect 20 pixels in each direction    rect.deflaterect(20, 20);     // draw thick black rectangle filled blue     pdc->rectangle(rect);     // put old objects    pdc->selectobject(poldbrush);    pdc->selectobject(poldpen);      return true;//cdialog::onerasebkgnd(pdc); } 

Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -