|
pds8475 wrote: there is very little documentation on Jxta-c
There is a complete API-Doc[^] (automagically made from the code by doxygen). It is properly linked at the Projects website.
I must admit that the documentation seems to be wrong for jxta_advertisement_get_string() . The brief description and the "Parameters" section seem to contradict.
Probably the Parameters-comment has not been updated - thebane of doxygen-like documentation.
char* jxta_advertisement_get_string ( Jxta_advertisement * ad,
Jxta_index * ji
)
Many fields of an advertisement struct can be represented as a character string, which may be obtained by this function.
Parameters:
Jxta_advertisement * ad
char * key for advertisement field desired
Returns:
char * representation of value corresponding to key.
Warning:
Returns a copy that must be freed.
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal. George Orwell, "Keep the Aspidistra Flying", Opening words
|
|
|
|
|
|
pds8475 wrote: error C2664: 'jxta_advertisement_get_string' : cannot convert parameter 2 from 'const char [5]' to 'Jxta_index *'
This is usually a Unicode vs. ANSI error. Try putting an L in front of the string literal.
[edit]
Now that I've gone back and read your post, my suggestion was way off. Sorry about that.
[/edit]
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
hi thanks for that but now i get a error message saying cannot convert parameter 2 from 'const wchar_t [5]' to 'Jxta_index *
|
|
|
|
|
It must be something else then. Rather than code something up to find out for sure, I was just taking a stab at something common.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
no problem iv been having a lot of trouble getting Jxta-c to actually work
just about got its shell to run but it wont connect to the network found that it uses a xml file called Platformconfig for its settings and the Confgui which is the problem in question is supposed to generate this
|
|
|
|
|
Try:
Jxta_index j;
peername = jxta_advertisement_get_string((Jxta_advertisement *) pa, &j);
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
thanks for that but that gives me a error saying no appropriate default constructor available
|
|
|
|
|
What statement is generating this error? What Jxta_index constructors are available?
See here for more.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
hi i just searched ther whole of the solution but all i can find is
typedef struct _jxta_index Jxta_index;
and
struct _jxta_index {
JXTA_OBJECT_HANDLE;
JString *element;
JString *attribute;
char *parm;
Jxta_object *range;
};
|
|
|
|
|
Hi Friends,
I developed a SDI application.Then i included the two Forms.
I am able to split the window statically, But I dont know how to fix the size of those scroll bars. I want to make them fixed,should not be moved.
So please any one help me out..
Thanks
Shiva
-- modified at 7:48 Wednesday 10th October, 2007
|
|
|
|
|
shivarudrayya wrote: But I dont know how to fix the size of those scroll bars.
Confusing...
shivarudrayya wrote: I want to make them fixed,should not be moved.
Want to fix the splitter position?
- NS -
|
|
|
|
|
Ya exactly..
Reagards
Shiva
|
|
|
|
|
Deriving a class from the CSplitterWnd and override the OnMouseMove, OnLButtonDown, etc and skipping the default call to CSplitterWnd::OnMouseMove, CSplitterWnd::OnLButtonDown, etc., might be a solution.
- NS -
|
|
|
|
|
Hi,
My Code
-------
int key_status=0;
key_status = System::Convert::ToInt32(myReader->get_Item("status"));
While executing the above code i am getting the below error
E:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xlocnum(965): error C2177: constant too big
Plz some one suggest me to solve it
Thankyou
Know is Drop, Unknown is Ocean
|
|
|
|
|
The first step would be to look at Line 965 of xlocnum and see what constant values it is using and where it is getting them from. One of them is too large. I guess one you've defined rather than one MS defined themselves. To determine which one a breakpoint on the above mentioned lien would certainly be helpful. If you can't get any further you can at least post the result of your investigation. Good luck.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
Hi,
I cant able to trace the code. Coz this is an dll, also while building this itself i am getting error.
Know is Drop, Unknown is Ocean
|
|
|
|
|
So you have a built Dll you can't debug even though you have the source, and the source doesn't build so it can't actually be the source the Dll was built with. There are clearly multiple problem here. Take it a step at a time and post details of the errors if you can't fix them. You need to be standing on firmer ground ( more sure of what's happening ) before anyone can give you much help I'm afraid.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
Exelioindia wrote: While executing the above code i am getting the below error
E:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xlocnum(965): error C2177: constant too big
Not possible. C2177 is a compiler error, not a runtime (i.e., execution) error.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
this is a C++/CLI question, asked in the wrong forum...
|
|
|
|
|
Hi,
I am new to windows programming. I want to change the slider bar position of a third party software (using WinAPI only), which I have accomplished by sending message.
SendMessage( aControlHWnd, TBM_SETPOS, (WPARAM) TRUE, (LPARAM) aPosition );
Now, the position of the sliderbar it is changed, but the corresponding values in other objects (like textbox showing the value related to this sliderbar) are not updated.
I can only use Win API and donot have any access to the event handlers, but if the slider is moved manually by mouse the corresponding values in other objects (like textbox showing the value related to this sliderbar) are also changed. So I am assuming that an event handler already exists in the software which automatically updates other related objects.
Now I just need to send the right message to the right handler to accomplish the task.
Any help would be greatly appriciated.
Thanks.
|
|
|
|
|
When you change the position of the slider, some messages will be sent to the parent. If you send those messages by yourself to the parent of the slider in the same manner you did for the slider, I believe you will get what you expected. You can watch the messages using Spy++. WM_HSCROLL or WM_VSCROLL messages will be they. You can identify the message parameters by refering MSDN.
- NS -
|
|
|
|
|
I deal with grayscale images which i convert to 32bit bitmaps to display...
I use CreateCompatibleBitmap () to create bitmap and bitblt () to display bitmap. But if i change the system display settings to other than 32 bit colors i get distorted images displayed
I use following code:
int k = 0;
for (int i = 0; i < bm_info.bmWidth * bm_info.bmHeight; i++)
{
tbmp [k++] = bmp[i];
tbmp [k++] = bmp[i];
tbmp [k++] = bmp[i];
tbmp [k++] = 0;
}
CDC pMemDC, *pDC;
CBitmap *pBitmap = new CBitmap;
BOOL res;
pDC = GetDC();
res = pBitmap->CreateCompatibleBitmap (pDC,bm_info.bmWidth,bm_info.bmHeight);
if (res > 0)
{
pBitmap->SetBitmapBits ( bm_info.bmWidth * bm_info.bmHeight*4,
(unsigned char *)tbmp );
pMemDC.CreateCompatibleDC ( pDC );
pMemDC.SelectObject ( pBitmap );
pDC->BitBlt ( 300 ,15 , bm_info.bmWidth,bm_info.bmHeight ,
&pMemDC ,0,0 ,SRCCOPY );
}
all help appreciated... ( sample code is more appreciated )
Sharath
|
|
|
|
|
Take a look in the site, there is articles to explain it.
If you want independant bitmaps, you should look for info about all this:
<br />
BITMAP bm;<br />
BITMAPINFOHEADER bmInfo;<br />
LPBITMAPINFOHEADER lpBmInfo;<br />
HANDLE hDIB;<br />
HDC hDC;<br />
HPALETTE hPal;<br />
because is needed to transform from one to the other
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
Also, you may want to read about palettes and
device-independent-bitmap color tables.
Up-sampling an image to 4 times it's original size just to
display it is....well...kind of a waste of resources.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|