|
I have two views in my application . One is Rich edit view and one is a simple edit view. They are both split by the splitter window in the mainframe class. But when I do some operations such as ctrl-x and ctrl-v in the edit view the appication crashes sighting some error in viewrich.cpp but the copying and cutting of the text works fine if I do it through the right click of the Mouse. Can anyone suggest some solution for it.
Samir Sood
|
|
|
|
|
i get this error if a user deletes a record and that record has a duplicate data in the file.
all records are unique though. i do have a time stamp and a userid field that will always create unique records. so the complete record is not duplicated.
the table that i am using is a VFP table with no index attached.
in my application i have no order set.
is there a way to trap this error, ignore and continue.
thank you.
|
|
|
|
|
Catch a CDBExeption object. If you don't know what I mean, lookup try in MSDN.
Good luck,
Bill
|
|
|
|
|
i have created a try/catch/throw handler. it allows me to trap the error with my own message and exit my loop. but what i need is a way to prevent the error from happening at all. is this possible?
actually i did not mention that i am using a crecordset that is setup as snapshot. this is the only way i could get a VFP database to work.
|
|
|
|
|
What is the actual error condition. Your original post didn't mention it. Are you trying to trap an error or avoid it? The difference definitely effects the answer.
Is the problem that the database is actually deleting multiple rows? If so, you can fix the problem(it is not really an error, just a coding mistake) by using more specific criteria in your SQL statements.
Good luck,
Bill
|
|
|
|
|
i have a list box that allows the user to mark items to be deleted.
on exit of the application i check the listbox and delete the records.
i have double checked and none of my records are duplicated. but i do have some logs that have duplicate core data(all but 3 fields the same). the error occurs on the delete function. i have tried a try/catch around the delete function and it will trap the error and exit me out of my loop, but that is not what i need. again i do not have a sort set on the records, my list box takes care of and sorting.
thank you
do{
retval = pCtrl->GetItemState(ckrec,LVIS_STATEIMAGEMASK);
if(retval == LVIS_SELECTED && !m_pSet->IsEOF()){
UpdateData(true);
m_pSet->SetAbsolutePosition(ckrec+1);
DeleteFile(Buffer);
m_pSet->Delete();
}
ckrec++;
}while(ckrec <= pCtrl->GetItemCount());
|
|
|
|
|
Hi,
In a dialog-based application, I want to read the CD-Rom data based on its sector numner. For each selected sector number
I want to show the corresponding data in a Cedit control.
But how to read the selected sector data (1024byte)?
Thanks in advance!
chen
chen
|
|
|
|
|
chen wrote:
But how to read the selected sector data (1024byte)?
You don't. CD sectors are 2048 bytes. Also this is not only Win32 specific, it's OS specific. Are you using an NT or a Win9x OS?
|
|
|
|
|
Thanks for your reply!
Yes, i used windows2000 for my programming. I really got a write
error. I want read one sector cdrom data. In fact, it is 2352 Byte.
Would you please tell me which win32 API functions can be used
for open, close, read and write the cd-rom datas at each sector?
Best Regards,
chen
|
|
|
|
|
I really got a write error.
I'd imagine you got it if you tried to write to a CD-ROM.
I want read one sector cdrom data. In fact, it is 2352 Byte.
Ahhh, you want to read RAW sector data. The Win32 API you are to use is SPTI (SCSI Pass Thhrough Interface).
You might want to have a look at CDRecord (it's GPL) and its use of akrip (I believe the latter is hosted at sf.net, but I'm not sure). Basically you'll have to go low-level, using SCSI commands passed over the SPTI interface (don't worry, ATAPI at this level is really SCSI over ATA interface so it works for both SCSI and ATA CD-ROM's).
|
|
|
|
|
hi
is someone having the code of disabling the start button on the taskbar. plz do share that.
|
|
|
|
|
Use FindWindow and find the window with classname Shell_TrayWnd. Find it's first child. This will be the start button. Call ShowWindow with SW_HIDE.
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
If you get this to work, PLEASE DO NOT ever distribute it to me. I would absoulutely HATE (never use again) a piece of software that did that to my system.
Good luck,
Bill
|
|
|
|
|
Where should i load the VBScript object from?
rechi
|
|
|
|
|
What are you trying to achieve, do you want to run VB Scripts from your application? You need to do a search for Windows Scripting Host.
Michael
|
|
|
|
|
Hi,
Does anybode know how to force WInInet to send HTTP/1.0 request ? I tried to use HttpOpenRequest(m_connection,"POST",object,TEXT("HTTP/1.0"),NULL,....)
call to make HTTP/1.0 request. But when i look into request, IE 5.0 (i didn't tes another version) is sending HTTP/1.1. I also tried to use InternetSetOption / INTERNET_OPTION_HTTP_VERSION to set HTTP version to 1.0, but it has no effect.
The second (bug?) is that when i send HTTP/1.1 request to the server, while reading response with InternetReadFile(), This function sometimes hangs during receiving last packet of chunked response. Wininet callback functions is sending infinite number of events INTERNET_STATUS_RECEIVING_RESPONSE followed by INTERNET_STATUS_RESPONSE_RECEIVED with data length 0 bytes. InternetReadFile() does not stop even if i try to InternetClose() request, connnection and session handle from another thread. This bug is the reason why I need to send HTTP/1.0 request, to avoid this bug.
Can somebody who has experience with this help me, please ?
|
|
|
|
|
Is there any way to get MFC print preview functionality in an SDK application ?. If not How to implement print preview functionality in SDK application
|
|
|
|
|
Is there any way to get MFC print preview functionality in an SDK application ?. If not How to implement print preview functionality in SDK application
|
|
|
|
|
Ive seen that some programs can start when users click a hyperlink in the web browsers.
such as gametiger and teamspeak.
'Added URL recognition for websites for launching
'TeamSound (TS:\\10.4.5.100:Offense).
How could this be done in c++??
|
|
|
|
|
any ideas.
need help plz.
|
|
|
|
|
Hi,
I have a MFC based dynamically linked dll.In dllmain()'s DLL_PROCESS_ATTACH part i have written
if (!AfxWinInit(GetModuleHandle(NULL), NULL,
::GetCommandLine(), 0))
{
printf("Couldn't initialize MFC!\n");
return 0;
}
After this i have AfxMessageBox("my msg");
But messagebox() is never been displayed.
I had build the project i release mode.The OS i work on WINDOWS ME.
Regards
Neha
|
|
|
|
|
MFC DLLs provide their own entry point, so you're not supposed to write one yourself. If you plan to write a DLL with MFC support, I'd suggest you start with a fresh MFC DLL created by the app wizard and then move your code there.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I have a dialog base application,I want to change the caption of my dialog somewhere in my program,How can I do it?
Thanks
Mazy
"The more I search, the more my need
For you,
The more I bless, the more I bleed
For you."The Outlaw Torn-Metallica
|
|
|
|
|
With SetWindowText . You should use this method only when the window has been created (i.e. if you do it right after creating the CDialog object, it will fail.)
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Joaquín M López Muñoz wrote:
With SetWindowText. You should use this method only when the window has been created (i.e. if you do it right after creating the CDialog object, it will fai.)
Thats exactly my problem.I do it on OnInitDialog() and it failed.I wanna to write the username that login in computer in the caption place,So I think I have to do it in OnInitDialog() .
Now how can I do it?
Mazy
"The more I search, the more my need
For you,
The more I bless, the more I bleed
For you."The Outlaw Torn-Metallica
|
|
|
|