|
Pretty straight forward answer by enhzflep
|
|
|
|
|
did u just type out the course project question word for word and expect someone to do it for you?
|
|
|
|
|
Good point...
|
|
|
|
|
This is my favourite part:
Anyone has any idea on how to do this?
Design the necessary classes and member functions to achieve the above tasks.
|
|
|
|
|
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
is that possible to connect Ms ACCESs 2003 to conncet with vc++ 6
plz help me how it will connect
plz send me code how to connect
|
|
|
|
|
U can use MS ACCESS with vc++ using msado15.dll.
ritz1234
|
|
|
|
|
i have include this dll into my project directory
but error msg when i excute my program
error unrecognized formate
while this code is working with ms access 97
but for ms access 2003 show error
|
|
|
|
|
Hello, I need some help and I'm a MFC newbie, please be patient with me.
I simply tried to draw text in the client area, at first I thought OnPaint message was not caught, but when I was trying to resize the Window multiple times, the text appears. It appears for only only a very brief time, not even long enough for the eyes to see. Is there something I forgot to do?
The text should not disappear even if the OnPaint returns right?
CPaintDC dc (this);
CString str = _T("String");
CRect rect;
GetClientRect(&rect);
dc.DrawText(str,-1,&rect, DT_VCENTER | DT_CENTER | DT_SINGLELINE);
|
|
|
|
|
Only thing I can think of, is that if you handle WM_PAINT, you're expected to return a non-zero value, otherwise windows will also handle the message
|
|
|
|
|
Thanks for the help, that is a good point I'll look into it.
Thats what I also know for WIN32 API... but does MFC classes does that implicitly or explicitly?
|
|
|
|
|
Closer examination seems to indicate that it's handled implicitly. I guess painting in the non-client area would have a similar effect to the one you describe, unless onNcPaint was being used..
|
|
|
|
|
So that phenomenon is suppose to be normal? Thanks for your efforts, if some other ideas come up, please let me know. I will really appreciate it.
|
|
|
|
|
No, it should be like that.
What you write in the OnPaint should stay in the dialog until a update window, update region, update dialog, erase background, resize the window/dialog, change between apps... any message that implies a refresh of the screen.
So if your text is not showing I guess you are calling unvoluntarly one of that messages just after your OnPaint, or not calling the OnPaint fter on of those messages.
Use the Step by Step in debugging and take a look on your code executing.
Regards.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Thanks for your effort. I will look into it.
|
|
|
|
|
jazy1 wrote: The text should not disappear even if the OnPaint returns right?
Right!
Something else is going on that you haven't shown...
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I found out what was wrong, the generated code by the VS2005 for painting the toolbar and status bar(OnCreate) kept repainting the client area, thats why it wasn't visible... I think this may not be the fix, but at least I got the string to show... Thanks for your efforts guys.
P.S. I still don't think this is the fix since it is a generated code, it is suppose to work properly... Post please if you have any idea.
|
|
|
|
|
I have a MDI project, now I want to print the interface. So I saw this article:
http://support.microsoft.com/kb/q186736/
Then I try to apply to my project, just create a menu item or button, do like this:
ON_COMMAND(ID_PRINT_PRINTALL, &CMyDlg::PrintGUI)
afx_msg void PrintGUI();
void CMyDlg::PrintGUI(){
CWnd* a = AfxGetMainWnd();
PrintWindowToDC(*a);
}
But when I run, nothing happen.
Have anyone ever tried the similar thing? Please helpppppppp !!!!!!!!!!
|
|
|
|
|
here in the CP there are articles to print a screen capture, to print from a dialog, to print using or not using MFC... I strongly recommend you to have a look into that section.
IMHO the best articles are from Roger Allen, Chris Maunder, Joseph M Newc...
Regards.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
I am trying to convert the c file for some other compiler to MS VC++ .Net compiler.
In the c file, there are some value specified like 031bH which means 0x031b.
I want change all of them using Regular Expression,
Using the R.E. "[0-9]^3[a-fA-F0-9][H]" in "Find what" and "0x\0" in "Replace with" the value is coming like 0x031bH.
How can I remove the H in a single step while prefixing with "0x"?
--
"Programming is an art that fights back!"
|
|
|
|
|
Try this (it works in VI for me, but your mileage may vary depending on which RE tool you are using - regardless, it should be enough to get you running in your environment):
Search string: "\([0-9a-fA-F]\{1,4\}\)H"
Replace string: "0x\1"
Note that the above will only parse hex constants in the form you mentioned with 1-4 hex digits preceding the 'H' suffix.
|
|
|
|
|
Hi
Thank you very much for the help!!
I will try this..
Regards,
Suman
--
"Programming is an art that fights back!"
|
|
|
|
|
|
Take a look three messages below this one. The question is asked and answered with some links.
Regards.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
I've found it since. What I was looking for was:
void CWinApp::RegisterShellFileTypes(BOOL bCompat)
Bram van Kampen
|
|
|
|