Click here to Skip to main content
15,902,275 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: MFC Design Question Pin
l a u r e n22-Mar-01 20:29
l a u r e n22-Mar-01 20:29 
GeneralLooking for Algorithm to match RGB values Pin
Wolfram Steinke21-Mar-01 13:42
Wolfram Steinke21-Mar-01 13:42 
GeneralRe: Looking for Algorithm to match RGB values Pin
22-Mar-01 0:01
suss22-Mar-01 0:01 
GeneralRe: Looking for Algorithm to match RGB values Pin
Christian Graus22-Mar-01 11:46
protectorChristian Graus22-Mar-01 11:46 
GeneralPlease help save my sanity... Pin
21-Mar-01 10:16
suss21-Mar-01 10:16 
GeneralRe: Please help save my sanity... Pin
Michael Dunn21-Mar-01 16:52
sitebuilderMichael Dunn21-Mar-01 16:52 
GeneralReplacing ComboBox arrow-button Pin
21-Mar-01 9:41
suss21-Mar-01 9:41 
GeneralHelp me Please! Bitmap UI probs Pin
21-Mar-01 8:36
suss21-Mar-01 8:36 
Hi,

I'm pretty new to C++ windows and i'm getting a little stuck. I'm trying to get a dialog based app going with a simple bitmapped ui. I dont want to use any of the skin librarys available here because they are a bit over the top for my needs.

I made a basic dialog based mfc project, stripped title bar and borders off the dialog, and use OnPaint() to bitblt a bitmap onto the background. i then call CDialog::OnPaint() which (in my understanding) has windows deal with painting of the two child buttons on the dialog.

This so far actually worked, which impressed me. Then I wanted to make the window draggable by clicking anywhere on the background. So I use a comboination of OnLButtonDown, OnLButtonUp and so on to facilitate this.

This almost works right. Mostly you can drag the window round just fine, but sometimes the child buttons on the window dissapear. this especially seems to happen if you drag the window to the top of the screen and down again.

I cannot figure out for the life of me why this occurs. i found a rather poor workaround in that calling SendMessage(WM_PAINT,0,0) at the end of OnMouseMove makes sure the buttons dont dissapear, but this slows everything down and makes the window flicker badly when being dragged.

Can anyone help me identify why the buttons sometimes dissapear?

The VC6 project and assocated files are available at:

http://www.atomichamster.org/bitmapui.zip

The download is about 50k

Looking forward to hearing your replies.

Thanks

Jon
GeneralRe: Help me Please! Bitmap UI probs Pin
Chris Losinger21-Mar-01 9:29
professionalChris Losinger21-Mar-01 9:29 
GeneralRe: Help me Please! Bitmap UI probs Pin
21-Mar-01 9:52
suss21-Mar-01 9:52 
GeneralRe: Help me Please! Bitmap UI probs Pin
Chris Losinger21-Mar-01 11:26
professionalChris Losinger21-Mar-01 11:26 
GeneralRe: Help me Please! Bitmap UI probs Pin
Michael Dunn21-Mar-01 16:58
sitebuilderMichael Dunn21-Mar-01 16:58 
GeneralRe: Help me Please! Bitmap UI probs Pin
22-Mar-01 12:03
suss22-Mar-01 12:03 
GeneralRe: Help me Please! Bitmap UI probs Pin
23-Mar-01 9:14
suss23-Mar-01 9:14 
QuestionHow to turn status bar, menu bar, tool bar, title bar off? Pin
Richard Cheng21-Mar-01 6:23
Richard Cheng21-Mar-01 6:23 
GeneralAccelerator Pin
confalonieri21-Mar-01 3:57
confalonieri21-Mar-01 3:57 
QuestionCComboBox - how to react to enter i editbox? Pin
21-Mar-01 2:19
suss21-Mar-01 2:19 
AnswerRe: CComboBox - how to react to enter i editbox? Pin
PJ Arends22-Mar-01 6:22
professionalPJ Arends22-Mar-01 6:22 
QuestionDundas Ultimate Grid -- enhanced Version? Pin
Uwe Keim20-Mar-01 19:21
sitebuilderUwe Keim20-Mar-01 19:21 
AnswerRe: Dundas Ultimate Grid -- enhanced Version? Pin
Holger Persch20-Mar-01 19:48
Holger Persch20-Mar-01 19:48 
GeneralWeb Accessories Pin
Marcelo Nogueira Magri20-Mar-01 14:50
Marcelo Nogueira Magri20-Mar-01 14:50 
GeneralRe: Web Accessories Pin
Erik Thompson21-Mar-01 7:48
sitebuilderErik Thompson21-Mar-01 7:48 
GeneralSetWindowsHookEx Pin
Conor Hunt20-Mar-01 10:38
Conor Hunt20-Mar-01 10:38 
GeneralRe: SetWindowsHookEx Pin
Michael Dunn20-Mar-01 18:04
sitebuilderMichael Dunn20-Mar-01 18:04 
Generaldialogbox Pin
20-Mar-01 8:23
suss20-Mar-01 8:23 

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.