|
TRACE formats the text and then invokes a Debugger API. If no debugger is present, then nothing happens. The only question is how much time is wasted doing this.
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
I'm using on VC6 the SetWindowPos function to set to wndTopMost style for a dialog, but not get the focus. In Win2k it works well, but on Win9x the dialog get the focus.
Anyone know how solve this problem ?
Thanks,
Cristiano ...
|
|
|
|
|
i had a similar problem. i am not sure way it did not work but seem bto be the way the dialog was created. my work around was to shift the x,y pos 1 pixel. this allowed the setwindowpos to work and setfocus.
|
|
|
|
|
Explaining better: I'm using SetWindowPos setting the position too. And is not wished that the dialog get the focus, I want set to TOPMOST style.
[]'s
Cristiano
|
|
|
|
|
if i understand correctly you wish to bring a child dialog to the top without setting focus to the child.
to do this you could use the SWP_NOACTIVATE flag. or you could use a comination of different flags to get the exact settings you require.
SWP_ASYNCWINDOWPOS
SWP_DEFERERASE
SWP_DRAWFRAME
SWP_FRAMECHANGED
SWP_HIDEWINDOW
SWP_NOACTIVATE
SWP_NOMOVE
SWP_NOOWNERZORDER
SWP_NOREDRAW
SWP_NOREPOSITION
SWP_NOSENDCHANGING
SWP_NOSIZE
SWP_NOZORDER
SWP_SHOWWINDOW
|
|
|
|
|
The have tried this ... but no sucess. The problem persist.
Any others solutions ?
[]'s
|
|
|
|
|
not really, but is the dialog modeless. if it is modal you would only have access to the new top level dialog.
sorry thats all i have.
|
|
|
|
|
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
|
|
|
|