|
~RaGE();
|
|
|
|
|
finallyfinally
|
|
|
|
|
bang bang
|
|
|
|
|
"Sarah Connor ?"
~RaGE();
|
|
|
|
|
nop, rameshmahadevan... sorry
but it was the idea
|
|
|
|
|
|
Hello,
I would like to know, for joining two pixels in a bitmap.
As i have set of pixels, so i need to join them.
|
|
|
|
|
huh ?
pixels are independant entities ( if I may say so ); even in a bitmap.
what exactly are you wanting to do ?
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
I have set of cartesian coordinates, i plotted them on bitmap by using SetPixel(...);,
and so then i would like to join all the pixels.
|
|
|
|
|
like what, draw a line between those points ?
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
yes, to draw a line between those points
|
|
|
|
|
Hi chaitanya22 ,
Can you be more specific ? what do you need?
|
|
|
|
|
Doesw anybody knows if MS flexgrid supports user input?
I inserted it in project, but I didn't manage to enter any text in a cell. The control is not disabled. Setting cell text by .put_Text works.
|
|
|
|
|
i don't think that is possible with MSFlexGrid.
you could use CGridCtrl[^] for instant editing...
|
|
|
|
|
|
//in class defination
CWnd TempObject;
struct ControlObjects //Represents the dynamically created controls.
{
CWnd *WndObject;
}*ptrControlObjects;
//in member function
ptrControlObjects=(struct ControlObjects*)malloc(sizeof(struct ControlObjects)*numControls);
//necessary or it will give assertion in CreateControl.
for(int numWindObject=0;numWindObject<numcontrols;numwindobject++)
{
ptrcontrolobjects[numwindobject].wndobject="NULL;
}
//problem
ptrControlObjects[0].WndObject-">CreateControl("VALID PARAMETERS");
The above statement creates the control and displays it but not storing the object of the newly created control!! while...
TempObject.CreateControl("VALID PARAMETERS"); ...creates,displays and is able to store the object of the control!!
Can anybody please explain to me?
I want to have same behavior of the dynamic array of the controls(all the controls will be same)
Thanks.
|
|
|
|
|
Solved...
//necessary or it will give assertion in CreateControl.
for(int numWindObject=0;numWindObject{
ptrControlObjects[numWindObject].WndObject=new CWnd;
}
Thanks...
|
|
|
|
|
I'm streaming text into a richedit control usiong ES_STREAMIN, I am also catching the EN_CHANGE for this control in an attempt to implement an auto save feature and an undo/redo feature.
Here is a small sample of the code:
if (strlen(Awaiting))
return -1;
if (RichEdit_SetRTF(hEdit,lpszstr) ) {
ClrHistory();
I have set a breakpoint on each line of that code, aswell as the EN_CHANGE message. All runs in order until the Richedit callback, before proceeding to the next line, the EN_CHANGE is trapped. i.e. We send the text, and everything waits until the EN_CHANGE has been processed.
Problem is, I am not yet ready to process this message. If this is too easy i appologise in advance.
|
|
|
|
|
waldermort wrote: Problem is, I am not yet ready to process this message
I do not think I have understood what your problem exactely is. What is it that you do not want ?
~RaGE();
|
|
|
|
|
I couldn't understand why the EN_CHANGE message was being sent and processed before I had completed that particular function. I guess it was being sent from the control as a SendMessage instead of a Postmessage.
I was not ready to process it since after setting the control text I needed to set some flags and fill some buffers. This was causing my EN_CHANGE handler to process the wrong information.
I have managed to overcome it by setting a few flags and sending a custom message. I now have a fully working auto save/redo/undo/IME-compatible edit box. Guess in future I should never trust exactly when a windows message will be sent.
|
|
|
|
|
waldermort wrote: I have managed to overcome it by setting a few flags and sending a custom message. I now have a fully working auto save/redo/undo/IME-compatible edit box. Guess in future I should never trust exactly when a windows message will be sent.
Ok, glad you have sorted it out. Sorry we could not help earlier.
~RaGE();
|
|
|
|
|
Hello,
I have a project (VS2005) with a dialogBox containing a listBox filled with my drive letters.
I use that code to populate the listbox :
BOOL NewDlgProc_OnInitDialog(HWND hwnd, HWND hwndFocus, LPARAM lParam)<br />
{_TCHAR path[MAX_PATH];<br />
int res;<br />
_tcscpy_s(path, MAX_PATH, _T("*.*"));<br />
res = DlgDirList(hwnd,(LPTSTR) path, IDL_DRIVE, 0, DDL_DRIVES);<br />
if (res == 0)<br />
{<br />
MessageBox(hwnd, _T("No drive available"), _T("Warning!"),MB_OK | MB_ICONINFORMATION);<br />
}<br />
return TRUE;<br />
}
I would like to get the text of the selected item so i wrote the folowing code :
<br />
void NewDlgProc_OnSeldrive(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify)<br />
{<br />
LRESULT len=0;<br />
LRESULT index;<br />
index = SendDlgItemMessage(hwnd, IDL_DRIVE, LB_GETCURSEL, 0, 0);<br />
if (index != LB_ERR)<br />
{<br />
_TCHAR driveText[8];<br />
len = SendDlgItemMessage(hwnd, IDL_DRIVE, LB_GETTEXT, (WPARAM)index2, (LPARAM)driveText);<br />
if (gbr_len != LB_ERR)<br />
{<br />
...<br />
}<br />
}<br />
...<br />
}
When i try to debug this code i have in the listbox two items with the folowing text : [-c-] and [-d-].
When i select an item i got in driveText variable something like that :
driveText[0] = 0x0e1c <br />
driveText[1] = 0x0013<br />
driveText[2] = 0x005b '['<br />
driveText[3] = 0x002d '-'<br />
driveText[4] = 0x0064 'd'<br />
driveText[5] = 0x002d '-'<br />
driveText[6] = 0x005d ']'<br />
driveText[7] = 0<br />
I do not understand why i get the first two index. I should have get directly the text '[-d-]'.
Could someone help me ?
Best regards.
|
|
|
|
|
gbruyneel wrote: len = SendDlgItemMessage(hwnd, IDL_DRIVE, LB_GETTEXT, (WPARAM)index2, (LPARAM)driveText);
index2 is not defined.
gbruyneel wrote: if (gbr_len != LB_ERR)
gbr_len is not defined.
Other than that, your code snippet worked fine for me.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Oops I missed the final code :
void NewDlgProc_OnSeldrive(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify)<br />
{<br />
LRESULT len=0;<br />
LRESULT index;<br />
index = SendDlgItemMessage(hwnd, IDL_DRIVE, LB_GETCURSEL, 0, 0);<br />
if (index != LB_ERR)<br />
{<br />
_TCHAR driveText[8];<br />
len = SendDlgItemMessage(hwnd, IDL_DRIVE, LB_GETTEXT, (WPARAM)index, (LPARAM)driveText);<br />
if (len != LB_ERR)<br />
{<br />
...<br />
}<br />
}<br />
...<br />
}<br />
What are your result is it the same as mine, i have tried to switch to MBCS and i have the same behaviour.
|
|
|
|
|
gbruyneel wrote: ...is it the same as mine,
No.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|