|
hi
I have created mfc dialog based application.IN that i have set the bitmaps on dialog box and i am creating dyanmic buttons on that . I am able to see the dynamic buttons but the buttons which i have pasted on dialog box on the bitmaps are not seen.
When i run the application I can see the dialog with bitmaps an dynamic buttons but the buttons already on dialog are seen when i click on dialog box or move it.
It means it is the problem of re-painting.I tried a lot but was not successful. Can anyone help in solving the same.
Best Regards
jhon
|
|
|
|
|
.....i dunno if thiz will help but try thiz out......
each button is derived from a Cwnd class,so we manually put in the code to show the button window as the topmost window.....
and put the code in ur OnInitDialog() function,
GetDlgItem(IDOK)->SetWindowPos(&CWnd::wndTopMost, 0, 0, 0, 0,SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE);
hope that solvez ur problem.....
cheerz.....
"faith, hope, love remain, these three.....; but the greatest of these is love" -1 Corinthians 13:13
|
|
|
|
|
hi
no, my problem has not solved.
See i have dialog box and had set the bitmap to whole dialog and then OnInitDialog i have set the bitmaps to the buttons also.First time the buttons are not seen but when i click on dialog they are seen but if i move again they disappear.
waiting for reply
|
|
|
|
|
Try repainting the buttons in OnEraseBkgnd() after drawing the background for the main dialog.
If that fails, try repainting the buttons in OnPaint();
this is this.
|
|
|
|
|
The controls are drawn in tab-order. So, make sure that the bitmaps tab position is before any control that needs to be drawn on top of it.
Selecting Clip Siblings might also work, but I have not varified that.
INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
|
|
|
|
|
hi andrew
thanx for the suggestions.
it worked fine
cheers
Ganesh
|
|
|
|
|
|
look at the following article :
http://www.codeproject.com/com/jscalls.asp
|
|
|
|
|
Ya, I had looked on that article, but I don't want browser interfaces and GUI, is there a way to execute javascript by command line programs, with efficiency using microsoft javascript interpreter.
http://www.priyank.in/
|
|
|
|
|
I am doing ISAPI filter to customize authentication users. Problem now is I want to connect to database to search valid users. My database is MS Access. How can i write the code in Visual C++?
Help me...
Thanks
LeeHerng
|
|
|
|
|
I wouldn't imagine the fact that you're within an ISAPI filter would matter all that much. Just look up some of the many samples on the web ( or even right here on Code Project ) to use an Access database, and then copy it into your code.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I am using Dev-CPP 4.9.9.2. Whenever i try to use openthread, it says "[linker error] Undefined reference to 'OpenThread'"
What is wrong? OpenProcess works fine, so i dont know whats wrong with openthread...
|
|
|
|
|
OpenThread is only for Windows 2000+, and ME according to the docs, yet OpenProcess has been available since Windows 95. You are not linking to it probably because your WINVER macros are defined as 0x400 (Windows 95 and higher). Up the version on them.
|
|
|
|
|
Ah! Thank you very much, that fixed it completely!
|
|
|
|
|
Hello everyone:
i have a modal dialog which contains many controls for user to operate on so as to continue the work.Now i want to let it embed into the frame,not floating on the screen any more,just like a formview.some one told me to change the dialog as a formview,but there are quite a lot of code i have wrritten based on that dialog.
should i changed it in to a cformview?if that,how can i create it to fit the frame,because on the left side is a big dlgbar.
i am sooooo confused now.is there anyone who can help me?anhthing will be appreciated ,thankx in advance!!!!!!!!!!!
|
|
|
|
|
A formview is basically a surface that you can add controls to like a dialog box, but within a normal windows app, which means you can have tool bars, menus, etc. I'd say that the best thing to do is to make a new formview application, and see if you can copy and paste your control layout between projects. That may work. If not, I'd certainly suggest that a formview is what you need to do anyhow, painful as that may be. You should be able to copy a lot of the code though, just handle the same events, and copy and paste your code between them. If you know how to plumb the MFC message handlers yourself, you can probably do it all by hand.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
thanks for your reply,Christian Graus
can you give me some samples or articles on how to create it ,especially on how to set it the proper size and position?
|
|
|
|
|
I'm not sure what the issue is ? Use SetWindowPos to change the size of your window, and it's position, if required. Why do you need to do this ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
thank you.just as i have referenced before,i want my modal dialog not to float on the screen any more,but to be a part of my frame,which can be resized like a formview. howerver, i don't know howto create it use a function like DoModal().Is there any one who can help me?Thanks in advance!
|
|
|
|
|
You can't, because it will be embedded in your frame. Your best bet would be to use a formview, and then resize the dialog when a button is pushed to show/hide the section that you're wanting to put in your dialog. To do this, either put the stuff you want to show/hide at the far bottom or far right of the form (so it's easy to size the form to hide it ), or put everything else onto a panel, so you can resize the panel to cover/show the controls in question at the top or left of the form. The second way is better, then you can get everything else to autosize on the panel, and only have to manually move one control.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I wrote a windows program using VISUAL C## and MFC, using CEditView.
I find I need to have a scrollable dialog box.
Is this possible in CEditView, or do I have to convert it to CFormView?
This program has multiple dialogs, and some of them are over a screen long.
Thanks...
|
|
|
|
|
I didn't know you could derive a dialog box from a view nowadays, I thought you created a windows app and used CFormView to do that.
If you could derive from CEditView then I assume you could derive from CScrollView instead, which will give you scrolling. CEditView gives you a big fat edit box though, I thought, which is surely not what you want for a dialog box ? I'd suggest you need to examine a more wizard type interface, having people scroll through dialog boxes seems pretty cluttered to me.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi Christian...
I wrote a tax program in C under DOS years ago, and finally converted it to a windows program. So I created a separate dialog for each tax form. It was my first real attempt at VCPlus, so it is not ideal code. CEditView seemed to give me what I needed at the time, except scrollable dialogs. Now I would like to get rid of the 2 to 5 page dialogs and replace them with 1. I'll try CScrollView and see what happens.
Thanks..
|
|
|
|
|
bitron@islandnet.com wrote:
This program has multiple dialogs, and some of them are over a screen long.
Scrolling dialogs are evil. Split them up so the dialogs are smaller and fit on the screen.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Hi, I have an dialog based app that has an initialisation dialog and a main dialog (property sheet). I have to switch between these dialogs and keep the non active one hidden.
My problem is how do I put a minimize button on a Property Sheet dialog?
Thanks
---
|
|
|
|