|
Hi
Any body know any articles or ebooks that explains VC++ for beginers ?
|
|
|
|
|
|
http://www.functionx.com
Anurag Gandhi.
|
|
|
|
|
Hi all:
I have a modeless dialog in which I have done not much inside its OnPaint, but when this dialog overlapped randomly, this dialog appears out of shape on the surface, should I send WM_PAINT or WM_ERASEBKGND message, if so when should I send them?
|
|
|
|
|
If you draw something directly on the dialog, all the drawing code should be put in the OnPaint handler. The dialog doesn't "keep" the drawing for you but you have to redraw everything again in the OnPaint handler.
Is that your problem ? If no, then I misunderstood your question.
|
|
|
|
|
Cedric Moonen wrote: redraw everything again in the OnPaint handler
I probably miss state the situation, on OnPaint I only call the DrawText, other than that I done nothing else, system handle all the rest paint operations.
|
|
|
|
|
it depends on what you exactly do. A repaint makes than sence, when all GUI changes are done.
It is also common style to update only some controls. For instance a status bitmap.
It makes also sence to divide forground and background painting.
Greetings from Germany
|
|
|
|
|
Maybe you have to post more clearly your problem.
Anyway, don't send WM_PAINT directly,
use instead InvalidateRect and UpdateWindow functions.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Hi
i am making a app.. in vc++ how we upload a doc file in mysql database
selecting data from local hard disk
Regard's
Kaushik
|
|
|
|
|
Where are you in the process of doing it? What have you tried and accomplished?
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
i can browse hard disk and read the name of file
but i am unable to upload file in database
Regard's
Kaushik
|
|
|
|
|
What type of field in your database will hold said file? Are you able to assign values to other fields?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I'm developing an application. The code can run naturally. But after I rebuild all code, the code happened an exception numbered 'C0000005' in the CDialog::OnInitDialog(). I spent several hours to find the reason. But none found. Is there someone can give me some tips?Thxs.
|
|
|
|
|
Use your debugger and check where the code crashes. You are probably writing somewhere in memory where you shouldn't.
|
|
|
|
|
The context arround this exception is that I declare and realize a CDialog class. And I override its construct function. In the constructor, I initialize a pointer varriable to an varriable's address of parent window. I trace the code and I find the crasher happened after the execution of DDX_Control on the control varriable I added for an EditBox. Then when execute the CDialog::OnInitDialog(), the code crash. I'm really not know the reason. I try to delete the EditBox and the varriable associate with it. But the exception still happen.
|
|
|
|
|
I think I had like your problem previous How do you create editbox ?
|
|
|
|
|
The editbox is created using the dialog editor.
|
|
|
|
|
Are you sure id of editbox is unique on the Resource.h
|
|
|
|
|
For example if you have this code it generate an error
public:
CButton mm;
CButton mmm;
DDX_Control(pDX, IDC_BUTTON1, mm);
DDX_Control(pDX, IDC_BUTTON1, mmm);
or if you have an invalid IDC_BUTTON1 you get this message
An unsupported operation was attempted.
|
|
|
|
|
I had checked this varriable already that no duplicate was found.
|
|
|
|
|
For first try if you delete that line that has problem what happens?(DDX_)?
|
|
|
|
|
This exception disappeared.
|
|
|
|
|
Use of breakpoints for see error with F5 then you arrive will to error.
|
|
|
|
|
Thanks for your answer. I occasionally move the declaration of CEdit varriable to another place and put it adjoin with other CEdit varriable. So the exception disappear, although I don't know why. But this problem was resolved. I'm very happy! Thanks for everyone's helping.
|
|
|
|
|
I glad you sovled your problem.
|
|
|
|