|
yes. see OnWizardNext, OnWizardBack etc. You can do the validations in these functions
This would be applicable in case you have set the wizard mode
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
modified on Wednesday, September 3, 2008 8:19 AM
|
|
|
|
|
No its not done,
i have no back or next button.
i have 8 property pages those are used in propertsheet with ok and cancel button.
so please help me.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
Then in this case you would be having a dialog class derived from CPropertyPage. You can implement the OnOK handler for that. For this go to the properties window and select OnOK from the list of handlers and here you can check whether all the controls on that page satisfy the criteria of allowing the user to navigate to the other page.
Hope that now it makes sense
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
In each page's OnKillActive() method, simply return 0 to stay on that page.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hello everyone,
In ATL new object wizard, we deinfe CoClass Name (under COM sub-category) and Interface Name (under COM sub-category). But I found it only displays in IDL file for Coclass/interface names. Even client only use GUID, but the names. My question is, is the names used elsewhere besides IDL file?
I quoted the client side code which uses GUID and IDL file which contains coclass/interface names below.
<pre>
Client code
MIDL_DEFINE_GUID(CLSID,
CLSID_Test,0x5B8F6FFC,0x4A45,0x4878,0x8F,0xC1,0x25,0x96,0x89,0xB0,0xDE,0xA7);
Client will use CLSID_Test other than
"0x5B8F6FFC,0x4A45,0x4878,0x8F,0xC1,0x25,0x96,0x89,0xB0,0xDE,0xA7".
IDL code,
importlib("stdole2.tlb");
[
uuid(5B8F6FFC-4A45-4878-8FC1-259689B0DEA7),
helpstring("Test Class")
]
coclass Test
{
[default] interface ITest;
};
</pre>
thanks in advance,
George
|
|
|
|
|
Hi All
I want to change MDI Application Size and Position.When code is run then i want to show Application in Top Right side Corner and size will be 4*4. Plz help me
singh
|
|
|
|
|
SetWindowPos/MoveWindow
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
I just want to set the current directory to the one navigated to by the user via the CFileDialog. MFC C++ Application VS 2005 on WIndows XP.
I cannot seem to find an option other than to select a specific file.
I need to open multi files when the user selects the directory, but this is not using the CFileDialog.
Any suggestion please.
Andy.
|
|
|
|
|
you can set the current directory value in registry and then pick it up from there before showing the CFileDialog. In OPENFILENAME structure set lpstrInitialDir variable.
Hope this helps you.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
I wanted to use the CFileDialog to find the directory and then set it to the current directory.
|
|
|
|
|
Andy202 wrote: to find the directory
which directory. the one that the user was currently in...
Can you elaborate your problem?
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
I just want to navigate to a directory and make that diectory the CurrentDirectory.
Without selectin a file.
|
|
|
|
|
You want to use CFileDialog to browse to a folder but not select a file? How about using SHBrowseForFolder() instead?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Thanks, I used the SHBrowseForFolder.
But needed to set the current directory for the CFileDialog - this was never shown - files opened in the background.
CFileDialog dlg( !save, extension, NULL, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, filter );
dlg.m_ofn.lpstrInitialDir = path;
Many thanks,
Andy.
|
|
|
|
|
Just use the pidlRoot member of BROWSEINFO .
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hi All
I am new in programming of VC++.I have a fandamental concept of VC++ and C++.But i need to know which book is best for interview.
Plz suggest me.
|
|
|
|
|
rdop wrote:
I am new in programming of VC++.I have a fandamental concept of VC++ and C++.But i need to know which book is best for interview.
Test Your C++ Skills by Yashavant Kanetkar[^] is a good book for C++, if you want to prepare in interview point of view.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
rdop wrote: But i need to know which book is best for interview.
Is the interviewer expecting you to have working knowledge or just book knowldge?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hello,
I have created a MFC application in Visual Studio 2005. I have added to my dialog based app a CListCtrl with View lvwReport. I add a pointer to this ctrl in header file:
CListCtrl* listView;
And I get the pointer at init dialog and insert columns:
this->listView = (CListCtrl*) GetDlgItem(LISTVIEW);
this->listView->InsertColumn(0, "Sıra No", LVCFMT_LEFT, 50);
this->listView->InsertColumn(1, "Dosya Adı", LVCFMT_LEFT, 170);
this->listView->InsertColumn(2, "Bağlantı", LVCFMT_LEFT, 320);
this->listView->InsertColumn(3, "Durum", LVCFMT_CENTER, 100);
this->listView->InsertColumn(4, "Dosya Şifresi", LVCFMT_LEFT, 130);
which is fine till now. I also added a textbox and a button in dialog.
When user enters something to dialog and clicks button. The text in textbox should be inserted to list control:
int r = this->listView->InsertItem(count, countStr.getBuffer());
When I started app in debug mode enter smt and clikc it it gives me an error:
<big>Unhandled exception at 0x275b9098 in dot.exe: 0xC0000005: Access violation reading location 0x00000050.</big>
and shows a line in afxwin2.inl file:
_AFXWIN_INLINE LRESULT CWnd::_AFX_FUNCNAME(SendMessage)(UINT message, WPARAM wParam, LPARAM lParam)<br />
{ ASSERT(::IsWindow(m_hWnd)); return ::SendMessage(m_hWnd, message, wParam, lParam); }
Seems like I am not creating smt. What am I missing in here
|
|
|
|
|
Why don't you instead associate a member variable with the control through the resource editor ?
dehseth wrote: countStr.getBuffer()
Yurk, never ever call GetBuffer without having read the documentation ! You don't need to call GetBuffer because CString provides cast operators. Calling GetBuffer will only bring you troubles.
|
|
|
|
|
It is not CString I am using in there. And that's not the problem. I wrote a constant string still fails..
I guess the problem is initializing something...
|
|
|
|
|
That was just a remark. I asked a question first which is more important: why are you using your list control this way ? Why not simply associate a member variable with the list control through the resource editor ?
|
|
|
|
|
Well I have added member variable by right clicking on the CList control. Wizard just added control variable in .h file:
public:
CView list;
And added DDX Control code in .cpp file:
DDX_Control(pDX, LISTVIEW, list);
But I got these errors during compile:
1. error C2259: 'CView' : cannot instantiate abstract class <br />
2. error C2248: 'CView::CView' : cannot access protected member declared in class 'CView'<br />
3. error C2259: 'CView' : cannot instantiate abstract class
Well I changed the CView type to CListCtrl. The application compiled successfully but when I tried to add an item it gives me this error:
Unhandled exception at 0x275b9098 in dot.exe: 0xC0000005: Access violation reading location 0x00000050.
and shows file afxcrit.h at line:
LeaveCriticalSection(&_afxResourceLock[nLockType]);
I guess the previous problem still remains...
One more thing application also crashes at the same point when I click column header (it does not contain any data)
modified on Wednesday, September 3, 2008 6:54 AM
|
|
|
|
|
I think you are doing a big mess with your code . If MFC associated a CView object, then it means you did something completely wrong.
Ok, start everything over: put a list control where you want with the resource editor (and remove what you did earlier). Then right click on it and select 'Add Variable'. Then in the dialog that appear, leave the 'Control variable' check marked and insert the name in 'Variable name'. Finally click ok. This should add a CListCtrl variable in your class that you can then use.
|
|
|
|
|
Yeap you are right. I found the problem. I added MS ListView version 6.0 activeX control and did not add any related lib. So I removed that control and added another version of listView now it is working.
Thank you very much for your replies.
Now I need to solve other problems... Learning Visual C++ seems like never ends
|
|
|
|