|
In your function dm::Add , you are creating a local variable ctv of type CTestView . This local copy is uninitialized. Its window hasn't been created, and therefore any child windows (including the list control you are really trying to access) haven't been created either. I'm guessing what you really want is to call the addData function for an existing CTestView .
You should have a pointer somewhere to your existing CTestView . If you are using the document/view architecture, you can get the active view from the frame window (your class derived from CFrameWnd ), or you can enumerate all of the views using your document class (see the member functions GetFirstViewPosition and GetNextView ).
Software Zen: delete this;
|
|
|
|
|
I am attempting to override the default interrupt handler for my keyboard.
Does anyone have a class that does such a thing using inline assembly?
I have assembly code that does this but i fail to be able to convert it to inline assembly, (i am new to assembly).
Smelly Cheese....
|
|
|
|
|
|
Hello all,
I developed a program with CRectTracker for a computer with touch panel. But the eight handles are very
hard to click or select with touch pen. Who can tell me how to expand the handles size?
Thanks a lot in advance.
Try to do better every day...
|
|
|
|
|
I had a similar problem with a touch screen application of mine. I ended up not using CRectTracker , and implementing my own.
Software Zen: delete this;
|
|
|
|
|
I have solved this issue.
It's very easy.
For CRectTracker there is a member variable m_nHandleSize. We can set it to the size we want.
Maybe your issue is different from mine.
Thanks for your reply.
|
|
|
|
|
how to Pop up "view wireless Network dialog" of windows XP by Code?
Any tip is welcome!
thank you !
Everyday we make things better.
|
|
|
|
|
Recently,I developed a software which will interact with excel.
So I create a simple Single Document/View project CMyReport,and in start function
BOOL CMyRportApp::InitIntance()
{
...
AfxOleInit();
...
return true;
}
and then in exit function
int CMyRportApp::ExitInstance()
{
::OleUninitialize();
return __super::ExitInstance();
}
then i calle m_oApplication.CreateDispatch("Excel.Application"),
m_oApplication is a member varible of CMainFrame of type CApplication,
CApplication is created from excel typelib.
When the application everything is ok,but when i close the application,a alert
mesessge box is poped up.
the code where arouse the alert is showed as follow:
CCmdTarget::~CCmdTarget()
{
#ifndef _AFX_NO_OLE_SUPPORT
if (m_xDispatch.m_vtbl != 0)
((COleDispatchImpl*)&m_xDispatch)->Disconnect();
ASSERT(m_dwRef <= 1);
#endif
#ifdef _AFXDLL
m_pModuleState = NULL;
#endif
}
"ASSERT(m_dwRef<=1)"is the problem,debug it and found m_dwRef is 2.
~CCmdTarget() is the base class destructor of class COleMessageFilter.
Thanks a lot to who can give me some pieces of advice.
If you want to be a great programmer,then never stop learning
|
|
|
|
|
I want to acess msconfig programmatically using all versions of win os and how can write registry entry in it
|
|
|
|
|
msconfig does not exist in windows NT or later!
Don't try it, just do it!
|
|
|
|
|
OK, I agree not work in nt but what about other in win os
In my college a password form comes before the win 9x and also in xp/2000 and until and unless you feed a password normal booting didn't continue , I just want do similar ly but i didnot know how to enter in boot.ini in msconfig
programmatically.
|
|
|
|
|
I want to acess msconfig programmatically using vb6 in all versions of win os and how can write registry entry in it
|
|
|
|
|
I,want to hide any file or folders programmatically and also restricting user to open particular file and folder
in win9x,nt/2000/xp
|
|
|
|
|
Nice that you want to, but (access restriction) it's not possible in win9x ... why don't you start reading about all the things you are asking here before wasting our time?
Don't try it, just do it!
|
|
|
|
|
Hey, Alex I have seen s/w that locks file and folder and prompts for password , how can i make a similar prog and through calling which api.
|
|
|
|
|
I have created a console C++ application that collects system information, including NFO file as follows
*****************************************************************************
SHELLEXECUTEINFO ShExecInfo = {0};
ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
ShExecInfo.hwnd = NULL;
ShExecInfo.lpVerb = NULL;
ShExecInfo.lpFile = "\"C:\\Program Files\\Common Files\\Microsoft Shared\\MSInfo\\MSInfo32.exe \"";
ShExecInfo.lpParameters = "/nfo c:\\SystemInformation.nfo";
ShExecInfo.lpDirectory = NULL;
ShExecInfo.nShow = SW_SHOW;
ShExecInfo.hInstApp = NULL;
ShellExecuteEx(&ShExecInfo);
WaitForSingleObject(ShExecInfo.hProcess,INFINITE);
***************************************************************************
The code above works, the problem is that there is no indication that the application still running during creation of the (*.nof) file which could be 1-1.5 mins. I tried a messageBox before the code is executed, but it will the same difference.
Any ideas how to display some sort of message/status bar to monitor progress?
|
|
|
|
|
Normally you can't create a progress bar for that because the msinfo32.exe does all the work for you and does not provide a callback or notify system.
Don't try it, just do it!
|
|
|
|
|
Instead of
WaitForSingleObject(ShExecInfo.hProcess,INFINITE);
you can wait for a specific amount of time:
do{ <br />
dwWaitResult = WaitForSingleObject(ShExecInfo.hProcess,INFINITE);<br />
switch( dwWaitResult ){<br />
case WAIT_TIMEOUT:<br />
break;<br />
case WAIT_OBJECT_0:<br />
break;<br />
case WAIT_FAILED:<br />
break;<br />
}<br />
}while( WAIT_TIMEOUT == dwWaitResult );
I truly CRINGE every time I see an INFINITE wait, anyhow.
|
|
|
|
|
hi,guy
Sometimes the big font(120 DPI) will cause the interface to look so bad when we expect software to be run under small font(96DPI) conditions.
This problem has troubled me for a long time.
Do you have any solution or advice to me.
Thank you for help me!
Best Regards,
KHLin
|
|
|
|
|
You will need to layout your application so that it looks acceptable at either desktop font size. If the current layout is too crowded, you should rethink how you are doing things.
Another option is to dynamically resize the controls in your application. Take a look at the articles in the 'dialog' section here on Code Project for some ideas.
Software Zen: delete this;
|
|
|
|
|
Can you not use Unicode strings in status bars?? The lParam of the SB_SETTEXT message is a LPSTR (not LPTSTR)...
|
|
|
|
|
See SB_SETUNICODEFORMAT.
Don't try it, just do it!
|
|
|
|
|
Thanks for the reply. I have another question - the SB_SETUNICODEFORMAT message says it needs comctl32.dll version 4.00 or later but the Remarks section says to see the remarks for CCM_GETUNICODEFORMAT which says it needs version 4.71 for WinNT or version 5.80 for Win95/98. Do you know which version it needs?
- thanks
|
|
|
|
|
I installed VS 2005.NET Beta 2 (the VS not an express edition) and I realised when making an MFC Application it has the same menus and buttons strips are equal to the 2003 version... I was expecting the same design of the Office 2003, since that happens when working without MFC...
Is this just my ignorance on MFC, or MS will change that soon?
|
|
|
|
|
When I generated the assembly code for both inline and non-inline function calls, I see no difference in code, they're exactly the same.
But it said to be inline version does not have the function call overhead?
|
|
|
|