|
Hi,
In my project i have to initially display the data from database and also i have to provide the facility to the user to change the value. I have done it in onitdialog message handler where the recordset operations have already handled.
i compiled it successfully but while running i got the assertion saying that
assertion in .exe file
File:afxcmn.inl
line:375
plz help me.
Thanks in advance.
tejaswini
|
|
|
|
|
Can you please make it a little more clear what exactly you did in OnInitDialog() ?
|
|
|
|
|
BOOL CCmpDataEntryDlg::OnInitDialog() //CmpDataEntryDlg is my propertysheet
{
m_SpinDropRate.SetRange(5,19); //to set the range for spin control
m_pSet = new CCampaignSet(); //this is my recordset
if(!m_pSet->IsOpen())
{
CWaitCursor wait;
m_pSet->Open();
}
CPropertyPage::OnInitDialog();
UpdateData(FALSE);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
|
|
|
|
|
tejaswini.g wrote: CPropertyPage::OnInitDialog();
This statement must be called first (otherwise the controls do not get created).
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Thnak u very much
Tejaswini
|
|
|
|
|
Hi all,
I want to Print the Document in Specified Document. I am unable to Decide the Margin's while Printing. Please Help me out.
//===========================================================================
CPrintdlg print(FALSE,PD_AllPages,this);
if(print.DoModel()== IDOK)
{
CDC dcPrint;
dcPrint.Attach(print.GetPrinterDC();
DOCINFO doc; // Setting the Printer Documents....
if(dcPrint.StartDoc(&doc > 0)
{
dcPrint.StartPage();
int x,y;
x = GetDeviceCaps(...); //x,y Cooridinates for Printer.
y = GetDeviceCaps(...);
dc.print(xloc,yloc,"Text"); //----> I have doubt here.
//---> How to Set the Margin for the Page Here.
dcPrint.EndPage();
}
}
UDAY
|
|
|
|
|
As I know:
1) there is no idea to get margin info of a printer.
2) margins can not be adjusted by VC applications.
it is very strange that same printer may have different margins if printed by different PCs.
---- You may ask for another thing?
-- modified at 7:16 Thursday 13th July, 2006
|
|
|
|
|
hi,
TO set Margings mean how to calculate the space it top,left,bottom,right while priting. which is done in VC++ application.
I want to Calcualte the Margin in VC++ only not in Priter.
You understand.
Thanks
uday.
|
|
|
|
|
hi
tell me about WM_COMMAND function in mfc with example or code
to clear my concept
Ashish Dogra
MCA
Noida
|
|
|
|
|
The WM_COMMAND message is sent when the user selects a command item from a menu, when a control sends a notification message to its parent window, or when an accelerator keystroke is translated.
|
|
|
|
|
And here's an extension to the above post
From DOCS
wParam
The high-order word specifies the notification code if the message is from a control. If the message is from an accelerator, this value is 1. If the message is from a menu, this value is zero.
The low-order word specifies the identifier of the menu item, control, or accelerator.
lParam
Handle to the control sending the message if the message is from a control. Otherwise, this parameter is NULL.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
-- modified at 5:54 Thursday 13th July, 2006
|
|
|
|
|
Did you saw MSDN.
From the MSDN
"This message is sent when the user selects a command item from a menu, when a control sends a message to its parent window, or when an accelerator keystroke is translated."
whitesky
|
|
|
|
|
|
Hi toxcct,
its not problem do you konw why?i think he is lucky because he and you and programers are here and
he find his answer when he has a question he write his question here
whatever this question is clear or not clear but when i start to learn VC i dont have any resource
(teacher or website or anything) except MSDN
"Viens,laissons l'Avenir; laissons nos chagrins fous
Jouissons du present fugitif et si doux!"(Khayyam)
whitesky
|
|
|
|
|
actually, it's always easy to ask valuable people who know the answer to your question. but hey, the minimum he can do he search a bit by itself, googling, searching the msdn... and only then, ask the forum. people sometimes seems so lazy
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
of course you right before ask a question he can search then he asks
I agree with you
whitesky
|
|
|
|
|
Except he obviously was too lazy because simply typing WM_COMMAND (no need even for site:msdn.microsoft.com) into google brings up the relevant information.
earl
|
|
|
|
|
CP is not MSDN. There topics need some explanation. The first resource to get informatio is MSDN. if it's not clear (rare chance) or something not included, that can be asked here. Most of the MSDN entries regarding Win32 and MFC contains sample snippet.
WM_COMMAND from MSDN[^]
About Messages[^]
SaRath.
"Where I am from, there is no plan B. So, take advantage of today becuase tomorrow is not promised. - 50 Cent"
My Blog | Understanding State Patte
|
|
|
|
|
Hi All .
I need to know that DCOM is faster for data Communication between 2 computer or Socket Programming.
Thanks .
-- modified at 7:20 Thursday 13th July, 2006
|
|
|
|
|
sockets (almost) every time, DCOM is not very fast (obviously DCOM can use sockets as it's transmission layer)
but like anything else, it depends on the implementaion, a badly written sockets layer could run slower than DCOM
Darka [Xanya]
|
|
|
|
|
sockets make you write most of the protocol stack yourself, giving you more chances to screw it up. With a good implementation they can be faster.
earl
|
|
|
|
|
Hi friends,
Given a lib file, Is there any way to identify whether the lib is Static or Dynamic one ??
Thanks in advance.
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
libs are not be classifed as static or dynamic, the dlls are classifed as static or dynamic.
a dll can be used dynamically as well as statically, it depends on how the host exe file has been compiled and linked.
if you use depends.exe to view the dependency of the host exe file and if you see the dll under question in the dependency list then it means that that dll was statically linked to the host exe file.
And if you dont see it then the dll is dynamically used.
ofcource you should be sure that the host exe file is using the dll in the first place.
-Prakash
|
|
|
|
|
Mr.Prakash wrote: libs are not be classifed as static or dynamic
but they do often require linkage to either the static or the dynamic C/C++ runtime libs. that is, you can't use a lib built for use with the static CRT in an app built for use with the dynamic CRT - you'll get many link errors.
it's possible that's what the OP is asking about...
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
to clarify, when i said libs i was refering to .lib files.
.lib files are always linked to get either .exe file or .dll file or any other type of executable binary ouput.
-Prakash
|
|
|
|