|
|
nss wrote:
Then I deleted the old OK button and ran it. Hit enter! Viola - the dlg vanishes!
Hitting Enter actually does one of two things:
1. If a push button has the focus, clicks that button.
2. If some other kind of control has the focus, clicks the default push button in the dialog.
It sounds like you saw one of those cases. Hitting Enter clicked your new button, and the handler called OnOK(), thus closing the dialog.
--Mike--
Just released - RightClick-Encrypt v1.3 - Adds fast & easy file encryption to Explorer
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
I've mailed you a sample.
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Thanks - yours works great (though its got nothing in the DEbug folder even though I built it! Thats something I've not seen before). ANyways - I sent you mine. It doesnt work! I even put in the return in my OnOK() that i didnt have. What do you think is the problem with my attempts?
aaaaargh!
|
|
|
|
|
nss wrote:
though its got nothing in the DEbug folder even though I built it! Thats something I've not seen before
WAH! MOMMMMMMMY!
There's something very wrong with your system! I suggest a reboot. Really. Are you pulling another all-nighter?
nss wrote:
What do you think is the problem with my attempts?
Did you get my email (not thru CP)?
Whatever happened to Avis? Has he disappeared off the face of the earth? A web search has yielded NULL.
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
I will reboot. But I have stuff in my Debug Folders....
Avis: faint glimmerings of memory. What is Bhaya doing do you know? (That was his name right?). gosh - ghosts from the past.
Actually going to sleep tonight. Didnt do too much but planned next design stages today. Did you get some food into you? I soon shall. Nothing exciting though. Hey thanks for the zillions of emails and sample and all the help. No one could have predicted it was my tab order that was the culprit! All this time i've been doing pretranslate with bated breath...
Adios! I'll treboot now and go scout out the kitchen...
|
|
|
|
|
nss wrote:
What is Bhaya doing
I haven't a clue - I lost touch with him when I left.
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
I have created a class now and want to test it. But the compiler says:
fatal error C1010: unexpected end of file while looking for precompiled header directive
In the .cpp file for my class I have in the beginning of the file
#include "MyHeaderFile.h"
and what can be wrong!?
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
Typically in MFC Apps you have a "stdafx.h" header file which is used as the precompiled header. Then in Project|Settings |C/C++ |Precompiled Headers you set "Use precompiled header file (.pch)" - "Through header: stdafx"
If you aren't using precompiled headers then set "Not using precompiled headers" instead.
See the VC++ Help for info on precompiled headers.
Neville Franks, Author of ED for Windows. www.getsoft.com
|
|
|
|
|
I will try that out!
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
|
How exactly did you create a class? A safe way of doing that is to create a simple AppWizard project and use Class Wizard to create a generic class. Thus Class Wizard will generate the headers so that you'll only need to add your code.
|
|
|
|
|
Well I opened Notepad and wrote it by my own!
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
VC++ adds some headers all by itself so you may have forgotten to include some file (this has already been said before). So just open VC++ and add a class with Class Wizard.
|
|
|
|
|
By mistake somehow my project has two classes in it by the same name. its very confusing. How can I delete both and start over? This is a class associated with a CDialog form and it was created via the classwizard.
Thanks,
ns
|
|
|
|
|
delete the files from the workspace, then delete the actual files.
then delete the .CLW file.
-c
Conservative:
One who admires radicals centuries after they're dead.
-- Leo C. Rosten
|
|
|
|
|
I'll do that.
|
|
|
|
|
|
I've noticed several times that the 'Auto Complete' function in my VC++ Editor doesn't work in certain parts of the code. Despite numerous attempts I haven't noticed any logic its behaviour: sometimes it works, sometimes not. Has anyone ever had such a problem or is it a bug of my version?
|
|
|
|
|
it's a bug in VC6. you might want to check out Visual Assist (http://www.wholetomato.com)
-c
Conservative:
One who admires radicals centuries after they're dead.
-- Leo C. Rosten
|
|
|
|
|
VC6 IntelliSense is very picky. If you have any syntax errors, it will prevent IS from working at any point below the error.
If you have no errors, close the workspace and delete the .NCB file. That often fixes things.
--Mike--
Just released - RightClick-Encrypt v1.3 - Adds fast & easy file encryption to Explorer
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Thanks, Mike, it really fixed things!
|
|
|
|
|
How to get the length of a track on a CD using MCI and the mciSendCommand function!?
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
MCI_STATUS_PARMS mciStatusParms;
mciStatusParms.dwCallback = (DWORD) m_hMainWnd;
mciStatusParms.dwItem = dwItem;
mciStatusParms.dwTrack = dwTrack;
mciStatusParms.dwReturn = 0;
SendCommand(MCI_STATUS,
MCI_STATUS_ITEM|MCI_TRACK, (DWORD) &mciStatusParms);
mciStatusParms.dwReturn; // length of track
|
|
|
|
|
I am reading binary data into a streamptr like so:
_StreamPtr strmBlob (__uuidof(Stream) );
_bstr_t bstrEmpty(L"");
_bstr_t bstrFile(L"");
CFileDialog pDialog(TRUE,"*.bmp", "*.bmp", OFN_HIDEREADONLY ,"Image Files(*.bmp)");
if(pDialog.DoModal() == IDOK)
{
CFile file((LPCTSTR)pDialog.GetFileName(),CFile::modeRead);
bstrFile = file.GetFilePath();
}
_variant_t vtEmpty (DISP_E_PARAMNOTFOUND, VT_ERROR);
strmBlob->Type = adTypeBinary;
strmBlob->Open(vtEmpty,adModeUnknown,adOpenStreamUnspecified,bstrEmpty,bstrEmpty);
strmBlob->LoadFromFile(bstrFile);
SomeType tempBlob = <code>strmBlob->Read(adReadAll)</code> ;
I dont know what the SomeType is. I am doing this because I want to pass in tempBlob into an AddNewRecord function where essentially the following happens in response to
AddNewRecord(tempBlob);
AddNewRecord(SomeType tempBlob)
{
m_prsBlob->AddNew();
m_prsBlob->Fields->Item["A_Image"]->Value = tempBlob;
}
m_prsBlob of course is a recordset.
Thanks for helping. I'm suspecting Sometype is _variant_t but dont know for certain.
ns
|
|
|
|