|
Hi Diddy,
When I set the DSN=MS Access Database, it works! It did prompt me for the DB.
I tried out another method, in the CMainFrame class, I created a OnFileOpen() function and add in the code as listed below:
CDatabase pdb;
pdb.OpenEx(_T("DSN=MS Access Database; [Temp Values]"));
I don't what should I do next to get this database to overwrite to the default database in the CTempProfilerSet class.
Best Regards,
Siew Hoon
|
|
|
|
|
Hi Diddy,
I had solved the distorted graph when I use the scroll bar. After test run my program a few times, I found that when I moved the scroll bar down and click on for example graph #21, it showed me graph #13. How should I solve it?
Need Help
Siew Hoon
|
|
|
|
|
Put this:
CClientDC dc(this);
OnPrepareDC(&dc);
dc.DPtoLP(&point);
In your OnLB down handler. Youll also need it anywhere u look at mouse cords , say OnMouseMove
|
|
|
|
|
I've spent a week on making COM+ ManagementTool displaying COM+ Catalog Infomation using COMAdminCatalogCollection.
Currently,I'm using VB.NET to do this job.
Most of infomation I'd like to
find was in COMAdminCatalogCollection.
But I couldn't find a way of retrieving imfomation of state of Object activated. I'd like to know how many Object is Activated as if I see the COM+ Management Tool provided in Windows 2003.
Please,Help me.
Any idea will be helpful.
|
|
|
|
|
I am having this error from my C++ programme
LINK : fatal error LNK1181: cannot open input file "fltk.lib"
Can someone tell me the specific steps to solve this problem
Thank a lot
|
|
|
|
|
Hi Goh,
Have you tried doing a Google search for fltk.lib and link error? This sounds like a custom library and you may need to make sure the linker settings are correct. Also, the tops of included headers may need to have items defined in them.
Best,
Eric
|
|
|
|
|
Your program can't locate library named "fltk.lib"
please add the correct directory of fltk.lib into setting panel in project menu.
position:
choose "link"
category : input
object/library modules : "your path of fltk.lib"
dupengfei
|
|
|
|
|
I am trying to use a Dialog bar in my application. I have created a command button and a slider on the dialog bar.
'Click event on the command button' can be detected using ON_COMMAND. Is there any way to detect changes on slider? I have tried ON_CONTROL and it did not work.
Many thanks in advanced.
One more question: What are the main advantages of rebar, differentiating it from dialogbar?
|
|
|
|
|
You should handle notification messages of the slider. It can't be done by classwizard, so you have to handle it manually. Handling notification messages goes as following:
CMyDialog.h:
afx_msg void OnSliderChange(NMHDR* pNotifyStruct, LRESULT* result);
CMyDialog.cpp:
BEGIN_MESSAGE_MAP(CMyDialog, CDialog)
...
ON_NOTIFY(TB_THUMBPOSITION, IDC_SLIDER, OnSliderChange)
END_MESSAGE_MAP()
...
void CMyDialog::OnSliderChange(NMHDR* pNotifyStruct, LRESULT* result)
{
...
}
In CSliderCtrl documentation you can find various TB_XXXX notification messages.
Robert-Antonio
"Love without sex is like a fish without antlers"
|
|
|
|
|
Hi. Does anyone have a simple C++ program that I can use to draw lines on a PC display? I would like something that I could just pass x and y start and end points, and have it plot a line.
I have Microsoft Visual C++. version 4.0.
I am not a professional programmer, so I would also appreciate an example of how this code could be called from the main program.
Thank you.
Bill
|
|
|
|
|
Hi Bill,
I would say that it depends partly on the OS being used. Is it Windows 9X, NT (or greater), or DOS, etc.
If it's Windows, there are API functions available that are as simple to use as:
pDC->MoveTo(x1, y1);<br />
pDC->LineTo(x2, y2);
Which together will draw a line starting at (x1, y1) and ending at (x2, y2). Are you familiar with these kinds of functions?
Also, check out http://www.codeproject.com/gdi/[^]
If you haven't seen these articles yet, there are a bunch of good ones, and some are marked as 'Beginner'. In particular, check out:
http://www.codeproject.com/gdi/dcdrawing.asp[^]
Drawing took me some getting used to (I'm also far from a pro programmer) but after a few practice programs you'll get the hang of drawing in Windows.
Best,
Eric
|
|
|
|
|
Thanks for the information, Eric!
I will be running Windows XP.
Can those APIs be used stand-alone, or do I have to use some sort of class thing? What inculdes do I have to put into my programs? Do you have a simple example?
Again, thanks!
Bill
|
|
|
|
|
Hi Bill,
To answer about the APIs: They are available for your use in a program without creating additional classes, they are supplied as part of Windows and your VC++ 4 compiler should let you write programs that call them.
About the includes: To be honest, I'm not sure of the actual #includes needed to access them. The reason is that I take it for granted that they will be provided automatically by App Wizard (the tool provided in VC++) when I create the program skeleton.
Are you familiar with using App Wizard to generate a program skeleton? This will help answer about a sample program.
Best,
Eric
|
|
|
|
|
Hi,
I'd like to copy the content of a Flexgrid (MS FlexGrid Control version 6.0)to a Word or Excel document. I tried "InvokeHelper(0x37, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);" hoping it would copy a picture to the clipboard but it doesn't.
Ideally, I would like to copy not a picture but the actual data as a table to Excel.
Many thanks in advance for your help.
Franck
|
|
|
|
|
I have specified in my "Open" CFileDialog to show only jpg and bmp files. But how to prevent from showing shortcuts to jpg or bmp files that are in other directories?
|
|
|
|
|
Hello @all,
how can I create a twodimensional array with a variable length?
Thank you very much!
Lucky
|
|
|
|
|
I think your best bet is use a vector.
- Nick Parker My Blog
|
|
|
|
|
Or you can use any of free matrix libraries (for example Newmat). Many of them have the same design as STL containers. Try google to find them.
Robert-Antonio
"I launched Norton Commander and saw, drive C: on the left, drive C: on the right...I said, damn, why I need two drives C:??? So I formatted one..."
|
|
|
|
|
I have been trying to use Stephan Keil's DlgResizeHelper to resize my MFC dialog based application.
The main dialog has a bitmap loaded onto it (the whole of it). This is using the CBDialog class to load the Bitmap onto the initial dialog.
Also I am using HoverButton by Niek Albers for 30 buttons on this dialog.
The dialog also makes use of a Picture control and an Animation control, together with a few edit and checkboxes controls.
The DlgResizeHelper almost works but get the original bitmap that the dialog had loaded is still on display when the dialog is enlarged. Also the HoverButtons bitmaps get a bit too large when the dialog is enlarged.
Are they a solution to these problems or are they another resizer that will do all of the above?
Regards,
Grahamfff
grahamfff
|
|
|
|
|
Having problem running my program after simply adding a second control variable through the classwizard for an editbox.
Is there a limit or something ?
Someone know what the problem is ?
|
|
|
|
|
Not two control variables for one editbox ofcourse...
two boxes..
|
|
|
|
|
What error message or ASSERT do you get?
Do the controls having unqiue IDC_ values?
Michael
But you know when the truth is told,
That you can get what you want or you can just get old,
Your're going to kick off before you even get halfway through.
When will you realise... Vienna waits for you? - "The Stranger," Billy Joel
|
|
|
|
|
Just found the problem, it was my fault.
The problem was that after inserting a edit box and didnt save in the resource view. I was too quick too insert a control variable without saving so visual studio didnt know what to do =)
the problem was in InitInstance() on this row:
m_pMainWnd = &dlg;
Thx anyway.
These darn rc files...gah
|
|
|
|
|
Hi All!
I tried the site that peterchen suggested to me,
about displaying a bitmap (not displaying it at loading time,
but displaying it by pressing a button control), but the site was about MFC
and I don't use MFC, i use Win32 API
Can anyone tell me how can I do this?
A code would be rather usefull!
Thanks anyway \ Thanks Peterchen!
|
|
|
|
|
If you have the MFC code you normally can "translate" the MFC calls to API calls since MFC is mostly a wrapper around API functions. So if you take the MFC method of e.g. the CDC class you will find an equal (normally with the same name) API function which takes a HDC handle as parameter!
|
|
|
|