|
snacker2 wrote: HWND passed in
What is that HWND? Is it the dialog HWND? Because really, it needs to be the HWND of a window whose ONLY responsibility is containing the ActiveX control. As I said, what I did was to create a STATIC control with no text, then pass its HWND to the ActiveX creation function. Then, when the dialog closes, it closes the STATIC's window for me, I don't need to do anything.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
The HWND is the handle for a java.awt.Canvas.
I'm getting the HWND as is documented in the jni docs which is shown here:
Implement the C++ native code[^]
The create function you're referring to is AtlAxCreateControl( OLESTR( "http://www.microsoft.com" ), hwnd, NULL, &pUnk ) , correct?
What do you mean "with no text"?
So it looks like I need to create a new window as a child of the HWND I'm getting from the java.awt.Canvas and create the control on that window instead of the one from java...?
(thanks again for your help with this)
|
|
|
|
|
snacker2 wrote: What do you mean "with no text"?
I mean I didn't add any text to the static text control - probably of little relevance.
snacker2 wrote: The create function you're referring to is AtlAxCreateControl( OLESTR( "http://www.microsoft.com" ), hwnd, NULL, &pUnk ), correct?
Yep - I used a different first parameter (I passed the progid of the calendar ActiveX control - but that (again) is of little relevance.
snacker2 wrote: So it looks like I need to create a new window as a child of the HWND I'm getting from the java.awt.Canvas and create the control on that window instead of the one from java...?
That's what I'm suggesting.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
|
I will try passing NULL.
I am confused as to why it was returning 7 instead of zero, but I assumed it was because at least the control container and control itself had references to it.
I will take a look at the link you sent.
|
|
|
|
|
What I am trying to do is when I click a button it draws a cube or whatever and displays the name of the object in a
GLUI_EDITTEXT_TEXT box.I also want to append a number to the end of the object name and increment the number each time a new object is drawn. I have everything working ok except the name and number will only display one character at a time in the textbox and increments the position each time the draw button is pushed. Much Thanks to anyone who will/can help with this. Jody Bush
Below is part of the code I have for this thing.
int Cnum = 1;
int Pnum = 1;
char Cube[sizeof(GLUI_String)] ={" "};
char Plane[sizeof(GLUI_String)] ={" "};
char Name;
Name1 = subwin->add_edittext( "Name", GLUI_EDITTEXT_TEXT,&Name);
if(control == DRAWPLANE_ID){
drawplane = true;
sizex = 1.0;
sizey = 1.0;
sizez = 0.0;
itoa(Pnum, Plane, 10);
sprintf(Plane,"Plane %d",Cnum);
Name = Plane[Pnum];
Name1->get_text();
Pnum++;
}
if(control == DRAWCUBE_ID){
drawcube = true;
sizex = 1.0;
sizey = 1.0;
sizez = 1.0;
itoa(Cnum, Cube, 10);
sprintf(Cube,"Cube %d",Cnum);
Name = Cube[Cnum];
Name1->get_text();
Cnum++;
}
|
|
|
|
|
bushimports wrote: I have everything working ok except the name and number will only display one character at a time in the textbox and increments the position each time the draw button is pushed
I think your problem is that you're only passing in one character to the add_edittext call. I don't know what the signature of the method is, but &Name can only refer to a single character (and then, so long as a coincidence of code generation puts zero bytes on the stack.
Anyway I think the problem would probably be solved by
- Declaring Name as
char* Name; - Changing how you assign Name, from
Name = Plane[Pnum];
and
Name = Cube[Cnum];
to
Name = Plane;
and
Name = Cube;
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
How to save on javascript Type the 'IDC_LAT'values in NMEAParserDemo Dialogbase
source
|
|
|
|
|
yunpil wrote: How to save on javascript Type the 'IDC_LAT'values in NMEAParserDemo Dialogbase
That's a very good question. Good luck with it.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
can you try urself, and post your problem here, instead of posting whole code!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hello,
I try to get the different data for each row in a list control (CListCtrl), more explain i need to put data refer to each row in a table so how can i do this!!!
Thank you for your help.
|
|
|
|
|
Are you referring to the SetItemData() and GetItemData() methods?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
yes i see them, but i couldn't used GetItemData() like i need.
|
|
|
|
|
khaliloenit wrote: ...but i couldn't used GetItemData() like i need.
Why not?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
i have some difficulties in the returned data.i need to get it in text format to insert them into xml file for example.
|
|
|
|
|
khaliloenit wrote: i have some difficulties in the returned data.
It's the exact same data set with SetItemData() .
TCHAR *pszBuffer = new TCHAR[12];
_tcscpy(pszBuffer, _T("Hello World"));
m_list.SetItemData(nItem, (DWORD) pszBuffer);
...
pszBuffer = (TCHAR *) m_list.GetItemData(nItem);
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
|
how do you use it ?
for example :
YourData* pData = new YourData;<br />
MyList.SetItemData( iIndex, (DWORD_PTR)yourdata);
...
YourData* pData = NULL;<br />
pData = (YourData*)MyList.GetItemData(iIndex);
This signature was proudly tested on animals.
|
|
|
|
|
so how can use it to retrieve data in text format?
|
|
|
|
|
show us the code with the SetItemData .
This signature was proudly tested on animals.
|
|
|
|
|
It's simply a pointer to someplace in memory. How it's interpreted (e.g., char* , int* , class* , is up to you.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
Sorry, but have you an example how to get the row data into a string table for example witch i can try like it please.
|
|
|
|
|
khaliloenit wrote: Sorry, but have you an example how to get the row data...
Are you talking about GetItemText() ?
khaliloenit wrote: ...into a string table...
A stringtable resource?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
I don't know if you understand me what i would do but my desire is to loop my liste by row and to get the data of this row.
this is from the row in List Control :
Row | Name | Age
X X-name X-age
what i need is to get the
Row = X
Name = X-name
Age = X-age
|
|
|
|
|
khaliloenit wrote: I don't know if you understand me what i would do but my desire is to loop my liste by row and to get the data of this row.
You're right. I meant to suggest GetItemText() .
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|