|
Hello, I have a property sheet that I want to check whether a specific page is Active or not. How can I get IDD of associated dialog resource in a property page I tried following code but GetDlgCtrlID() fails (returns 0). By the way I don't think it is important but anyway the property sheet is embedded in a CFormView
<br />
int nID = pDoc->m_sheetProperty.GetActivePage()->GetDlgCtrlID();<br />
if(nID == IDD_INTERESTING)
{<br />
...<br />
<br />
}<br />
thanks
|
|
|
|
|
Why does your CPropertySheet object belong to the document class rather than the view class?
Electronic75 wrote: )//nID is always zero
As it probably should be. GetDlgCtrlID() is for returning the ID of controls on dialog boxes or property pages.
I've never known it necessary to query a dialog box's ID. In any case, I'd be more inclined to compare the return value of GetActivePage() with the class objects associated with the various pages. For example:
CPropertyPage *p = pDoc->m_sheetProperty.GetActivePage();
if (p->IsKindOf(RUNTIME_CLASS(CMyOtherPage)))
...
else if (p->IsKindOf(RUNTIME_CLASS(CTheLastPage)))
...
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi David, Well it is a MDI application that I did bizarre things to make it look nicer. eg. it has a property page embedded in a CFormView and even another CDocTemplate(Doc, View, Frame) embedded in one of the pages. It maybe bizarre but it looks good!
|
|
|
|
|
Hi,
I am trying to run my code in a different system, which is working on my system. But it gives me this error. I checked the path for afxhelp.hm...its correct and is fine...
Can anybody help me with this error please....
Here is the entire copied error message.............
*****************************************************************
Copying contents file...
1 file(s) copied.
Making help include file...
Making help file...
hlp\OperationTool.hpj(1) : error:
Microsoft (R) Help Compiler
HCRTF 4.03.0002
Copyright (c) Microsoft Corp 1990 - 1995. All rights reserved.
operationtool.hpj
HC3037: Warning: D:\Sridhar\Official\NGN\NGN_3\kcj\ngn\OperationTool\hlp\OperationTool.hm :
The map value for "HIDD_SYSTEMCONFIGURATION" is the same as the map value for "HIDR_CSMENU".
HC3037: Warning: D:\Sridhar\Official\NGN\NGN_3\kcj\ngn\OperationTool\hlp\OperationTool.hm :
The map value for "HIDD_SYSTEM_CONFIGURATION" is the same as the map value for "HIDR_CSMENU".
HC3037: Warning: D:\Sridhar\Official\NGN\NGN_3\kcj\ngn\OperationTool\hlp\OperationTool.hm :
The map value for "HIDD_CLIENT_CONFIGURATION" is the same as the map value for "HIDD_CONFIGURATION".
HC3037: Warning: D:\Sridhar\Official\NGN\NGN_3\kcj\ngn\OperationTool\hlp\OperationTool.hm :
The map value for "HIDD_CHANNELCONTROL" is the same as the map value for "HIDD_CHANNELPARAMETERS".
HC3037: Warning: D:\Sridhar\Official\NGN\NGN_3\kcj\ngn\OperationTool\hlp\OperationTool.hm :
The map value for "HIDD_CHANNEL_CONTROL_DIALOG" is the same as the map value for "HIDD_CHANNELPARAMETERS".
HC3037: Warning: D:\Sridhar\Official\NGN\NGN_3\kcj\ngn\OperationTool\hlp\OperationTool.hm :
The map value for "HIDD_RESEND_CONTROL_DIALOG" is the same as the map value for "HIDD_RESENDCONTROL".
HC3037: Warning: D:\Sridhar\Official\NGN\NGN_3\kcj\ngn\OperationTool\hlp\OperationTool.hm :
The map value for "HIDD_DATA_CONTROL_DIALOG" is the same as the map value for "HIDD_DATACONTROL".
HC3037: Warning: D:\Sridhar\Official\NGN\NGN_3\kcj\ngn\OperationTool\hlp\OperationTool.hm :
The map value for "HIDD_MAC_CONTROL_DIALOG" is the same as the map value for "HIDD_MACCONTROL".
HC3037: Warning: D:\Sridhar\Official\NGN\NGN_3\kcj\ngn\OperationTool\hlp\OperationTool.hm :
The map value for "HIDD_EVENT_LOGGER" is the same as the map value for "HIDD_LOGGER".
HC3037: Warning: D:\Sridhar\Official\NGN\NGN_3\kcj\ngn\OperationTool\hlp\OperationTool.hm :
The map value for "HIDD_CONNECTION_PREFERENCES_DIALOG" is the same as the map value for "HIDD_CONNECTION_PREFERENCES".
HC3037: Warning: D:\Sridhar\Official\NGN\NGN_3\kcj\ngn\OperationTool\hlp\OperationTool.hm :
The map value for "HIDD_CONFIGURATION_SETTINGS_DIALOG" is the same as the map value for "HIDD_CONNECTION_PREFERENCES".
HC1002: Note:
Using existing phrase table: OperationTool.ph.
HC3025: Warning: topic #1 of D:\Sridhar\Official\NGN\NGN_3\kcj\ngn\OperationTool\hlp\.\afxcore.rtf :
Jump to undefined Topic ID: "menu_record".
HC3025: Warning: topic #3 of D:\Sridhar\Official\NGN\NGN_3\kcj\ngn\OperationTool\hlp\.\afxcore.rtf :
Jump to undefined Topic ID: "HID_OLE_EDIT_LINKS".
HC3025: Warning: topic #3 of D:\Sridhar\Official\NGN\NGN_3\kcj\ngn\OperationTool\hlp\.\afxcore.rtf :
Jump to undefined Topic ID: "HID_EDIT_PASTE_LINK".
HC3025: Warning: topic #3 of D:\Sridhar\Official\NGN\NGN_3\kcj\ngn\OperationTool\hlp\.\afxcore.rtf :
Jump to undefined Topic ID: "HID_OLE_INSERT_NEW".
HC1010: Note:
The following mapped Topic IDs were not used in any topic:
AFX_HIDP_UNREG_DONE
HID_CONNECTION_CONNECT
HID_TOOLS_EMT_LOGSAVE_ON
HID_SYSTEM_USER_STATUS
HID_TOOLS_EMT_LOGSAVE_OFF
...// so on..i have removed them here
...
...
HID_CLOSE
HID_OTHERCONTROLS_DATACONTROL
72 Topics
48 Jumps
16 Keywords
21 Bitmaps
Created D:\Sridhar\Official\NGN\NGN_3\kcj\ngn\OperationTool\hlp\OperationTool.HLP, 38,928 bytes
Bitmaps: 5,348 bytes
Phrase+Zeck compression decreased help file by 13,866 bytes.
Compile time: 0 minutes, 0 seconds
2 notes, 15 warnings
Compiling resources...
Compiling...
StdAfx.cpp
Compiling...
Generating Code...
Linking...
OperationTool.exe - 1 error(s), 15 warning(s)
Please respond soon.
Thanks,
Sridhar
|
|
|
|
|
Hello all,
class A:
Function x
class B:
Function y
I have already declared object of class B in class A to access member function y of B.Now i have to access function x in class B.In fact i have to take the return value of one function of class
A and give it as input to one function of class B.Then mutally creating objects is giving errors,how to overcome the above problem.
Regards
|
|
|
|
|
Maynka wrote: I have already declared object of class B in class A to access member function y of B.Now i have to access function x in class B.In fact i have to take the return value of one function of class
A and give it as input to one function of class B.Then mutally creating objects is giving errors,how to overcome the above problem.
Why not show the actual class definitions? Your paraphrased version makes no sense.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Why dont you derive one class from another so you can use the function y from class A for example?
Have you declared pointers inside each class?
|
|
|
|
|
Hi..
are you including header files in both classes, i mean..
in A.h
#include "B.h"
and in B.h
#include "A.h"
if u give so definately u will get errors,
so include only in the first written class .
and in secondly written class just define the first class
class A;
try this hope it works..
|
|
|
|
|
Hai...
i am developing application like chat. In this i have added font styles like(bold,Italic,underline and size.) if i chose some of the styles and typing in my richeditbox so the respective styles font s are coming. now i want to send the text with same style fonts in chat history richedit box.
but now it is sending without styles only.
how to do that...
|
|
|
|
|
Here is how I am doing it.
In the header...
COLORREF m_lLogClr[4];
//In the constructor..
m_lLogClr[0] = RGB(0, 0, 0);<br />
m_lLogClr[1] = RGB(142, 35, 35);<br />
m_lLogClr[2] = RGB(218,165,32);<br />
m_lLogClr[3] = RGB(35,35,142);<br />
Finally...
<br />
<br />
VOID CLogDlg::PostLog(TCHAR *pBytes, int iClr, int iSize)<br />
{<br />
if(NULL != pBytes)<br />
{<br />
m_RichLogCtrl.HideSelection(TRUE, TRUE);<br />
int iLen= m_RichLogCtrl.GetWindowTextLength();<br />
m_RichLogCtrl.SetSel(iLen, iLen);<br />
<br />
CHARFORMAT cf = {0};<br />
cf.dwEffects |= CFE_BOLD;<br />
cf.dwEffects &= ~CFE_AUTOCOLOR;<br />
cf.cbSize = sizeof(CHARFORMAT);<br />
cf.dwMask = CFM_COLOR | CFM_FACE | CFM_SIZE | CFM_BOLD | CFM_CHARSET;<br />
cf.crTextColor = m_lLogClr[iClr];<br />
<br />
_tcscpy(cf.szFaceName, _T("MS Sans Serif"));<br />
cf.bPitchAndFamily = FF_SWISS;<br />
cf.yHeight = (iSize * 1440) / 72;<br />
<br />
m_RichLogCtrl.SetSelectionCharFormat(cf);<br />
m_RichLogCtrl.ReplaceSel(pBytes);<br />
m_RichLogCtrl.SetSel(iLen, iLen);<br />
m_RichLogCtrl.HideSelection(FALSE, TRUE);<br />
}<br />
}
|
|
|
|
|
Hi all,
I want to integrate Logging into my existing project.I want to generate a file in which i can log all the action data inside project.Is there any sample project which explains how to do this.
Regards,
|
|
|
|
|
Check this out.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi,
I have a dialog based application which was initially in C:\ drive. After running the project in C:\ drive for a couple of times, I made a copy of it in the D:\ drive and when I run open the project file in the D:\ drive (clicking on the .sln file) and if I put a break point in say the OnInitDialog() of a dialog class, when I run the project, this break point
automatically goes to the same function but to the project in the C:\ drive.
Also when I try to go to the declaration of any function by pressing F12 at the function definition, an resolve ambiguity dialog is shown and the function declarations of the project in C:\ and D:\ drive are listed. In the above mentioned scenario, files names of the project in the C:\ drive are
represented in lower case (tab name in the workspace)
How do i get over this issue?
I am using VS 2003 on XP.
|
|
|
|
|
Make sure that for every include in your source code, you supply relative paths and not absolute paths. Check that also for all the include directories if necessary in the project options.
|
|
|
|
|
Hi Cédric Moonen,
After reading your reply, I created a dialog based application using the Wizard(without adding any code) and the similar behaviour as described in my earlier post is observed.
Is there any setting in VS that I need to check for??
|
|
|
|
|
What do you mean ? So, you created a completely new dialog Based application on the D drive. When you put a breakpoint in one of your function, it points to a source file on the C drive ? That's impossible because you don't have a similar solution on your C drive
Could you explain clearly your problem ?
|
|
|
|
|
I create a project in the C:\ drive, run it once, then close the project.
Now make an extra copy the same project in the D:\ drive, then run this project in the D:\ drive. If I search for a string say OnInitDialog(), then in
my search result, I find that both the projects that in the C:\ and the D:\ are shown.
|
|
|
|
|
Hi all,
I'm looking for a function that can delete files by means of a wild card.
Is there such a functionIf so, can anyone please provide some more informationMany Thanks in advance
Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
I do not think that there is a standard Win32 API function do to that. You would need to enumerate items using the wildcard and then delete matching items one by one.
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
Thanks James, do you know wheter a standard command exists to perform my previous asked question over FTP.
Many Thanks
Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
Only Command found: DELE - Delete file.
But this won't do the job ... Thanks anyway James
Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
Use SHFileOperation() .
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi David, I have tried the following:
SHFILEOPSTRUCT wildcards;
wildcards.wFunc = FO_DELETE;
wildcards.hwnd=NULL;
wildcards.pFrom=(LPCTSTR)lpUpDownFiles[first].szUpFName;
wildcards.fFlags=FOF_FILESONLY;
SHFileOperation(wildcards);
But get the following error:
Error 7 error C2664: 'SHFileOperationA' : cannot convert parameter 1 from 'SHFILEOPSTRUCT' to 'LPSHFILEOPSTRUCTA'
Can you please help?
Many Thanks
Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
The compiler is telling you the problem. SHFileOperation() is expectnng a pointer (to a SHFILEOPSTRUCT ).
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|