|
May be you like to see www.functionx.com[^].
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
|
free download link of a free MFC book.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
|
|
Try (as already suggested) Google, for instance [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
|
Hi,
How can I identity that my OS is 32 bit or 64 bit?
|
|
|
|
|
|
Hi,
I want to change the index of header Item on drag drop. If header item 0 drag drop to next header column(After HeaderCol 1) then change the index of Header item 0 to 1. & Header Item 1 index to 0. I am using GetItem() & SetItem() but that's not working. How to do this?
Please make the correction in the code:-
On DragDropFunc()
{
HDITEM pHeaderItemCurrent,pHeaderItemNew;
TCHAR lpBuffer[256];
TCHAR lpBuffer1[256];
pHeaderItemCurrent.pszText = lpBuffer;
pHeaderItemCurrent.cchTextMax = 256;
pHeaderItemNew.pszText = lpBuffer1;
pHeaderItemNew.cchTextMax = 256;
m_HeaderCtrl.GetItem(0,&pHeaderItemCurrent);
m_HeaderCtrl.GetItem(1,&pHeaderItemNew);
m_HeaderCtrl.SetItem(0, &pHeaderItemNew);
m_HeaderCtrl.SetItem(1, &pHeaderItemCurrent);
}
Thanks:-
Mike
|
|
|
|
|
Are you in search of this ?
m_mylistcontrol.SetExtendedStyle(LVS_EX_HEADERDRAGDROP);
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
NO. I have already added the HDS_DRAGDROP while creating the header control.
What I need is to change the header Id which we specify while insertion. i.e
m_header.InsertItem(columnId, &hditem);//columnId =1;
Now How Can assign the some different hditem to columnId = 1;
I try with SetItem() as in code but its not working......
Any suggestion.
Mike
|
|
|
|
|
Just one quick question. Why do you want to change the index of the item?
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
Yes. I need to change the index of item. The new index will be postion of column after drag drop.
Mike.
|
|
|
|
|
Check out CHeaderCtrl::SetItem() and HDI_ORDER
|
|
|
|
|
Hai!
Can you please give me a sample code which calculates HCF and LCM of two or more numbers without using inbuilt functions to calculate HCF & LCM.
If there are more than one methods to calculate HCF/LCM just tell the logic and if possible provide sample code for the best logic.
Thankyou!
modified on Monday, February 16, 2009 1:11 AM
|
|
|
|
|
|
I must be doing something really silly but I'm trying to get the time information when a key is hit down then released (WM_KEYUP). I'm writing a win32 application (doesn't anyone write these anymore?), but when I hit the key, I get a blank messagebox or squares. What am I doing wrong. Any good advice might win you a keg of cool beer or at least, a thanks.
case WM_KEYDOWN:
{
SYSTEMTIME st;
GetSystemTime(&st);
MessageBox(NULL,(LPCWSTR)L"Time is "+ st.wMilliseconds,(LPCWSTR)L"Keystroke Analysis",MB_OK);
}
break; //etc
|
|
|
|
|
You cannot add a WORD type to a constant string.
Use the Format method of the CString class to generate the Text for the MessageBox .
«_Superman_»
|
|
|
|
|
|
EvScott wrote: doesn't anyone write these anymore?
Yes.
case WM_KEYDOWN:
{
SYSTEMTIME st;
GetSystemTime(&st);
const int BUFSIZE = 0x100;
TCHAR msg[BUFSIZE];
HRESULT hr = StringCbPrintf(msg, sizeof(TCHAR) * BUFSIZE, _T("Time is %d"), st.wMilliseconds);
if (SUCCEEDED(hr)) MessageBox(NULL, msg, _T("Keystroke Analysis"),MB_OK);
}
break;
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Thanks,CPallini.I still get the same values when I include your example. However, when I run in debug mode and examine the values, I can see the SYSTEMTIME.wMilliSeconds. Just don't seem able to access it in a messagebox.
|
|
|
|
|
I made a test, my code works on my system.
Could you please post your updated code? Are you doing a UNICODE build?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Thanks CPallini - Just don't seem to get a sensible output. I've omitted your code for reasons of clarity.
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
SYSTEMTIME st;
PAINTSTRUCT ps;
switch (message)
{
case WM_PAINT:
{
HDC hdc = BeginPaint(hWnd,&ps);
EndPaint(hWnd,&ps);
}
return(0);
break;
case WM_KEYDOWN:
{
SYSTEMTIME st;
GetSystemTime(&st);
//get duration in milliseconds
}
break;
case WM_TIMER:
{
}
break;
case WM_KEYUP:
{
SYSTEMTIME st;
GetSystemTime(&st);
//get duration in milliseconds
}
break;
case WM_DESTROY: // onload from memory
PostQuitMessage(0);
break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
return 0;
}
|
|
|
|
|
Are you doing a UNICODE build?
What is msg value at runtime, after the StringCbPrintf call (use the debugger to see)?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|