|
Hi Jeryth
You cannot redefine the meaning of an operator when applied to built-in data types. Your SUIT enum is nothing but an ordinary int. I think that this is your problem...
greets,
Jason
|
|
|
|
|
That's what I thought as well, enum s get referenced to as int s for boolean and conditional arguments. I'm not sure but I think .NET changed that. When I hadn't overloaded any operator I still got an error saying no operator existed that returned an appropriate type.
Always Fear the Man with Nothing to Lose
DragonFire Software
Jeryth
|
|
|
|
|
I have a dialog based app which is launching a process and then waiting for it to finish. The problem is that if I click on the parent window before the child process window displays then it seems to get the focus and is on top of the child window when it finally does display.
How can I make it so that child window will always be displayed on top of the launching app's window? regardless of mouse clicks or anything else the user might do
(I don't have access to the source code for the child process, so can't make any mods there)
|
|
|
|
|
Make your child dialog as modeless and then add the following codes in your child dialog initDialog handler
CRect rect;
GetWindowRect( rect );
::SetWindowPos(
m_hWnd ,
HWND_TOPMOST,
rect.left,
rect.top,
rect.Width(),
rect.Height(),
SWP_SHOWWINDOW
);
It basically set your child windows on top most in the z-order of the windows.
Hope this helps.
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
Hi,
I've been having a problem with CTabCtrls:
I've derived a class from CTabCtrl which will load in the setup of controls from a file and put them on to their respective tabs. The problem comes with tooltips, the controls are created ok, but the controls have no tooltips.
I've called EnableToolTips(TRUE) to enable tooltips (within the new class) and set up a message handler for the TTN_NEEDTEXT message, and the handler fills in the structure ok. If the controls are created on a dialog (without the CTabCtrl) the tooltips work ok, its' only if the controls are in the CTabCtrl that they don't work...
Any Ideas?
Thanks in advance.
Andy Vincent
andyvinc at hotmail dot com
|
|
|
|
|
Your CTabCtrl probably should route Mouse Messaeges to active control inside of it. You can do it in PreTranslate message handler for CTabCtrl if it's subclassed...
"...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..."
Me
|
|
|
|
|
Has anyone had any experience creating an XML editor (even a rudimentary one) from scratch? And I don't mean one of the 'editors' wherein a treeview is used and the text for each element is represented by a node. I'm not even concerned about parsing ability (I've already created a parser). I just wondered if anyone had come up with a good architecture that would allow one to identify the element in which the caret is currently positioned in a contiguous display of the whole instance's text.
Sorry if this isn't clear!
things could always be worse...
|
|
|
|
|
Yeah, I know this is probably a dumb question, but how do you create .lib files? I have some classes that I would like to convert to class libraries. Any help that would point me in the right direction would be appriciated. I tried searching around for it, but nothing useful. It seems like such a standard thing, but I can't find anything on it.
Thanks
|
|
|
|
|
If you run Visual Studio .NET 2002/2003, just choose a new project of type "Win32". Then select "static library" in the project wizard. You're ready to go.
--
The coolest game in the world: NHL Hockey[^]
|
|
|
|
|
Thanks. That was easy
|
|
|
|
|
You could do the same in Visual C++ 6.0 not just VS.NET
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
I have a sort of Service which resides in a dll. Whenever something happens in the system the functions from this DLL are called. Now my question is, i am trying to make a sort of control panel thing where i can set options that the DLL code will abide by, and when the control panel is closed these options will be saved. Also, the DLL code must be able to pass information to this control panel to display some status and other data. My question is, how can i let these communicate? Do i just use FindWindow() from the DLL code to get the window handle and access it that way? But i thought maybe this is too... heavy or whatever i should call it, like if the DLL functions are suddenly called a lot by the system then it would always do a findwindow first, wouldn't that slow things down too much? Anyways, i don't know. Thats why i'm asking
Thanks in advance
Kuniva
--------------------------------------------
|
|
|
|
|
Hello!
I have an edit control and a checkbox. The user can choose if the edit box displays only stars (= password box) or the plain text.
I tried this:
if(m_bStars == FALSE)
m_pEditPw.ModifyStyle(ES_PASSWORD, 0, 0);
else
m_pEditPw.ModifyStyle(0, ES_PASSWORD, 0); m_pEditPw is a CEdit and m_bStars is the bool flag of the checkbox. The function calls UpdateData(TRUE) before trying to change the edit box style. I checked the m_bStars variable, it gets updated correctly each click.
But unfortunately the box doesn't change. It always shows plaintext, the ModifyStyle function doesn't seem to work? I tried a RedrawWindow after the modify, but it doesn't change anything.
What am I doing wrong?
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)
|
|
|
|
|
You use the EM_SETPASSWORDCHAR message to change the password style. However, I tried this a few days ago and it doesn't appear to work right on XP (search for my post in this forum)
--Mike--
Ericahist [updated Oct 26] | CP SearchBar v2.0.2 | Homepage | RightClick-Encrypt | 1ClickPicGrabber
There is a saying in statistics that a million monkeys pounding on typewriters would eventually create a work of Shakespeare. Thanks to the Internet, we now know that this is not true.
|
|
|
|
|
Ok, I found the thread.
Thank you
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)
|
|
|
|
|
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.
|
|
|
|