|
This is a little off-topic from your question and is a design issue instead, but why don't you use dropdown listboxes for city and state? Then you wouldn't have to deal with a second dialog.
|
|
|
|
|
Welp, i use the dialog in multiple places, and i haven't taken the time to figure out how to place a propertypage into a static frame inside of a dialog.. basicly i need to reuse this state/city picker in a few different dialogs for different reasons.. but it would be nice if it was just listed there.. maybe in a future version
-dz
|
|
|
|
|
Welp, i use the dialog in multiple places, and i haven't taken the time to figure out how to place a propertypage into a static frame inside of a dialog (although ive seen it done in SPAPrefs on CP).. basicly i need to reuse this state/city picker (which does use dropdown listboxes) in a few different dialogs for different reasons.. but it would be nice if it was just listed there.. maybe in a future version
-dz
|
|
|
|
|
dazinith wrote:
so is it ok to do this?
Yes it is ok to do that.
dazinith wrote:
and if so does that mean that UpdateData is pointless, or is it just not possible to use in this situation?
No you could have set a boolean and checked it in your DoDataExchange and used its value to bypass the data validation routines. UpdateData is not pointless it saves you from having to get, set and validate the dialog data yourself. I usually have several conditionals and some GetWindowText() and SetWindowText() in the DoDataExchange() and call UpdateData(TRUE) and UpdateData(FALSE) several times in my complex dialogs.
John
|
|
|
|
|
Hello, I'm using VC++v6.
When I'm debugging, I cannot view any variable values in the watch window when I step through e.g.
NAME m_PathName
VALUE CXX0017:Error: symbol "m_PathName" not found
The variable is in scope and initialised, and i'm definately in debug mode. My variables window is also empty. I have used them successfully before but I can't figure out why not now.
Can anybody help, thanks,
John
|
|
|
|
|
Make sure you have the "Debug info" option switched on. If that doesn't work, exit VC++, delete all .ncb, .opt, .plg, .pch and .pdb files in your project and try again.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hi,
I was wondering how could I dynamically add an item to a menu (or how to add a menu dynamically).
I appreciate your help.
Thanks.
|
|
|
|
|
Hi,
I believe the MSDN library discs have a sample called DYNAMENU that shows how to dynamically add items to a menu.
Hope that helps,
Lan
|
|
|
|
|
Use CMenu::InsertMenu
Best regards,
Alexandru Savescu
|
|
|
|
|
Use InsertMenu()
BOOL InsertMenu(
HMENU hMenu, // handle to menu
UINT uPosition, // item that new item precedes
UINT uFlags, // options
UINT_PTR uIDNewItem, // identifier, menu, or submenu
LPCTSTR lpNewItem // menu item content
);
|
|
|
|
|
How can I send EMails from an MFC Project without MAPI functionality and without Doc/View Architecture???
Please send me some source Code!!!!!
|
|
|
|
|
Check this article:
CCmc v1.0 - A CMC Implementation
Mazy
"The more I search, the more my need
For you,
The more I bless, the more I bleed
For you."The Outlaw Torn-Metallica
|
|
|
|
|
Why, Mazy, you disobeyed the order to Send Source Code!!!! If he'd wanted a link, he would've asked you to Post Article Link!!!
|
|
|
|
|
Ed Gadziemski wrote:
Why, Mazy, you disobeyed the order to Send Source Code!!!! If he'd wanted a link, he would've asked you to Post Article Link!!!
Hey this is very common way in answering questions. Many times people don't ask foe link but after that when somebody give them some link they become glad for it.So why should I disobey.
|
|
|
|
|
That was a joke. You see, the person who wrote "Send Source Code!!!!" was making demands on CP members as if he were King or President. Similar to "You must do this. I command you." So, the joke was that you did not give him what he commanded. Sorry if I was not clear.
|
|
|
|
|
I create a ListBox in a Dialog dynamically!I want to capture
the message LBN_SELCHANGE of the control ListBox,I create it like this:
m_ListBox.Create (WS_CHILD|WS_VISIBLE,rc,this,IDC_LIST_BOX);//CListBox m_ListBox
And I use the following code to check if the dialog capture
the message:
LRESULT CMyDlg::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
if(message==LBN_SELCHANGE)
{
AfxMessageBox ("LBN_SELCHANGE");
}
return CDialog::WindowProc(message, wParam, lParam);
}
But to my surprise,I found that it can capture the mesage only once,it occured at the begin of the program.after that ,it can't be captured.
How can solve the problem!
Thank you!
Don't look at me in that way!
|
|
|
|
|
How can I write text and draw lines in a MS Word Application from an MFC Project without DOC/VIEW Architecture???
Please send me some source code!!!!
|
|
|
|
|
I THINK there is an article in CP about MS Word Application.Search this site.
Mazy
"The more I search, the more my need
For you,
The more I bless, the more I bleed
For you."The Outlaw Torn-Metallica
|
|
|
|
|
Do you know how should i test if a directory exists in the file system, or a file?
Is that an article on CP regarding this subject?
rechi
|
|
|
|
|
#include <io.h>
if (_access(dir, 0)==0)
then it exists
-c
Cheap oil. It's worth it!
|
|
|
|
|
is this a better method that using CFindFile? does the _access function verify the user has access to the path as well, instead of just that it exists?
-dz
|
|
|
|
|
with mode 0, _access only checks for existence. other modes can test for read/write access.
-c
Cheap oil. It's worth it!
|
|
|
|
|
Or: if( ::GetFileAttributes( pszFSpec ) == FILE_ATTRIBUTE_DIRECTORY ) ...
Neville Franks, Author of ED for Windows. www.getsoft.com
|
|
|
|
|
heres what i use..
BOOL CCommonFunctions::DirectoryExists(CString strPath)
{
CFileFind finder;
if (strPath.Right(1) != "\\")
strPath += _T("\\");
strPath += _T("*.");
BOOL bWorking = finder.FindFile(strPath);
if (!bWorking)
return FALSE;
finder.Close();
return TRUE;
} use it by saying:
if (!CCommonFunctions::DirectoryExists("C:\\Temp\\")
AfxMessageBox("ERROR!");
and for files..
BOOL CCommonFunctions::FileExists(CString strFilename)
{
CFileFind ff;
BOOL result = ff.FindFile(strFilename);
if (!result)
return false;
ff.Close();
return true;
} use it by saying:
if (!CComonFunctions::FileExists("C:\\test.txt")
AfxMessageBox("ERROR!"); that should help.. if someone has a better written function let me know..
-dz
|
|
|
|
|
I have a strange problem:
Because we need to run a process under another account (for COM+ rolebased security). To do so, we create a little startup application that displays a dialog where the user can enter its credentials. Then it uses the API call
CreateProcessWithLogonW to startup the real app. After this, our help does not work anymore. We use Windows 2000/XP with HTML help.
Does anyone have an idea?
Thanks,
Remon
|
|
|
|