|
According to MSDN CEdit::SetPasswordChar(0) will cause an edit control with the ES_PASSWORD style to display plain text.
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
Thanks, it works now.
Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
Hi,
Am trying to implement the Customdraw notification on a CListCtrl within a form-based application. Every time I try to compile I get this...
__________________________________________________________________________________
Linking...
PunchView.obj : error LNK2001: unresolved external symbol "public: void __thiscall CPunchView::OnCustomdrawList(struct tagNMHDR *,long *)" (?OnCustomdrawList@CPunchView@@QAEXPAUtagNMHDR@@PAJ@Z)
Debug/Punch.exe : fatal error LNK1120: 1 unresolved externals
___________________________________________________________________________________
The demo files I'm working on from the "Neat Stuff to do in List Controls Using Custom Draw" article on this site compile just fine. I know I must be missing something simple - I just don't know what!!
Any help much appreciated,
Simon
|
|
|
|
|
Add the cpp file that contain this function, or if the function comes with dll, add the lib file into your project.
In FileView, click right button on YourProject Files and select Add Files to project.
alexs
|
|
|
|
|
Thanks Alexs,
Your advice helped me solve the problem: the function was in the file but not declared as a member function.
Thanks for taking the trouble to help me.
Simon
|
|
|
|
|
Hi,
i have two dialog boxes, how do i access a member variable of one dialog box from the other one.The first one is closed using EndDialog and the next dialog box is made to pop up using DoModal();
Thanks
Deepak Samuel.
|
|
|
|
|
Dialog A should have a pointer to dialog B. In dialog B, provide accessor/mutator methods to manipulate its members. Then do something like this in dialog A.
ASSERT (pDialogB != NULL);
int foo = pDialogB->getFoo();
...
pDialogB->setFoo (foo);
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Hi,
How can I develop an Active X control, dialog based with some MFC controls (CEdit, CButton, CStatic) and some Active X controls (extern).
In the Wizzard, I just make an active x control wich subclass BUTTON or STATIC or SCROLL, but I want to integrate many controls.
thank you.
alexs
|
|
|
|
|
Hi,
I use the ofstream.write (......) function in my code to generate log files from Ethernet traffic. Everything works fine but if I "Stop" my application, the last data is not being sent to the log file but will remain buffered somehow and show up in the log only after I use the close() method.
To prevent that I used the flush() method when I "stop" my application (before closing the files)
My question is,
Is there a way to force the ofstream to automatically flush the buffer to the file whenever I specify the write function?
Thanks,
Shay
|
|
|
|
|
I all, I developped an application that use cmschart to draw some chart. on my pc it's work fine (I have,of corse, ms visual studio installed) I try to install my application on a win xp home pc. I registred my ocx using regsvr32.exe but when I run my application I receive an error: winocc.cpp line 345.
there are some dll that I forget?
Anyone could help me!?
Thanx.
|
|
|
|
|
It looks like the control can't be created - perhaps the OCX been deleted/moved from the problem machine?
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
I have an HP DesignJet 5500PS which has WEB pages built into the printer that lets the user control setup and view job status, material status, etc. Having never done any HTML or WEB design or access work in the pass I would like to access the different WEB pages from a program not just to view but to also acquire different fields of information and maybe even change fields from a program.
I have taken the source code (HTMLCTRL) provide on a number of different sources an implemented a dialog where I can view the WEB pages but now I want to actually access some of the data on those WEB pages. Remember I can’t change any of the printers WEB pages, only the code I write. So if anyone can give me some direction as to “how to” I would appreciate it.
NO .NET or VB Please, just Windows, C++ and MFC
Many thanks in advance
Tony Teveris
Gerber Scientific Products
Senior Software Engineer
Phone: 860 648 8151
Fax: 860 648 8214
83 Gerber Road West
South Windsor, CT 06074
|
|
|
|
|
|
I had a problem a while back using STL. I had some code that used the old fashion CTypedArray etc. and I included some STL code. I started getting all sorts of conflicts with <fstream.h> and <fstream>. The new STL code used namespace std and the others did not use a namespaces. There were significant differences between the old fstream.h and the templated one. How do you resolve this with a one or two line configuration?
J.
----------------------------
|
|
|
|
|
Post a specific example of the code and what you want to accomplish.
Kuphryn
|
|
|
|
|
I don' have no code suh'. If I did it would fill the message buffer on CP pretty darn quick. Think big big project.
My question is: What is it in namespaces or use of STL in general that would cause conflict with the use of old fashion <fstream.h>. I tried replacing all the <fstream.h>'s with <fstream> (the STL version) There are some differences in the member functions, I tried to scope the namespace properly and it still didn't work.
J.
----------------------------
|
|
|
|
|
|
Hi,
Can someone explain me or has a class for a small ComboBox ?
I would like to have a ComboBox with a little Edit Box, a small button, a small scroll button,...
Like in these exemples :
http://www.codeproject.com/listctrl/xlistctrl.asp
http://www.codeproject.com/docking/ToolbarWithCombo.asp
I tried to understand these prog, but can't understand !
(Sorry, I'm just a student !)
Thanks a lot.
Cynicannibal
|
|
|
|
|
The height of the button on a combo box (and the minimum height of the box as a whole) is determined by the size of the font used to draw text in the comb. Change the font to a smaller one & you get a smaller combo box.
A servant to formulaic ways.
Shog9
|
|
|
|
|
thanks,
wow, it seems so easy !!!
but I've tried and don't know how to do that.
I've done :
CFont f;
f.CreatePointFont(80,"Arial");
m_cbTest.SetFont(&f);
But it doesn't work.
Can you help me again ?
Phil
|
|
|
|
|
Two things - first, make sure the CFont object is a member variable of your dialog class, not a local variable (else it'll be deleted when it goes out of scope). Second, an 80pt Arial font is probably large enough you won't notice the change... Besides, you probably aren't sizing your controls in points anyway. Try this, adjust as necessary:
m_font.CreateFont(-8,0,0,0,0,0,0,0,0,0,0,0,0,"Arial");
This will create a font with a total height of 8 pixels - the combo box will be slightly larger because of borders and such.
A servant to formulaic ways.
Shog9
|
|
|
|
|
k, it works, thanks.
Cynicannibal
|
|
|
|
|
Hi, I need some help, I'm trying to make a function that fills the length of some string with 0 at left, the function receives two parameters, the string, and the desired length, but when I compile it, appears an error, the error C2440 cannot convert from 'class CString' to 'int'
-------------------------------------
Here is my function:
CSValidating::fill(CString a, int b)<br />
{<br />
CString filled;<br />
filled = a;<br />
while (filled.GetLength() < b)<br />
filled = "0" + filled;<br />
<br />
return filled;<br />
}
--------------------------------------
I would appreciatte if someone can help me to solve this error...
thnxz
|
|
|
|
|
Try declaring retuned value as CString or CString&
|
|
|
|
|
ponshio wrote:
CSValidating::fill(CString a, int b)
should read something like:
CString CSValidating::fill(CString a, int b)
C++ functions return int by default if you don't specify the return type, so the conversion error is referring to the return filled;
I would suggest that you can improve on that algorithm somewhat too - the hint is that CString has a constructor that can take a character ('0' ) and a number (something like b - filled.GetLength() ) indicating how many times to repeat it
--
Ian Darling
"The moral of the story is that with a contrived example, you can prove anything." - Joel Spolsky
|
|
|
|