Click here to Skip to main content
15,917,506 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralStatus bar question ... Pin
Hadi Rezaee22-Mar-01 4:44
Hadi Rezaee22-Mar-01 4:44 
GeneralModem answer Pin
Antonio22-Mar-01 1:37
Antonio22-Mar-01 1:37 
GeneralRe: Modem answer Pin
22-Mar-01 9:36
suss22-Mar-01 9:36 
GeneralLinker error LNK2001 with MAPISendMessage Pin
22-Mar-01 1:02
suss22-Mar-01 1:02 
GeneralRe: Linker error LNK2001 with MAPISendMessage Pin
5-Jun-01 8:35
suss5-Jun-01 8:35 
GeneralPlease help me: Conversion Problem Pin
kyousuke22-Mar-01 0:46
kyousuke22-Mar-01 0:46 
GeneralRe: Please help me: Conversion Problem Pin
22-Mar-01 2:29
suss22-Mar-01 2:29 
GeneralRe: Please help me: Conversion Problem Pin
markkuk22-Mar-01 22:01
markkuk22-Mar-01 22:01 
GeneralWin95 DOS Shell versus WinNT Dos Shell Pin
Gerry21-Mar-01 21:59
Gerry21-Mar-01 21:59 
GeneralRe: Win95 DOS Shell versus WinNT Dos Shell Pin
Michael Dunn22-Mar-01 13:04
sitebuilderMichael Dunn22-Mar-01 13:04 
GeneralRe: Win95 DOS Shell versus WinNT Dos Shell Pin
Gerry22-Mar-01 21:45
Gerry22-Mar-01 21:45 
GeneralMFC Design Question Pin
21-Mar-01 17:30
suss21-Mar-01 17:30 
GeneralRe: MFC Design Question Pin
Michael Dunn21-Mar-01 20:20
sitebuilderMichael Dunn21-Mar-01 20:20 
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 

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.