|
Thanks, worked great, will try to figure out what gets consted...
|
|
|
|
|
|
The two const s are duplicate. Both refer to the CARPIC value. Neither refers to the pointer.
You might also want to check out my comment to CPallinis response in this thread.
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)
|
|
|
|
|
These second const s don't appear to make sense: both refer to the CARPIC value, neither refers to the pointer holding the address. That's also what my compiler states (in a warning).
To give some examples:
const int *a; int const *a; const int const *a; int *const a; const int * const a;
See also http://cdecl.ridiculousfish.com/?q=const+int+*+const+*+a%3B[^]
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)
|
|
|
|
|
|
How do I recover what's left of a file that has been deleted but not completely over written?
Let's say the deleted file is 10mb
5 of those have been overwritten
I want to restore the remaining 5.
Thanks!
|
|
|
|
|
Use Google to find a free application to do it. It is a complex process and requires a detailed understanding of the filesystem where the file was created.
|
|
|
|
|
|
Hi all. I have a doubt: how ulSize data buffer size should be:
CString sValue;
ULONG ulSize = _MAX_PATH;
lRet = RegQueryValueEx(hKey, NULL, NULL, NULL, (BYTE*)sValue.GetBuffer(_MAX_PATH), &ulSize);
sValue.ReleaseBuffer();
or
CString sValue;
ULONG ulSize = _MAX_PATH * sizeof(TCHAR);
lRet = RegQueryValueEx(hKey, NULL, NULL, NULL, (BYTE*)sValue.GetBuffer(_MAX_PATH), &ulSize);
sValue.ReleaseBuffer();
I guess that ulSize should be _MAX_PATH * sizeof(TCHAR); like in the second code ... but I am not sure ... can you tell me how is right ?
Thank you.
modified 8-Apr-15 5:37am.
|
|
|
|
|
From MSDN RegQueryValueEx function[^]:
Quote: lpcbData [in, out, optional]
A pointer to a variable that specifies the size of the buffer pointed to by the lpData parameter, in bytes. So it must be the second version.
|
|
|
|
|
|
|
hey.....i have searched alot about c graphics and till now don't get any helpful information.
so i want to know some sites which can provide data about c graphics...basically i want to learn this....so do me a favor
|
|
|
|
|
Do yourself a favour and study the documentation[^]. Google will find you some alternatives.
|
|
|
|
|
The C programming language doesn't provide, by itself, functions for graphics. You have to use, in your application, the graphics API your system provides.
|
|
|
|
|
As pointed out, C and C++ do not (yet) have built-in graphics capabilities. There are plenty of libraries for that purpose however, and plenty of articles offering advice on how to use them. What library to use strongly depends on the purpose you have in mind. I therfore suggest you feed the search engines of your choice with the keywords, "C", "Graphics programming" and maybe a keyword or two describing the application you have in mind.
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)
|
|
|
|
|
Because it is difficult and wastes time for modifying the controls position in xml file directly.
Is anyone know how to design a good one as visual studio that cat drag and drop controls?
|
|
|
|
|
yu-jian wrote: Is anyone know how to design a good one as visual studio that cat drag and drop controls? Yes, I'm sure someone out there has the ability.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
|
Hi all,
First of all, I would like to apologize for posting this question in the C++ forum as it deals with Classic VB (VBA) ... The reason I posted here is because I can't get an answer (not even a hint) in the VB/VBA foums ... I searched the web extensively but without any luck
I hope you guys can ,at least, point me in the right direction
Problem:
I am trying to control the Undo/Redo Stack in excel but I can't seem to get a pointer to the UndoManager Interface in the ppv out argument when calling the QueryService Method .. it always returns Nothing ..
I hope someone can tell me what I am doing wrong .. I think the "SID_SApplicationObject" is not the right SID for what I am trying to achieve
Note : I am using the olelib.tlb
Code :
Sub Test()
Dim pUnk As olelib.IUnknown
Dim IServiceProvider As olelib.IServiceProvider
Dim IID_IServiceProvider As olelib.UUID
Dim IID_IOleUndoManager As olelib.UUID
Dim SID_SApplicationObject As olelib.UUID
Dim ppv As IUnknown
CLSIDFromString IIDSTR_IServiceProvider, IID_IServiceProvider
CLSIDFromString "{0C539790-12E4-11CF-B661-00AA004CD6D8}", SID_SApplicationObject
Set pUnk = Excel.Application
pUnk.QueryInterface IID_IServiceProvider, IServiceProvider
IServiceProvider.QueryService SID_SApplicationObject, IID_IOleUndoManager, ppv
End Sub
Any help will be much appreciated
Regards.
|
|
|
|
|
jaafar tribak wrote: First of all, I would like to apologize for posting this question in the C++ forum as it deals with Classic VB (VBA) ... The reason I posted here is because I can't get an answer (not even a hint) in the VB/VBA foums ... I searched the web extensively but without any luck I do not see where you've asked this question in the VB forum.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Hi,
I did ask similar questions in the VB and COM forums before and in other websites as well .. but these rather difficult questions often remain ignored or without a propper solution .. I thought VC programmers were more confortable with these type of in depth subjects.
The very few vb lines in the above code snippet should be easy to understand by non vb programmers .. I hope that anyone fmiliar with ole/com would hopefully be able to give me (at least) a rough hint
Regards.
|
|
|
|
|
I am starting my application by a Service. Now When I want to save a
file, I tried using CFileDialog. but when ever I select "desktop" it
prompts a message as "C:Windows\system32\config\systemprofile\desktop"
refers to location that iss unavailable. It could be hard drive on this
computer, or on a network... "
I checked that "C:Windows\system32\config\systemprofile" is available
but there is not desktop directory inside it.
|
|
|
|
|
|
Sorry I didnt knw abt this
|
|
|
|