|
I think This Example is your answer
This Example For CStatic Control But for your answer
CStatic --> CListCtrl
Function Onclick -> your Function
in the BEGIN_MESSAGE_MAP
you should use functions CListCtrl
//In cpp File
BEGIN_MESSAGE_MAP(CViewerView, CFormView)
ON_STN_CLICKED(ID_SCROLLSIZE, OnClick)
END_MESSAGE_MAP()
void CViewerView::OnInitial()
{
....
....
CRect Rect;
m_ScrollSize.Create("",SS_BLACKRECT|WS_CHILD|WS_VISIBLE|SS_NOTIFY,
Rect,this,ID_SCROLLSIZE);
}
in Header file////////////////////
#define ID_SCROLLSIZE 100;
class CAnswer : public CDialog
{
...
...
DECLARE_MESSAGE_MAP()
public:
CStatic m_ScrollSize;
afx_msg void OnClick();
};
|
|
|
|
|
|
in the onclick event of the button; use the shellexecute command, and in the command to be executed write
hh ur-html-help-filename
so when u will click button hh will open the html file.
hh.exe is the program which executes the compiled html help files.
|
|
|
|
|
Thank's
I will use the "What's this help" by using the html help functionas mentioned in the article:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/htmlhelp/html/vsconovhtmlhelpapioverview.asp[^]
what I did is:
I took the function:
void CMainFrame::HtmlHelp(DWORD_PTR dwData, UINT nCmd)
{
HWND hwnd = HtmlHelp( GetDesktopWindow),
"c:\\Help.chm::/Intro.htm>Mainwin",
HH_DISPLAY_TOPIC, NULL) ;
CGuiFrameWnd::HtmlHelp(dwData, nCmd);
}
when I debugged I could enter the CMainFrame::HtmlHelp function after pressing the What`s this arrow and clicking left at any frame or window.
Then I found the information to use the HWND hwnd = ... function as mentioned above. Now I get the error HtmlHelp function does not accept 4 parameters.
As in the article mentioned the .lib is included and the path for <htmlhelp.h> is set.
So I have no clue what to do!!
Thank`s soo much!
Georg
|
|
|
|
|
A group of warning messages are being displayed when the project is being built. Each of such message is being generated from every source file where this is being used.
Can any one help me out in supressing or deleting these warnings.
The warning is:
"warning C4995: 'CDaoTableDef': name was marked as #pragma deprecated"
Thanks,
---Arun.
|
|
|
|
|
place the following on top of the file:
#pragma warning( disable : 4995 )
|
|
|
|
|
if the name of the class is marked as deprecated, it is because you shouldn't use it anymore !
there is certainly another way to do what you try to achieve a bit differently...
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VCalc 3.0 soon...]
|
|
|
|
|
Yes, placing
#pragma warning( disable : 4995 )
the above sentence would probably do good. But in my situation where I have a number of such messages coming from different files in the same project. Can I place it once in a particular location and avoid all such messages, instead of placing it in every source file.
Thanks,
---Arun.
|
|
|
|
|
|
How Can I register a Crystal Report Viewer Comnponent in VC++? and from where I can get this component, is there any link to download? I did not find any component in my MFC.
|
|
|
|
|
Hello programmer's
I need to help
How to change MCI_DGV_SETVIDEO_BRIGHTNESS in the MCI_SETVIDEO
I Can't use this parameter it's not response to Value
Thanks for answer
|
|
|
|
|
VisuallC wrote: I Can't use this parameter...
Why not?
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
|
|
|
|
|
Thanks for answer But
I can't use
Can you post example from this statement
|
|
|
|
|
VisuallC wrote: I can't use
Why not?
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
|
|
|
|
|
I am developing an application that access the database of SQL Server 2000. I have 5 tables, all of them are added to the project using MFC ODBC CONSUMER class. The problem is that the tables (three of them) that are added first are OK Edit & Add New functions are working but the rest of the tables are READONLY. Please Help me. I am an Administrator of Windows XP account, All the recprdsets that are apened hae been closed to avoid locking still having problem...
Syed Fasih
|
|
|
|
|
For the two record sets that are read-only, how were they opened that differs from the three record sets that are not read-only?
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
|
|
|
|
|
Thsnks for your kind consideration.
I have Classes like:
1. CHRMSSet (CRecordset inherited class) Created when I supplied the DSN to application at start. This is OK
2. CDept added using ODBC Consumer. This is also OK
CDialog based class is using CDept like (CDept *pDet = new CDept)
pDept->Open();
3. CSalaries using ODBC Consumer. This is Read-only
Implementation is As above
4. CSeniority............ Same case
5. CAttendance........ same case
Syed fasih
|
|
|
|
|
Are all five calls to Open() the same?
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
|
|
|
|
|
Hello all,
Perhaps this is a rather idiotic question to ask..but i will ask anyway.
I am writing a VC++ application with a lot of edit boxes (about a hundred >_<) and thus i have a lot of variables which go like PHASE1_1,PHASE1_2,PHASE1_3.....,PHASE2_1,PHASE2_2..PHASE3_1...etc
i find that i have a programming nightmare when i attempt to retrive values from all of them as i have to type out their names individually.
Is there any elegant way of handling A LOT of variables which are similar in name, such that it would make the program writing process a lot easier ?
Thanks in advance
|
|
|
|
|
Use an array of edit controls. You can access each of them by it's index.
Owner drawn
Jesus Loves
|
|
|
|
|
Oh that is interesting ! =)
Can you give more details on how to do that ?
I was looking for something like that...
Thanks
|
|
|
|
|
CEdit m_EditGroup[NUMBER_OF_EDITS_REQUIRED];
for(int index=0;index<NUMBER_OF_EDITS_REQUIRED;index++)
m_EditGroup[index].Create(...);
for(int index=0;index<NUMBER_OF_EDITS_REQUIRED;index+)
m_EditGroup[index].FunctionName(...);
Owner drawn
Jesus Loves
|
|
|
|
|
Owner drawn wrote: CEdit m_EditGroup[NUMBER_OF_EDITS_REQUIRED];m_EditGroup.Create(...);
Except that you have to create all the edit boxes (in a for loop).
|
|
|
|
|
Yeah.
Owner drawn
Jesus Loves
|
|
|
|
|
I wanted to use the "Express OLE DB Library"
(http://www.codeproject.com/database/expressodl.asp?df=100&tid=837433&forumid=3215&noise=5&exp=1&mpp=50&select=1293756)
in my Visual Studio 2003 Standard (with MFC) application.
But when i compile the first programm i have an erros:
Compiling...
stdafx.cpp
d:\AAA\SPR\SPR\Include\SypODLCommand.h(27) : error C3203: 'CRowset' : class template invalid as template argument for template parameter 'TRowset', expected a real type
d:\AAA\SPR\SPR\Include\SypODLRecordBase.h(53) : error C3200: 'int' : invalid template argument for template parameter 'TRowset', expected a class template
d:\AAA\SPR\SPR\Include\SypODLCommand.h(29) : see reference to class template instantiation 'CSypODLRecordBase<taccessor>' being compiled
with
[
TAccessor=CDynamicParameterAccessorEx
]
d:\AAA\SPR\SPR\Include\SypODLRecordset.h(25) : error C3203: 'CRowset' : class template invalid as template argument for template parameter 'TRowset', expected a real type
d:\AAA\SPR\SPR\Include\SypODLRecordBase.h(53) : error C3200: 'int' : invalid template argument for template parameter 'TRowset', expected a class template
d:\AAA\SPR\SPR\Include\SypODLRecordset.h(27) : see reference to class template instantiation 'CSypODLRecordBase<taccessor>' being compiled
with
[
TAccessor=CSypODLDynAccessor
]
d:\AAA\SPR\SPR\SypOLEDBLib.rc(3) : fatal error C1083: Cannot open include file: 'SypODLResource.h': No such file or directory
Build log was saved at "file://d:\Aaa\Spr\Spr\Debug\BuildLog.htm"
SPR - 5 error(s), 0 warning(s)
Can you help me?
regards
mwgomez
|
|
|
|