|
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
|
|
|
|
|
Hi,
Well, the question 3 lines below covered the same topic, but did not cover what I was after. I was looking for the Name of: CWinApp::RegisterShellFileTypes(); (I could at the time not think of the Name, and was not sure of the class it belonged to). The business part of this resides in CDocManager. I am now doctorring that code to register critical extensions in my setup program.
Thanks anyways for the Interest you showed in my question.
Regards,
Bram van Kampen
|
|
|
|
|
|
I've found it since. What I was looking for was:
void CWinApp::RegisterShellFileTypes(BOOL bCompat)
Thanks
Bram van Kampen
|
|
|
|
|
Hi Mark,
My question was a bit more subtle. I never use the Document Interface, but actually what I was looking for (and since found) was 'CWinapp::RegisterShellFileTypes()'
I am hacking that now in order that my instalation program sets file asociations for rarely used utilities. For example, many european ISP's do not allow DLL's EXE's etc to be send as an e-mail attachment. No Problem, I wrote a utility which converts the binary into a text file, which I gave the extension say '.QXP' I also include in the release, a program that silently (no UI if things go Right) converts the QXP file back. The idea is also that double clicking by the usr on a 'QXP' file should start the conversion back
All this works, and fails gracefully on error. There is one issue remaining, and I'm running out of computers to test it, and that is, what does 'CWinApp::EnableShelOpen()'actually do.( This is subject to another posting).
Regards
Bram van Kampen
|
|
|
|
|
I want to print some icons. Here is my code:
CDC* m_PrintDC;
CPoint point(10, 10);
HICON aIcon = AfxGetApp()->LoadIcon(IDI_ICON_CHECKEDBOX);
m_PrintDC->DrawIcon(point, aIcon);
Here IDI_ICON_CHECKEDBOX is a icon ID that I draw.
But it doesn't work, I don't know why?? I can print some text with DrawText(...).
Anyone know what's wrong here? Thank you in advance.
|
|
|
|