|
Have you specified the ES_MULTILINE style?
|
|
|
|
|
Yeah, thats the first thing I checked.
Matt
|
|
|
|
|
|
Hi,
when i use the "Dependency Walker" to see list of exported function in a .DLL file,i find some functions that have "W" and "A" letters at the end of their name.what is the meaning of these leters?
for example in Shell32.dll we have
GetModuleFileNameExA
GetModuleFileNameExW
Regards.
|
|
|
|
|
A = Multibyte
W = Widechar (UNICODE)
|
|
|
|
|
Is it possible to change colors of system brushes (COLOR_WINDOW,COLOR_3DFACE and so on) for current task only? SetSysColors() makes it for whole system.
|
|
|
|
|
i don't think you can do that. If you are coding a project and you want to isolate the colors that i would suggest you use a global function that does something like.
COLORREF MyGetSysColor( int nIndex )
{
COLORREF clr = 0;
switch( nIndex )
{
case COLOR_WINDOW:
clr = RGB( 255,0,255 );
break;
case COLOR_3DFACE:
clr = RGB( 239, 130, 0 );
break;
default:
clr = ::GetSysColor( nIndex );
break;
};
return clr;
}
Thats probably the best you're going to get away with, that is without changing the entire system's color scheme.
Joseph Dempsey
joseph_r_dempsey@yahoo.com
"Software Engineering is a race between the programmers, trying to make bigger and better fool-proof software, and the universe trying to make bigger fools. So far the Universe in winning."
--anonymous
|
|
|
|
|
I have a dialog based application and when I click a button a modeless dialog appears (Well, it just doesn't appear, I create it). The parent of the modeless dialog is the main dialog. Let's call this modeless dialog Child1. Then I create another modeless dialog Child2 and its parent is Child1. If I close Child2 and then Child1 and if I have other windows on the desktop (other applications running) the main dialog window looses focus and hides behind the other applications' windows. However, if I don't create Child2 and I close Child1 the main Dialog remains on top of the other windows. Yes I could try to use BringWindowToTop or set the z order, but I would like to understand this behaviour.
// Afterall I realized that even my comment lines have bugs
|
|
|
|
|
Toni78 wrote:
If I close Child2 and then Child1 and if I have other windows on the desktop (other applications running) the main dialog window looses focus and hides behind the other applications' windows.
Does this happen even if no other windows are open?
|
|
|
|
|
DavidCrow wrote:
Toni78 wrote:
If I close Child2 and then Child1 and if I have other windows on the desktop (other applications running) the main dialog window looses focus and hides behind the other applications' windows.
Does this happen even if no other windows are open?
Yes it does. I mean it just looses focus but it can't hide anywhere.
// Afterall I realized that even my comment lines have bugs
|
|
|
|
|
This is a MFC Bug. Check out Nish article here on CP about that (look for Nishant S).
What happens is that the dialog looses modality, and therefor its "stay on top" feature.
~RaGE();
|
|
|
|
|
|
Thank you RaGE for your help. I looked at the article and it seems to talk about modal dialogs and mine are modeless but nevertheless I didn't really read it carefully so I will have to go back and read it for real this time. Anyways, it is a great help and I am sure that that if I use my brain more efficiently I will find the answer in the article.
// Afterall I realized that even my comment lines have bugs
|
|
|
|
|
I"m wondering if anyone knows how to make it so VC++ will read in a text document, then create a check box off of Keywords in that document.
Then when the check boxes are checked it will output another text document with the corralating data to that keyword.
any suggestions??
Thanks
James
|
|
|
|
|
You want the VC++ IDE to do this, or you want a program written in VC++ to do this? Big difference! If the former, I have no idea. If the latter, can you provide some more details (e.g., what design you currently have, what you've tried so far)?
|
|
|
|
|
David,
I'm trying to do this in just plain VC++, I"m currently using version 6.0,
only because this is all I've been supplied with so far. As for what I've
done already, I can honestly say nothing that has produced any successful
results. I'm basically just learning how to use VC++ right now. Any help
would be great. Thanks
James
|
|
|
|
|
You successfully danced around my questions! What exactly are you trying to accomplish?
|
|
|
|
|
Sorry about that. What I'm trying to accomplish is taking a text document, importing it into VC++ then based off of key words create check boxes that will pull data corralated with that word. For example, if I take the speed of a processor chip at 1.8volts and 2.0V, the the text it might say something like
Fmax @ 1.8V 800mhz
Fmax @ 2.0V 1000mhz
I want two check boxes to show up that say Fmax @1.8V and Fmax@ 2.0V, then if I click both of these boxes, I get a new text document that says 1.8v 800, 2.0v 1000.
|
|
|
|
|
Based on that description, you can create the checkboxes at design-time, and simply change their labels once the necessary data has been read from the file. To change a control's caption, use SetWindowText().
|
|
|
|
|
Create a CCheckListBox control and add the items as they appear in the text file. That way, you never need more space than the listbox initially occupies, no matter how many items you add to the list.
------- signature starts
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
Please review the Legal Disclaimer in my bio.
------- signature ends
|
|
|
|
|
Yes it is the correct place to ask this question. I'm sorry I am too busy to provide an answer though.
John
|
|
|
|
|
Why don't you start here:
http://www.codeproject.com/file/CDataFile.asp[^]
jhaga
CodeProject House, Paul Watson wrote:
...and the roar of John Simmons own personal Nascar in the garage. Meg flitting about taking photos.Chris having an heated arguement with Colin Davies and .S.Rod. over egian values. Nish manically typing *censur*. Duncan racing around after his pet *c.* Michael Martin and Bryce loudly yelling *c.* C.G. having a fit as Roger Wright loads up *c.* . Anna waving her *c.* and Deb scoffing chocolates in the corner.
...Good heavens!
|
|
|
|
|
Hi,
What should I do if I want to prevent my mainframe to become too small when I'm resizing so that it could not be smaller than 600x400 for exemple?
I tried it by catching WM_SIZE and WN_SIZING but I cannot use to make it work.
void CMainFrame::OnSize(UINT nType, int cx, int cy)
{
if(cx < 600) cx = 600;
if(cy < 400) cy = 400;
CMDIFrameWnd::OnSize(nType, cx, cy);
}
Any Ideas?
thanks
Everything's beautiful if you look at it long enough...
|
|
|
|
|
void CMainFrame::OnGetMinMaxInfo( MINMAXINFO FAR *lpMMI )
{
lpMMI->ptMaxSize.x = 640;
lpMMI->ptMaxSize.y = 480;
lpMMI->ptMinTrackSize.x = 640;
lpMMI->ptMinTrackSize.y = 480;
CFrameWnd::OnGetMinMaxInfo(lpMMI);
}
|
|
|
|
|
just call the base class before doing your adjustments...
(WM_GETMINMAXINFO is called to retrieve the limits)
void CMainFrame::OnGetMinMaxInfo( MINMAXINFO FAR *lpMMI )
{
CFrameWnd::OnGetMinMaxInfo(lpMMI);
lpMMI->ptMaxSize.x = 640;
lpMMI->ptMaxSize.y = 480;
lpMMI->ptMinTrackSize.x = 640;
lpMMI->ptMinTrackSize.y = 480;
}
"Der Geist des Kriegers ist erwacht / Ich hab die Macht" StS
sighist | Agile Programming | doxygen
|
|
|
|