|
manu_2205 wrote: int result=CreateDirectory(LPCSTR(Dir_Name),NULL);
1. Why do you need that LPCSTR there?
2. Is your project unicode aware?
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
ya project unicode aware , if i do't write LPCSTR it generate compile time error.
"error C2664: 'CreateDirectoryA' : cannot convert parameter 1 from 'WCHAR *' to 'LPCSTR'"
manu
|
|
|
|
|
manu_2205 wrote: "error C2664: 'CreateDirectoryA' : cannot convert parameter 1 from 'WCHAR *' to 'LPCSTR'"
dont use LPCSTR, but CA2W()
|
|
|
|
|
manu_2205 wrote: 'CreateDirectoryA
If your project is unicode aware, then how is the ANSI version of a function being called? Are you making a call explicitly to the CreateDirectoryA() or are you just calling CreateDirectory() ?
manu_2205 wrote: ya project unicode aware
Now what do you mean by this? Have you replaced _MBCS with _UNICODE in the preprocessor definitions? ( project->settings->c/c++->preprocessor definitions )
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
LPCSTR(Dir_Name) is a bug. You have to convert the WCHAR to LPCSTR in another string.
Maybe you can use CreateDirectoryW( Dir_Name,NULL);//with a big W for WCHAR
Greetings from Germany
|
|
|
|
|
I have built a proxy server for accessing and modifying yahoo messages. All other yahoo packets are just forwarded.My problem is that Sometimes I dont get the buddy list, and it just hangs up, though I am reading the full packet. And also , when the proxy server is suddenly stopped, when a user is online, yahoo messenger crashes showing a error in fw32.dll, which is a dll from a third party used by yahoo messenger.
Anybody please Help???
|
|
|
|
|
spsharma wrote: when a user is online, yahoo messenger crashes showing a error in fw32.dll, which is a dll from a third party used by yahoo messenger.
are you using LSP or you hooking the WinSock .dll
"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
|
|
|
|
|
Hi Everyone
I am using CRecordSet to read data from a SQL database. For an image column, it retrieves the data correctly the first time I try. When the image data is changed in the database, the next query pulls back a string of zeroes instead of the actual data in the database.
I am using a CLongBinary member in my derived class to represent the image data, and RFX_LongBinary() to exchange the data.
I have even tried deleting and recreating the CRecordSet object, and I STILL get the same behaviour!
Anyone seen this / got any ideas how I can debug it?
cheers,
Neil
|
|
|
|
|
This is just a wild guess, but could the changed record/column be getting cached? In other words, if you are making the change in SQL and then immediately running your program to grab the updated column, could it be that SQL has cached your change(s)?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Thanks for your input.
Possibly could be caused by something like that.
I have run an isql statement and independently verified that the correct data is returned. So it would have to be caching within that database session. I'll try coding in dropping and recreating the connection, but it's obviously a terrible idea performance-wise.
Also, why would it return all zeroes? I would have thought you would just get the old copy of the image returned if caching was going on..
I don't have many ideas how I can effectively debug this.
cheers,
Neil
|
|
|
|
|
Further testing has revealed that the image data column is always corrupted (set to all zeroes) for the first row returned when Open() or Requery() is run against the CRecordset-derived class.. not sure what is different about this first row..
cheers,
Neil
|
|
|
|
|
I have a list view control in a report view. I can select multiple rows by pressing control+left mouse button or by pressing left mouse button on first item and move mouse up/down to select other rows (if not selecting the first item on its label). How to change this default behaviour? I mean I want to:
1) Select multiple items just by clicking on them (without control key), and
2) Select multiple items by clicking on first item (even on label, on subitem's text) and moving mouse up/down.
Wow to do this?
Thanks in advance.
|
|
|
|
|
I have a couple of questions. I would appreciate if someone would help me cause im in big trouble.
Im writting application using directx7 in normal (windowed) mode. Also im using WTL library to handle windows specific tasks
In the first place I choose directx because i wasnt satisfied with flickering using normal gdi (dc and stuff) under windows.
Now i implemented the stuff using directx and graphics in my program isnt any faster than it was.
How can it be? (I am maybe missing some stuff there)
Do you need to use classic invalidation of rectangle to repaint stuff with directX or you should never use it? if not what to use to repaint some rectangle?
I can provide code if needed
Thanks in advance
|
|
|
|
|
It sounds like an implementation issue, not a speed issue.
Flicker is from unnecessarily drawing background where it's going to be covered with foreground,
if that makes sense.
The "classic invalidation of rectangle to repaint stuff" isn't going to work. Leave that for
one-shot redraws like when the user moves a window across your window (ie WM_PAINT messages).
You can draw with GDI anytime you want (if drawing from different threads then make sure to sync
access to GDI). Waiting for WM_PAINT messages will result in bad performance.
Only draw backgrounds when you need to, and if possible only draw the portion(s) that will be
visible.
Just my 2 cents
Mark
|
|
|
|
|
I have a spin ctrl attached to edit ctrl. When the data in the edit updates, I need to perform a custom activity. Now for this I have attached a msg handler as:
ON_EN_CHANGE(<edit_id>, <func>)
Sadly, this is getting called even before OnInitDialog is getting called which is causing a crash. How do I know within this func if the dialog is initialized?
Secondly, is there any other msg to which I can attach the mentioned msg handler to perform my custom action?
Eagerly awaitng your sugggestion, pls help...
-- modified at 5:04 Wednesday 17th January, 2007
|
|
|
|
|
please click on this[^], and press the EDIT link at the bottom of your message. then, add a relevant title
Thank you
|
|
|
|
|
toxcct wrote: Re: OT : Edit your article and add a title !
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
yes yes, not article, but message.
actually, the OP posted a message without title (so unclickable/unreadable),but now, he edited it.
|
|
|
|
|
Okay. I was so confused as a kid in a topless bar.
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
brahmma wrote: a kid in a topless bar
rotfl, THAT is a comparison !
|
|
|
|
|
cud some1 pls suggest a solution 4 d mentioned problem?
|
|
|
|
|
|
cpp_prgmer wrote: Sadly, this is getting called even before cis getting called which is causing a crash.
Handle this with a simple bool member variable. Call it bInitializing and assign it true in the dialog's constructor. At the end of the OnInitDialog() method, assign it to false . In the EN_CHANGE handler, check to see if bInitializing is equal to false before continuing. Make sense?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
True and this is how I tried to solve the problem for the time being but I guess there is a more elegant way to check if a dialog has been initialized or not. Does someone have any idea?
Secondly, are there any other msg handlers?
|
|
|
|
|
Do not set the AutoBuddy property to true for the spin control.
In the BOOL CYourClass::OnInitDialog()
use the SetBuddy property for the spin control to set the appropriate buddy.
Hope this helps
|
|
|
|