|
|
Why is Visual before Visual C++? What is it doing there, did it come from microsoft?
Also, this might be a little off topic but what about Visual Basic or Visual C#. Sorry, I'm new to these forums and coding.
|
|
|
|
|
C++ is a programming language, whereas Visual C++ is a (Microsoft's) IDE (Integrated Development Environment) that compiles your C++ code into Window's executables. So, Visual C++ is a product, a program, and C++ a programming language. The same for Visual Basic and Visual C#.
A polar bear is a bear whose coordinates has been changed in terms of sine and cosine.
Personal Site
|
|
|
|
|
Just adding to the previous post, the Visual of C++ and the other languages comes from the IDE usage of wizards and designers the assist you to "visually" create applications. Thus, instead of writing code to place a textbox on a window, you actually drag and drop it and the designer will write the code as a result of that action.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
Code2326 wrote: Why is Visual before Visual C++?
just like ++ after C!
Code2326 wrote: What is it doing there, did it come from microsoft?
VC++ is just like c++ but it has support to write Window Based program. yeah it's from MS
but based on specification of ANSI
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
ThatsAlok wrote: VC++ is just like c++
That can be very confusing. Beginners often do not realize the difference between the language/compiler and the other software that VC provides. It is very important to emphasize that VC is not the same as C++. Note that when I say VC, I mean the same as VC++ but the ++ part is as extraenous as all the other characters excluded from Visual C++.
|
|
|
|
|
So I should learn Visual C++ rather than C++?
|
|
|
|
|
It is a marketing thing. The marketing parts of companies use terminology to impress management types but the terms don't make sense to technical people like us.
|
|
|
|
|
First, if this is the wrong forum, forgive me for asking here I didn't think it belonged on the Lounge, and the ADO board seemed too specific.
So I'm implementing a DB kit and I have a question about implementing editing for SQLP based DBs.
I have the library set up to edit a field (or column). However, after you edit a value in a field and post the changes, if you want to return to iterating through the values, or even if you then want to retrieve the current values, it seems that you need to remember the row you were on when you made the edit, and then make a new SQL query and then iterate back to that row. Is this in fact the case, or am I missing something obvious?
For "browsing" mode, would creating a "VIEW" using the SQL "CREATE VIEW" syntax work?
|
|
|
|
|
This is a job for Colin Angus Mackay !
(background music duh--duh--duh-duh ! as he flies in wearing his DB cape).
... ok, so you posted to the C++ instead of SQL forum, you'll have to take what you get.
Don't know what SQLP is.
However, the rest of the post sounds like you want to specify the type of cursor your statement uses. Between using a cursor that reflects changes (by you or others) and/or bookmarks you should be able to do what you want. Creating a view isn't what you want (in most (older ?) systems views are read-only).
...cmk
Save the whales - collect the whole set
|
|
|
|
|
cmk wrote: Don't know what SQLP is.
Sorry, meant SQL
OK, so it sounds like I have to know whether or not the SQL lib I use supports cursors. While I plan to support a number of various DB types (like ODBC and Firebird) my first is to support SQLite. From what I can tell SQLite doesn't support cursors. If this is in fact the case, then do I need to resort to the "brute force" method I mentioned initially (i.e. keep track of the row number and then redo the query and re-iterate back to this row)?
|
|
|
|
|
Hmmm, a quick look at SQLite and i couldn't find any cursor info as well.
It looks like the query just calls a callback for each row.
I would treat this (SQLite) as an anomaly and write ODBC/OLE DB wrappers, you'll support more DB's from the effort. ODBC is cross platform and RDBMS independent, i would do it first (and in fact did for my framework).
So yes, you would then be responsible for caching rows - i.e. you write the cursor code.
e.g. look at the GRASS (gis) source for their sqlite driver (sqlite/fetch.c):
http://grass.itc.it/download/index.php[^]
... just looked, they only support forward-only cursors, but they also have an odbc driver, it's still worth looking at their code.
[EDIT]
Also see works like:
http://www.ch-werner.de/sqliteodbc/[^]
[/EDIT]
...cmk
Save the whales - collect the whole set
|
|
|
|
|
Hi All
I need to start my MFC application with a window derived from CDialog
but I've got an exception.
Below the code I used.
What do I need to add to the Dialog class to let it be displayed?
I'm not using any .rc file and I want to built the dialog via code.
Thank you
manustone
<br />
<br />
<br />
class CGuiTestDlg : public CDialog<br />
{<br />
public:<br />
CGuiTestDlg(CWnd* pWnd);<br />
virtual ~CGuiTestDlg();<br />
<br />
virtual BOOL OnInitDialog();<br />
<br />
DECLARE_MESSAGE_MAP()<br />
};<br />
<br />
<br />
BEGIN_MESSAGE_MAP( CGuiTestDlg,CDialog )<br />
END_MESSAGE_MAP()<br />
<br />
CGuiTestDlg::CGuiTestDlg(CWnd* pWnd)<br />
: CDialog( ID_GUI_TEST_DLG, pWnd )<br />
{ <br />
}<br />
<br />
CGuiTestDlg::~CGuiTestDlg()<br />
{}<br />
<br />
BOOL CGuiTestDlg::OnInitDialog()<br />
{<br />
CDialog::OnInitDialog();<br />
return FALSE;<br />
}<br />
<br />
<br />
<br />
class CGuiTestApp : public CWinApp<br />
{<br />
public:<br />
CGuiTestApp( LPCTSTR lpszAppName );<br />
virtual ~CGuiTestApp();<br />
virtual BOOL InitInstance();<br />
};<br />
<br />
extern CGuiTestApp theApp;<br />
<br />
<br />
CGuiTestApp theApp( "Gui Test Application" );<br />
<br />
CGuiTestApp::CGuiTestApp( LPCTSTR lpszAppName )<br />
: CWinApp( lpszAppName )<br />
{ <br />
}<br />
<br />
BOOL CGuiTestApp::InitInstance()<br />
{<br />
CWinApp::InitInstance();<br />
<br />
CGuiTestDlg dlg(NULL);<br />
m_pMainWnd = &dlg;<br />
INT_PTR nResponse = dlg.DoModal();<br />
<br />
if (nResponse == IDOK)<br />
{<br />
}<br />
else if (nResponse == IDCANCEL)<br />
{<br />
}<br />
<br />
return FALSE;<br />
}<br />
<br />
CGuiTestApp::~CGuiTestApp()<br />
{}<br />
<br />
|
|
|
|
|
You'll need to construct a DLGTEMPLATE or DLGTEMPLATEEX struct in-memory and call DialogBoxIndirect() . I've never tried this with CDialog , I don't know if it's as easy to use as the normal case of just giving it the resource ID. I know I've seen an example here on CP of how to build up that struct in memory.
EDIT: My MSDN finally got done installing so I checked the docs, and the function to look at is CDialog::InitModalIndirect()
|
|
|
|
|
Thank you very much.
I tried and it works.
The most important thing is that the CDialog class MUST be derived from the empty constructor from CDialog.
Many Thanks
manu
|
|
|
|
|
I have some Borland C++ source files. I want to extract parts of them and use them in a C# project.
I modified/recompiled one of the simple C++ .cpp files into a .dll file successfully and have been able to access its classes from my C# project.
But...and there's always a butt...some of the C++ .cpp files make calls to classes in other C++ .cpp files. If I have two C++ .cpp files and one of them calls a class from the other C++ .cpp file, can I compile the two files into one .dll ? If so, I'm not having much luck doing this with Borland Builder 6, maybe you have some pointers.
If it is not possible to do what I have described, what is the correct approach?
|
|
|
|
|
I recently un-installed and re-installed Visual Studio 6.0. Something I noticed at the end of the installation process (I don't remember seeing this before) was a message box that popped up saying"
Setup has installed an icon in the Microsoft Visual C++ 6.0 group, that will allow you to install a subset of the Windows NT system symbols(.DBG) files....
For easier application debugging, it is strongly recommended that you install these files..
When I try clicking on the icon they mentioned, I get messages saying that the files I am trying to install don't coincide with the DLLs in my system32 area. This is strange because it is asking me to load the CD that I just used to install Visual Studio.
Anyways, I built a small dialog app with only one button. When I try to debug this app even with no breakpoints, after the dialog box for the app is put on the screen, I get a message box that says
User breakpoint called from code at 0xa725cd.. and the break pointer is at that address in machine code.
If I put a breakpoint inside OnInitDialog(), everything works fine, the code stops and I can look at watch points. But, once the app is allowed to run to where the dialog box is displayed, I get what I mentioned above.
Once I "stop debugging" the output window has the following in it
Loaded 'ntdll.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\kernel32.dll', no matching symbolic information found.
Loaded symbols for 'C:\WINDOWS\system32\MFC42D.DLL'
Loaded symbols for 'C:\WINDOWS\system32\MSVCRTD.DLL'
Loaded 'C:\WINDOWS\system32\gdi32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\user32.dll', no matching symbolic information found.
Loaded symbols for 'C:\WINDOWS\system32\MFCO42D.DLL'
Loaded 'C:\WINDOWS\system32\comctl32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\advapi32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\rpcrt4.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\uxtheme.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\msvcrt.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\dllt.dll', no matching symbolic information found.
First-chance exception in MoreButtons.exe (DLLT.DLL): 0xC0000005: Access Violation.
The program 'D:\PROJECTS\MoreButtons\Debug\MoreButtons.exe' has exited with code 0 (0x0).
Is it possible that I might have some corrupt files in my system32 folder????
Thank you in advance for any help
Pierre
|
|
|
|
|
I forgot to mention....
I am running Windows XP Pro with SP2
thanks
|
|
|
|
|
That message box is talking about the NT4 debug symbols (remember, VC6 is from 1998). Not having symbols for the system DLLs won't affect your ability to debug, the only thing you'll be missing is in the call stack - you won't see meaningful function names for parts of the stack that are in system DLLs.
The real problem is that "dllt.dll" is malware according to a Google search.
|
|
|
|
|
Cool Mike.... Thanks a lot...
What should be my next step... Merely delete "dllt.dll" or run Adaware? I know that is a rhetorical question but I wante to know if "that's all there is to it"...
Again... Thank you very much
Pierre
|
|
|
|
|
You can try deleting the file, but chances are it will be in use and it won't be that easy to delete it. Using AdAware or a similar scanner is the way to go.
|
|
|
|
|
What I'm trying to do is draw a background in a memory device context, and then blit it onto the window when necessary. There is no reason to redraw the background every time OnPaint() runs, so I think I would get better performance if I just drew the background once in memory, then blit the whole thing every time the screen needs to refresh. The program is running without any errors, but "It Works!" is not rendering on the screen. I'd appreciate any help. Are there any good books on this? Mine aren't very good.
Relavent part of implementation file:
void CGameWin::DrawBackground(CDC &dc)
{
CRect ItWorksDimensions;
mem_DC.CreateCompatibleDC(&dc);
ItWorksDimensions.left = 0;
ItWorksDimensions.top = 0;
ItWorksDimensions.right = 70;
ItWorksDimensions.bottom = 20;
mem_DC.DrawText("It Works!", ItWorksDimensions, DT_CENTER);
}
afx_msg void CGameWin::OnPaint()
{
CPaintDC Screen(this);
CRect WindowArea;
GetClientRect(&WindowArea);
OffSetX = WindowArea.right / 4;
OffSetY = WindowArea.bottom / 4;
DrawBackground(Screen);
Screen.BitBlt(OffSetX, OffSetY, 70, 20, &mem_DC, 0, 0, SRCCOPY);
}
Relavent part of header file:
class CGameWin : public CFrameWnd
{
public:
CGameWin();
afx_msg void OnPaint();
//file menu "File"
afx_msg void OnExit();
private:
void DrawBackground(CDC &dc);
CDC mem_DC; //memory device context
CGameKeyBindingDialog CGameKeyBindingDialog;
int OffSetX;
int OffSetY;
DECLARE_MESSAGE_MAP()
};
|
|
|
|
|
When you call CreateCompatibleDC() to create your memory DC, it has a 1x1 pixel monochrome bitmap
selected into it. You also need to create a compatible bitmap and select it into the memory DC
before rendering the text.
Also, creating an offscreen bitmap, just to render text on, and then blting it to the screen
you are not getting a transparent blt so whatever background was in the memory DC is going to
be blted.
There's still a major resource leak re-creating that memory DC on every WM_PAINT message
You'll get better performance by NOT drawing in response to WM_PAINT, which is low priority
message.
|
|
|
|
|
I have CFormView with 3-Views. Where is the optimal place to
save data on each screen? If I save data as I go between screens,
it does save the data. However, if I hit File/Save as, the data
on the current view is not saved (because I didnt go to the next
view).
There has to be some function out there that will save data for
a screen before I hit File/Save on the menu.
If Im not making sense, please let me know.
Any response any one can give me will be greatly appreciated.
Sincerely,
Danielle Brina
|
|
|
|
|
You did not say anything about the document, but I assume you meant to. I assume you are updating the document when the forms are switched. I also assume that there is one document for all three views.
I think one solution is to update the document every place that the view is updated. You are not doing that but if it is possible to modify your program to do that then it is a more flexible solution.
Otherwise the solution is probably a little complicated. I think that what I have done is that I have used CDocument::UpdateAllViews with a hint that indicates that the view needs to update the document. The complication is that you only want the active view to update the document, correct? If the various views respond to the hint by updating the document only if they are the active view, then I think that will solve the problem.
|
|
|
|