|
Well, I don't know the answer to your question.
But I know who does...
Your own PC, and Spy++.
Run (eg), notepad. Run spy++ and monitor messages.
Press the context-menu key. Let go of it. Go look at spy++!
Iain.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need cotract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
Thanks! They are:
WM_KEYDOWN, VK_APPS
WM_KEYUP, VK_APPS
But not working in my code...
Maxwell Chen
|
|
|
|
|
An alternative for you is to send the WM_CNTEXTMENU[^] message instead...?
Good luck,
Iain.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need cotract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
Hi to All,
I need to use the data grid control in vc++6 MFC.
But I cannot see it in my control Box.
Can anyone please tell me how to add it? (may be reference or some settings)
thanks in advance
-----------------------------
I am a beginner
|
|
|
|
|
AFAIK, there's no grid control in the default VC6 controls. You will need to use the MSFlexGrid ActiveX control (import it from the activeX components list).
You can also use Chris Maunders's Grid control[^]
|
|
|
|
|
thanks for your reply..
Could you please tell me, if the user can add rows to the data-grid manually on the grid itself, (same like VB.NET)....That is my requirement actually. So please guide me which data grid control to use for the same purpose
thanks
-----------------------------
I am a beginner
modified on Friday, September 25, 2009 5:39 AM
|
|
|
|
|
HI all,
i m using calc.exe to open calculater from shell execute please thell me how can i open calendar or clock.
thanks in advance.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
"_$h@nky_" wrote: i m using calc.exe to open calculater from shell execute please thell me how can i open calendar or clock.
I've not seen those executables since Program Manager and the Windows 3.x days.
"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
|
|
|
|
|
using shell execute, open "timedate.cpl"
|
|
|
|
|
Not a coding question but on bordeline, I’ll admit.
When I am using simple one row / two columns splitter window should I refer to left / right pane or view?
Same goes for tab view (or actually control) – is it a tab or view or page?
Similar dilemma for a tree view.
I guess what I am asking is – how to name my class so it is descriptive
CCamera or CCameraView or CCameraTab if it is a AVI frame in “splitter tab” ?
Thanks for reading.
|
|
|
|
|
Vaclav_Sal wrote: When I am using simple one row / two columns splitter window should I refer to left / right pane or view?
I would go with a and b .
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]
|
|
|
|
|
Vaclav_Sal wrote: should I refer to left / right pane or view?
When using a splitter window (or a Frame) I always put Views in each pane, so I would give them names such as IndexView, DetailView etc.
With Tab pages I would use Tab or Form as the suffix etc.
The main thing to consider is whether it makes sense to you and, more importantly, whether it would it make sense to someone else who had to maintain your code.
|
|
|
|
|
Hi to All,
I am a beginer in MFC.
I have added a new dialog box (property sheet_Medium) in my dialog based application. Now, i want to put a data-grid on the new dialog. Please tell me where do I write the code(to create the datagrid) for the same?.. I cannot see a OnInit method too. I want to show the grid when the dialog appears
Thanks in advance
-----------------------------
I am a beginner
|
|
|
|
|
You should do it in the OnInitDialog function of the dialog.
If you don't see the function, you must add it yourself.
OnInitDialog is a virtual function defined in the CDialog class.
You can override it in your derived class.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
hrishiS wrote: I have added a new dialog box (property sheet_Medium)...
Is this the name of your dialog class, or is the class derived from CPropertySheet ?
"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
|
|
|
|
|
my question is
How can i concate two bitmap to produce third combine bitmap ?
here is my code:
CImage __Imageone;<br />
__Imageone.Load (L"D:\\2009\\testConsult.tif");<br />
<br />
int nWidthone = __Imageone.GetWidth();<br />
int nHeightone = __Imageone.GetHeight();<br />
<br />
COLORREF __colorefone;<br />
<br />
for (int i = 0 ; i < nWidthone ; i++)<br />
for (int j = 0; j < nHeightone ; j++)<br />
__colorefone = __Imageone.GetPixel (i,j);<br />
<br />
<br />
CImage __Imagetwo;<br />
__Imagetwo.Load(L"D:\\2009\\Header.TIF"); <br />
int nWidthtwo = __Imagetwo.GetWidth();<br />
int nHeighttwo = __Imagetwo.GetHeight();<br />
COLORREF __colortwo;<br />
for (int x = 0 ; x < nWidthtwo ; x++)<br />
for (int y = 0 ; y < nHeighttwo ; y++)<br />
__colortwo = __Imagetwo.GetPixel(x,y);<br />
<br />
how to combine these two into one ??
Thanks !!!!
|
|
|
|
|
For example:
CImage img[3];
img[0].Load(_T("D:\\2009\\testConsult.tif"));
img[1].Load(_T("D:\\2009\\Header.tif"));
int h, w , bpp;
HDC hdc;
w = img[0].GetWidth() + img[1].GetWidth();
h = img[0].GetHeight();
if (h < img[1].GetHeight()) h = img[1].GetHeight();
bpp = img[0].GetBPP();
if ( bpp < img[1].GetBPP()) bpp = img[1].GetBPP();
img[2].Create(w,h,bpp);
hdc = img[2].GetDC();
img[0].BitBlt(hdc, 0, 0);
img[1].BitBlt(hdc, img[0].GetWidth(), 0);
img[2].ReleaseDC();
img[2].Save(_T("img3.tif"));
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 mr.pall ..its really helpful 4 me
~~~~~~~~~~~~~Raju~~~~~~~~~~~~~
|
|
|
|
|
Is 'void' a data-type?
If yes then why sizeof(void) shows compiler error?
|
|
|
|
|
void stands for 'no-type-because-there-is no-value' (for instance as function argument or return value) or 'any-type' in expression like
void * p;
Since p can point, for instance, to char as well to double it make no sense an expression like sizeof(*p) .
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]
|
|
|
|
|
void, in effect, == undefined, so (as it's not defined) cannot have a size.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Yes, according to the C99 standard: "The void type comprises an empty set of values; it is an incomplete type that cannot be
completed."
Applying sizeof to an incomplete type is an error.
|
|
|
|
|
With FindWindow and FindChildWindows API functions, I got the handle of SysListView32 control of mmsys.cpl panel. When I was trying to search the text of each entries on the ListCtrl, it always crashed.
My code snippet is as the below.
void CMainDlg::OnBnClickedGetDolby()
{
KillRunningApplet(_T("Sound"));
if(!LaunchCplApplet(_T("mmsys.cpl"), 0, 0)) {
OutputDebugString(_T("LaunchCplApplet fails. \n"));
return;
}
CWnd* pWnd = NULL;
int i = 0;
while(!pWnd) {
pWnd = FindWindow(NULL, _T("Sound"));
if(pWnd) {
OutputDebugString(_T("Found Sound window. \n"));
break;
}
Sleep(10);
i++;
if(i > 1000) {
OutputDebugString(_T("Sound window is not found. \n"));
return;
}
}
m_hListView = NULL;
for(i = 0; i < 2; i++) {
EnumChildWindows(pWnd->m_hWnd, DoSomethingHelper, (LPARAM)this);
if(m_hListView) {
OutputDebugString(_T("Got SysListView32"));
break;
}
else {
OutputDebugString(_T("SysListView32 is not found."));
if(i == 1) {
return;
}
}
}
CListView* pView = (CListView*)FromHandle(m_hListView);
CListCtrl& Ctrl = pView->GetListCtrl();
LVFINDINFO info = {0};
int iIndex = 0;
info.flags = LVFI_PARTIAL | LVFI_STRING;
info.psz = _T("Speaker\0");
if((iIndex = Ctrl.FindItem(&info)) != -1) {
OutputDebugString(_T("Speaker-like entry is found."));
}
}
BOOL CALLBACK DoSomethingHelper(HWND hwnd, LPARAM lParam)
{
TCHAR sClassName[MAX_PATH] = {0};
GetClassName(hwnd, sClassName, MAX_PATH);
if(wcscmp(sClassName, _T("SysListView32")) == 0) {
CMainDlg* pMain = (CMainDlg*)lParam;
pMain->m_hListView = hwnd;
}
OutputDebugString(sClassName);
return TRUE;
}
Maxwell Chen
|
|
|
|
|
Which applicaion crashes? the applet or your application?
|
|
|
|
|
A dialog box popped up saying "Windows Shell Common DLL has stopped working". When I clicked [Close program] of that popup, the applet was gone but my application still was alive.
I traced into the source of MFC. The problem is the m_hWnd of that CListCtrl.
_AFXCMN_INLINE int CListCtrl::FindItem(LVFINDINFO* pFindInfo, int nStart) const
{ ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, LVM_FINDITEM, nStart, (LPARAM)pFindInfo); }
Maxwell Chen
modified on Friday, September 25, 2009 2:09 AM
|
|
|
|