Click here to Skip to main content
15,918,007 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRtclick on the Tree control is not working Pin
Binayak12-Aug-03 9:28
Binayak12-Aug-03 9:28 
GeneralRe: Rtclick on the Tree control is not working Pin
HPSI12-Aug-03 13:30
HPSI12-Aug-03 13:30 
GeneralRe: Rtclick on the Tree control is not working Pin
Binayak12-Aug-03 13:37
Binayak12-Aug-03 13:37 
QuestionShould i use a progress control? Pin
keegan12-Aug-03 8:33
keegan12-Aug-03 8:33 
AnswerRe: Should i use a progress control? Pin
Heath Stewart12-Aug-03 8:44
protectorHeath Stewart12-Aug-03 8:44 
GeneralRe: Should i use a progress control? Pin
keegan12-Aug-03 8:52
keegan12-Aug-03 8:52 
GeneralRe: Should i use a progress control? Pin
John M. Drescher12-Aug-03 9:02
John M. Drescher12-Aug-03 9:02 
GeneralRe: Should i use a progress control? Pin
Heath Stewart12-Aug-03 9:24
protectorHeath Stewart12-Aug-03 9:24 
No, not even that. You have the overhead of the slider control while trying to override its painting (i.e., owner drawing) anyway. It's pointless.

By static control, I meant CStatic (since you're using MFC). It's a simple control with no frills. You're thinking of the CEdit control (to the original poster). You could even derive from CWnd - you just need a surface to paint on. This is a very simple solution and trying to "extend" some existing control that is "close but no cigar" will just make things worse.

Consider using a slider: sure, it has tick marks - but you don't want the actual slider, right? So you have to go to all the work of either keeping the slider from painting or painting over it. After that, you have to go to the trouble of still painting your simple colored rectangle.

So, just make your own control (say, CGuage that derives, preferrably, from CWnd) and handle the WM_PAINT message (or use a number of overridables or other forms for owner drawing).

 

-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
GeneralRe: Should i use a progress control? Pin
John M. Drescher12-Aug-03 9:34
John M. Drescher12-Aug-03 9:34 
AnswerRe: Should i use a progress control? Pin
keegan12-Aug-03 8:59
keegan12-Aug-03 8:59 
Generalgot it Pin
keegan12-Aug-03 9:08
keegan12-Aug-03 9:08 
GeneralRe: got it Pin
John M. Drescher12-Aug-03 9:16
John M. Drescher12-Aug-03 9:16 
GeneralCFileDialog Pin
will138312-Aug-03 7:54
will138312-Aug-03 7:54 
GeneralRe: CFileDialog Pin
Heath Stewart12-Aug-03 8:51
protectorHeath Stewart12-Aug-03 8:51 
GeneralRe: CFileDialog Pin
will138312-Aug-03 9:11
will138312-Aug-03 9:11 
GeneralRe: CFileDialog Pin
will138312-Aug-03 9:46
will138312-Aug-03 9:46 
GeneralRe: CFileDialog Pin
Heath Stewart12-Aug-03 10:46
protectorHeath Stewart12-Aug-03 10:46 
GeneralOLE DB record counting Pin
João Paulo Figueira12-Aug-03 7:43
professionalJoão Paulo Figueira12-Aug-03 7:43 
GeneralRe: OLE DB record counting Pin
Jörgen Sigvardsson12-Aug-03 13:37
Jörgen Sigvardsson12-Aug-03 13:37 
GeneralRe: OLE DB record counting Pin
João Paulo Figueira12-Aug-03 22:41
professionalJoão Paulo Figueira12-Aug-03 22:41 
GeneralRe: OLE DB record counting Pin
Jörgen Sigvardsson12-Aug-03 22:46
Jörgen Sigvardsson12-Aug-03 22:46 
GeneralRe: OLE DB record counting Pin
João Paulo Figueira24-Aug-03 22:14
professionalJoão Paulo Figueira24-Aug-03 22:14 
GeneralRe: OLE DB record counting Pin
Jörgen Sigvardsson25-Aug-03 0:46
Jörgen Sigvardsson25-Aug-03 0:46 
GeneralRe: OLE DB record counting Pin
João Paulo Figueira25-Aug-03 1:01
professionalJoão Paulo Figueira25-Aug-03 1:01 
GeneralCrystal Report Viewer Pin
Archigal12-Aug-03 6:28
Archigal12-Aug-03 6:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.