|
I suggest to consult the book Inside Visual C++ by Kruglinsky. In this book the basics of ODBC an DAO acces is dealt with.
|
|
|
|
|
I want to save a file to the desktop using CFile? Does anybody know how to do this? Any help is
appreciated. I have already tried using these three filenames "C:\windows\desktop\test.txt"
"C:\\windows\\desktop\\test.txt" "C:/windows/desktop/test.txt"
Thanks
|
|
|
|
|
When you hard-code a path, you need to escape each backslash, so it would be "C:\\windows\\desktop".
As for the save not working, is your desktop directory really C:\windows\desktop ?
|
|
|
|
|
Hi,
There is an ATL COM control, when this control is inserted into any container or say VB form, or VC dialog...where in my code of the control, i will be notified that this is control is being inserted into the container?
Or
How can i come to know in my control's code that it is being placed in a container and its not instantiated by a constructor of its class?
Thanx in advance
Aruna
|
|
|
|
|
Greetings all.
I've been wondering if there's some way to get an application's call stack programatically at run-time.
What I have in mind is an error handler (particularly handy during develpment) that can find and list the call stack in the event of some major error happening.
I use __FILE__ and __LINE__ quite a bit in debug versions of my code, but thought that just 'fetching' the call stack at the point of reporting an error may be a more elegant ways of doing things.
Steve
|
|
|
|
|
There are plenty of articles on doing this in MSDN magazine.
Also if you search for 'under the hood' in msdev help
you will find articles by JOhn Robbins, Matt Pietrek etc
on doing this sort of thing.
Setting exception handlers that then show you the call stack.
Search for SuperASSERT written by John Robbins, which shows
you the stack.
MFC also provides a AfxDumpStack().
Win32 provides StackWalk(), there was a similar function in Win16.
|
|
|
|
|
Is is possible to set CListCtrl row height to zero? I want to hide some rows. I was wondering if this could be done without having to make my own owner-drawn control.
|
|
|
|
|
Im in the midle of making a CD player for windows and im doing it in the style of sonique (ie it does not look like a standard windows progam) I want the have a semi transparent display for part of it.
Now the problem:
For the display to be semi transparent I will need to draw what is under the transparent area.
Posible solution 1 -
I could set the transparent display as part of my aplications region. But this will then mean that it will not draw the windows underneath if a change ocurs.
Posible solution 2 -
If I draw the transparent region to the main desktops DC, it will have to be continusly refreshed just incase it is over draw. This will cause a flickering and and a lot of wasted CPU cycles.
Unless there is a way of dectecting when windows has redrawn in the area of question.
Or is there another way that I'm not thinking off.
PS I am not using MFC
Any help would be much apresiated
|
|
|
|
|
Check this out in the Fonts,GUI,GDI section of this site.
The RGN Generator
Creating non-rectangular dialog boxes
http://www.codeproject.com/gdi/rgncreator.asp
Hope this helps,
Louis.
|
|
|
|
|
I am fine with the non rectangular regions
its the fact that it is transparnet
|
|
|
|
|
Suggestion -: Cheat,
Build your main window as transparent ,
The place a Control or new irregular shape window on top of
the main window,
|
|
|
|
|
Hi
I have to create an ActiveX Dll using VC++ and I'm fairly new to this. I've a IDL file and a TLB file with me. I need to create a C++ dll using MFC with those interfaces.
How do I go about it? Please help me with this. If you can point out some sources of information for this that would be good too.
Thanks in advance
Mahendran
|
|
|
|
|
Looking for source code for a minimal FTP server (MFC based). Anybody can help?
|
|
|
|
|
The codeproject seems to have some network examples under "Internet/Network".
In particular ...
http://www.codeproject.com/internet/ftptransferdlg.asp
|
|
|
|
|
JGAA offers the source to the now defunct version 2.0 of his WarFTP Daemon.
His server is a bit advanced, but it will give you a good idea of how to multithread winsock connections and handle file transfers as a server.
You can download the server source here: (URL) may be wrapped.
http://war.jgaa.com/support/?cmd=DownloadVersion&ID=27
|
|
|
|
|
I am trying to handcraft an ADO recordset (that has no connection to a database using VC++). The code below is my latest attempt, but the Open fails. I'm sure this can be done, but I am missing a piece of the jigsaw. All the examples I can find are written in VB. Please can any one help ?
ADODB::_RecordsetPtr pRecordset;
pRecordset.CreateInstance(__uuidof(ADODB::Recordset));
// Use client side caching.
pRecordset->CursorLocation = ADODB::adUseClient;
ADODB::FieldAttributeEnum attrEnum = ADODB::adFldUpdatable;
// Add first field
_bstr_t bstrField1(TEXT("Field 1"));
pRecordset->Fields->Append(bstrField1, ADODB::adBSTR, 10,
attrEnum);
// Add second field
_bstr_t bstrField2(TEXT("Field 2"));
pRecordset->Fields->Append(bstrField2, ADODB::adBSTR, 10,
attrEnum);
_variant_t varSource;
_variant_t varActiveConn;
try
{
if (SUCCEEDED(pRecordset->Open(varSource, varActiveConn,
ADODB::adOpenStatic,
ADODB::adLockOptimistic,
ADODB::adCmdText | ADODB::adExecuteNoRecords)))
{
pRecordset->AddNew();
pRecordset->GetFields()->GetItem("Field 1")->
PutValue("1");
pRecordset->GetFields()->GetItem("Field 2")->
PutValue("1");
pRecordset->Update();
pRecordset->AddNew();
pRecordset->GetFields()->GetItem("Field 1")->
PutValue("2");
pRecordset->GetFields()->GetItem("Field 2")->
PutValue("2");
pRecordset->Update();
}
else
{
}
}
catch (_com_error e)
{
_ tprintf(_T("(ExecuteReturnRecordset) Error (0x%08x, 0x%08x): %s\n"), e.Error(), e.WCode(), e.ErrorMessage());
}
|
|
|
|
|
Hello,
I was wondering if somebody can give me some basic instructions on how to put a toolbar on an ATL composite control. Please note that I'm not using MFC in my project. A link to a sample would also be fine...
Any help is greatly appreceated.
Matthias
|
|
|
|
|
I'm using CreateProcess() to create a new process for running a batch file. However the batch file contains command line to run another batch file. I would like to hide all the DOS window since it's the backend processing.
I have successfully made the DOS window for the first batch file hidden since I use CreateProcess() and set the attribute wShowWindow of STARTUPINFO to SW_HIDE. However, the DOS window for the second batch file (which is called to run within the first batch file) is not hidden.
How can I make the DOS window for the second batch file hidden as well?
Thank you very much and best regards.
|
|
|
|
|
I'm not sure if you can.
I tried this a while back in a console app. Because the application wasnt started via CreateProcess, I couldnt hide the console window.
Maybe you could use a multiline edit control in a dialog to simulate the 1st batch file in your application and use that to call the second batch file using CreateProcess. From there you know how to hide the console window.
Perhaps someone else knows if this is possible. As far as I know its not.
Let me know if you figure this one out!
Cheers!
Frank
|
|
|
|
|
I want to make a program, with witch I can mount and dismount a drive. That means: I want to give driveletters to each partition. Have anybody a full example, how to do that?
- first, we have to open a new ntmssession
- then we must get the guid of the partition
- get guide of driveletter??
- mount the partition...
please help me!!!!
thx
|
|
|
|
|
How can I create a transparent CRichEditView, so that graphical Objects like lines, Bitmaps, etc. get visible? At present, the objects are drawn, but immediatelly overwritten by the text.
|
|
|
|
|
How can I create a transparent CRichEditView, so that graphical Objects like lines, Bitmaps, etc. get visible? At present, the objects are drawn, but immediatelly overwritten by the text.
|
|
|
|
|
Hi Developer.
I have two questions.
First...
I want to get scrollbar handle to the Webbrowser.
But i have not any method.
Anybody knows that?.
Second...
I develop webbrowser using CHtmlView.
I want to change cursor in my browser and change the mousemove event.
But It is not correct solution.
Because the cursor is flickering.
Thanks in advance.
dooly
|
|
|
|
|
Hi gurus,
i have one dialogbox. it contains three listboxes,
1. I want to change items of one listbox contents depend on the
selection of item in another List box.
2. for this purpose i need to handle OnSelChange() function.
3. How can add this OnSelChange() function to Dialog box class.
thanks in advance,
- Koteswara Rao
|
|
|
|
|
Good Day!
In Visual Studio, the ClassWizard provides a tab for message handlers that creates the necessary function declaration and skeleton of implementation.
HTH.
|
|
|
|