|
can you please make me understand about multithreading.
|
|
|
|
|
|
|
I am using .NET framework 1.1 (Visual studio 2003.NET) and I have written some codes in VC and VC++. I want to add some XML tags to make documentation out of it. But it only supports XML tags for C#. As far as know Visual Studio 2005 (.NET framework 2) supports XML tags for VC, but I can not switch to it. I want to know if there are some tools that help me to make some documents with .chm extension out of the XML tags I have written or not?(in C#.NET I have written these tags and then I made the XML file out of them and by using NDOC, I have created files in .chm extension. Is there any way to make such documentation out of VC and VC++.NET?)
Thanks in advance
|
|
|
|
|
You can use CppDoc to generate your docs. I don't remember if it had support for chm but i'm sure you can convert it from html
Always do your best
|
|
|
|
|
Hi,
The ::SHGetSpecialFolderPath() function is available as part of Internet Explorer 4.0. I would like to emulate this function, on systems with an earlier version of Internet Explorer. Typically, I need my software to run on plain vanilla Windows NT 4.0.
I would like to know if it's possible to emulate this function using ::SHGetSpecialFolderLocation() which is available on my target platform?
The problem is :
::SHGetSpecialFolderLocation(CSIDL_APPDATA) returns an ITEMIDLIST that contains something like "Document and Settings" on my XP box, instead of something more like I would expect, something like "C:\Document and Settings\UserName\Application Data".
Should I revert to using an environment variable? Is there a better solution?
Thanks for your help.
--
Maxime Labelle
maxime.labelle@freesurf.fr
|
|
|
|
|
Use SHGetSpecialFolderPath () instead of SHGetSpecialFolderLocation(). The former retrieves the path as characters where as, the latter retrieves the path as PIDL.
Jubin Chawda
braindrain1@rediffmail.com
-----------------------------
Come online at:-
fitiyal@yahoo.com
|
|
|
|
|
|
Do you have the following registry key?
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
If so, wouldn't a wrapper around SHGetS... that always returned a proper path, regardless of IE4 being present or not (w/o IE4, using the above mentioned registry key)?
|
|
|
|
|
I've got the specified registry key, but it does not contain an entry for the corresponding CSIDL_APPDATA...
Is there another way?
Thanks
--
Maxime Labelle
maxime.labelle@freesurf.fr
|
|
|
|
|
I uses SHBrowseForFolder on workstations so I need to call SHGetPathFromIDList (way down in the code...). Is that one available to you?
namespace {
int CALLBACK BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM , LPARAM lpData) {
if(uMsg == BFFM_INITIALIZED) {
if(lpData) {
SendMessage(hwnd, BFFM_SETSELECTION, 1, lpData);
}
}
return 0;
}
}
extern "C" int PickDir(const HWND hwnd, const char* pszSource, char* pszNew){
TCHAR display_name[_MAX_PATH] = _T("");
if(pszSource) strcpy(display_name, pszSource);
HLOCAL hl(0);
BROWSEINFO bi;
memset(&bi, 0x00, sizeof(bi));
bi.hwndOwner = hwnd;
bi.pszDisplayName = display_name;
bi.lpszTitle = _T("Välj bibliotek");
bi.ulFlags = BIF_BROWSEINCLUDEFILES + BIF_EDITBOX + BIF_RETURNONLYFSDIRS + BIF_NEWDIALOGSTYLE + BIF_UAHINT;
if(pszSource && *pszSource) {
bi.lpfn = BrowseCallbackProc;
bi.lParam = (LPARAM)(hl = LocalAlloc(LPTR, strlen(pszSource) + 1));
CopyMemory(hl, pszSource, strlen(pszSource) + 1);
}
LPITEMIDLIST pidl(SHBrowseForFolder(&bi));
if(hl) {
LocalFree(hl);
}
if(pidl) {
if(SHGetPathFromIDList(pidl, display_name)) {
strcpy(pszNew, display_name);
return TRUE;
}
}
return FALSE;
}
-- modified at 4:26 Wednesday 12th July, 2006
|
|
|
|
|
Yes, it seems that this function is available...
Besides, it returns the correct result.
Now, the question is, why did my code do wrong, because I could not get the correct result. For instance, your suggestion shown below works like a charm:
hResult = ::SHGetPathFromIDListW(pIDL, lpszPath);
if (FAILED(hResult))
break;
Whereas, the code I was using does not :
IShellFolder* pIShellFolder = 0;
hResult = ::SHGetDesktopFolder(&pIShellFolder);
if (FAILED(hResult))
break;
STRRET strInfo;
strInfo.uType = STRRET_OFFSET;
hResult = pIShellFolder->GetDisplayNameOf(pIDL, SHGDN_NORMAL, &strInfo);
if (FAILED(hResult)) {
pIShellFolder->Release();
break;
}
hResult = ::StrRetToBuf(&strInfo, pIDL, lpszPath, MAX_PATH);
if (FAILED(hResult))
break;
Has anybody any hints ?
Cheers.
Maxime.
--
Maxime Labelle
maxime.labelle@freesurf.fr
|
|
|
|
|
Dear Sir,
Up to now i have not realised to preview all i print(using non Doc/view system). Now I resume to learn again this .
After reading KOAY KAY HOE article and examples, i thing that what is previewing is only controls or dialog.
But what to do if I click on the button and need to preview this text " HELLO THE WORLD" for example.
I learn my self
|
|
|
|
|
Hi,
In my vc++ application I am using Access as the database(connected using DAO). The database and tables are created during runtime.
I name the table depending upon the name the user enters. Now the problem is that if he enters a name with spaces, an errors occurs because of the SELECT sql
Say the name is : tara m
SELECT * FROM tara m
causes an error 'Syntax error in FROM clause'
But the table gets created with the correct name.
I tried putting the table name bet ' ', but it says "wrong formating in querry"
Would you be knowing the right way of doing this. Or I must ask the user to type the name without spaces?
Thanks.
Fortitudine Vincimus!
|
|
|
|
|
I'm no SQL expert, but I think you can enclose the table name with square brackets.
SELECT * FROM [tara m]
(Still not sure why you're creating a table for each name though...)
You might post this question in the SQL forum.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
Thank you. I shall check out the square brackets.
Steve Echols wrote: (Still not sure why you're creating a table for each name though...)
Well, the program is such that certain set of 'budget' data should be in one table. And when the user creates another 'budget' a new table with the new budget name has to be created. So if the user wants to delete the old 'budget' all I have to do is delete the table with that name. Makes life easy for me!
Fortitudine Vincimus!
|
|
|
|
|
It worked! Thanks a billion!!
Fortitudine Vincimus!
|
|
|
|
|
even though using brackets solve your problem, having spaces in a sql element is bad design matter. you should avoid doing so (bu replacing spaces with underscores for example).
moreover, the fact the brackets work is because you use MS SQL Server. a Oracle database wont allow you to do such a thing.
ps, this is a SQL question, which has no relation at all with C/C++. next time, ,ask the right forum !!
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
|
It is a Window Style that is supported by "some" Windows Controls.
When set the control sends owner draw messages that can be used to customize the UI of the control to a degree while still leveraging the other behavior and messages of the control.
The owner draw behavior is different for the controls, like Button is different from ListView.
"Just about every question you've asked over the last 3-4 days has been "urgent". Perhaps a little planning would be helpful?" Colin Angus Mackay in the C# forum
led mike
|
|
|
|
|
Owner draw feature allows the customizing the existing controls or lets drawing the control from the scratch.
Currently, the following controls support OwnerDraw functionality:
Buttons
ComboBoxes
ListBoxes
ListView controls
Menus
Static controls
Tab controls
Whenever the item must be drawn Windows sends the WM_DRAWITEM message to the window procedure of the item’s owner window. This message contains a pointer to
a DRAWITEMSTRUCT structure.The application can customize the controls by handling this message.
Thanks
|
|
|
|
|
|
I'm trying a double indirect look-up table for some function pointer in my app (yep, I have good reason).
I'm trying to use std::map for the table but (because of the double indirection) I need to use a "std::map*"
Which I don't know how to map[index] (with a pointer)
Now perhaps I'm misusing it, I'm not sure (I know nothing of STL and I have some problem understanding its header)
Anyway here is my code (problem explained in red), if you could give me some tips.....
static std::map<const char*, SEL> map_sels;
static std::map<OClass, std::map<SEL, IMP>*> map_imps;
void id::GetImpAlways(const char* name, SEL& sel, IMP& imp)
{
if( !_handle )
throw gcnew ObjectDisposedException(Class()->Name);
if(map_sels.find(name) == map_sels.end())
{
sel = sel_register_name(name);
map_sels[name] = sel;
}
else
{
sel = map_sels[name];
}
std::map<SEL, IMP> * class_imps; <font color="red">
if(map_imps.find(_handle->class_pointer) == map_imps.end())
{
class_imps = new std::map<SEL, IMP>();
map_imps[_handle->class_pointer] = class_imps;
}
else
{
class_imps = map_imps[_handle->class_pointer];
}
if(class_imps->find(sel) == class_imps->end())
{
imp = get_imp(_handle->class_pointer, sel);
if( !imp )
throw gcnew ObjectiveCException("No such method");
class_imps[sel] = imp; <font color="red">
}
else
{
imp = class_imps[sel]; <font color="red">
}
}
<pre>
|
|
|
|
|
Have you tried dereferencing the pointer like:
*class_imps[sel] = imp;<br />
<br />
and <br />
<br />
imp = *class_imps[sel];
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
I am afraid it will create a copy or affect a copy.
I need to alter the static global variable!!
I hate this stupid C++ copy policy, I need to affect the real shared object!!
|
|
|
|