|
Hi everybody,
is there an easy way to change the window caption font for modal or modeless dialog boxes?
I just want to change the font and want MFC to do the rest of the work, like drawing the text and
the min/max buttons etc..
TIA, Chris
|
|
|
|
|
There is code either on this site, or on www.codeguru.com (yuk!) that you could talor to your needs. Some change the background colour, and others allow more than one line of text. It's time for me to go home so I'm afraid you'll have to look for the articles yourself!
HTH
Jerry
|
|
|
|
|
No, there is no way to change the caption font and allow Windows or MFC to do the rest of the work for you.
There are, however, several classes available here and at codeguru to do this, to make it easier to implement.
|
|
|
|
|
Hi,
Can U hide the Scrollbars of a CTreeCtrl object? Help me.
Thanks in advance.
Ngo Khai Hoa
|
|
|
|
|
Add TVS_NOSCROLL style to the CTreeCtrl Object.
It is that simple.
Sundaravalli Shriram
Tektronix Engineering Development India Ltd,
Bangalore - 560001,
India.
|
|
|
|
|
Can anyone help me find information how make a view wityh look like outlook todaypage.
This view is like a html page.
thanks
|
|
|
|
|
It's not "like" an HTML page. It *IS* an HTML page.
|
|
|
|
|
Is there a method to export registry settings just like the one i used in regedit.exe? If yes, how to export programmatically?
Thanks all
|
|
|
|
|
visit http://zmanagers.chat.ru
you can find there Registry.cpp in sources.
I wrote there a function which makes this task.
Mike.
|
|
|
|
|
How can I create a virtual disk at RAM, and the disk should write all the contents to the physical disk file.
Any help are appreciate.
|
|
|
|
|
Hello all,
I recently wrote a security program with MFC that configured registry policies. The problem is that a script kiddie using a disassembler went right past my security measures by simply skipping to the place in the code that was past my password protected section. Is there a good way to protect against disassembers?
--Tale
|
|
|
|
|
If your security check is in code like this:
if ( !ShoudILetTheProgramRun() )
{ // show messages saying the app won't run
// and then exit
}
Then it's trivial to bypass. Don't make the security check that painfully obvious.
--Mike--
http://home.inreach.com/mdunn/
"That probably would've sounded more commanding if I wasn't wearing my yummy sushi pajamas."
-- Buffy
|
|
|
|
|
Could you be a little more descriptive in your solution. I'm not familiar with disassemblers, so I really don't know what the weakness in my program is.
The way I'm checking for proper users is by reading an encrypted password from the registry and comparing it with what they supplied. If they are equal, I call the method to let them into the protected area. What are you suggesting I change?
--Tale
|
|
|
|
|
You'll have problems if you save password in the registry when OS needs to be reloaded. The password should be OS independent.
I collect 3 numbers from the environment:
1- Bios date
2- HD serial no
3- Program folder creation min+sec+milisec
They make up *almost* uniqe password.
Disassemblying is a different subject!
|
|
|
|
|
Could somebody give me a legitmate answer? The two posts here so far have been pretty useless to me. Sorry guys, but it's true. I felt that I explained it pretty well in my last post, so if you could answer it I would appreciate it. Here is what I wrote:
Could you be a little more descriptive in your solution. I'm not familiar with disassemblers, so I really don't know what the weakness in my program is.
The way I'm checking for proper users is by reading an encrypted password from the registry and comparing it with what they supplied. If they are equal, I call the method to let them into the protected area. What are you suggesting I change to make my program less suspectable to disassemblers?
--Tale
|
|
|
|
|
Look, there's almost nothing you can do about this. When it boils down to it. If the computer can read your assembly, so can a cracker. If the cracker can't, then neither can the computer.
All you can do is make it more difficult to find. put lots of code in there that does nothing and leads the cracker on false paths. Hide the code inside some other function, make it rely on a side-effect of the function, and don't just check the value of a memory location and exit. Go do a bunch of other stuff for no particular reason and exit somewhere unexpected.
That's all you can do.
|
|
|
|
|
This is probably a stupid question:
Is there a Windows SDK function that I can use to get a list of the contents of a directory? Oddly enough I haven't been able to find a method to do this....
Please Help,
Thanks
jon-k2001@home.com
|
|
|
|
|
FindFirstFile() and FindNextFile() will do it.
--Mike--
http://home.inreach.com/mdunn/
"That probably would've sounded more commanding if I wasn't wearing my yummy sushi pajamas."
-- Buffy
|
|
|
|
|
|
OK, here's my problem. I'm trying to get the width of the toolbars in pixels. So, supposedly, I write code in this fashion to get their rects:
CRect rectTB1;
CRect rectTB2;
m_tool1.GetWindowRect(&rectTB1);
m_tool2.GetWindowRect(&rectTB2);
int m_iTBTopWidth = rectTB1.Width() + rectTB2.Width();
So, I should have it made to compute the sum of both toolbar width. Unfortunately, both Width() came out to be 472, even though one of the toolbars is about 1/5 the size of the other. What am I doing wrong here?
Frank
|
|
|
|
|
I write a SDI application which based on CListView
and a worker thread.
The problem I have,when the thread returns the values to Listview, I can't update the ListView.
Please advise,
Sue
|
|
|
|
|
I have a single line CTabCtrl, and I am custom drawing everything. I need a way to find out if the user has scrolled the tabs to the left or the right (if there are enough), and which tab is the first shown in this case, so I can start drawing from the correct tab.
How can I do this? I was unable to find an example on this site or Codeguru, or anywhere else.
Yours,
David Wulff
|
|
|
|
|
TCN_SELCHANGING notification message any use?
of CTabCtrl::GetCurSel()
Just ideas
Stephen Kellett
|
|
|
|
|
I tried using GetCurSel() but it returns the selection from zero, rather than from the first visible tab. I don't see how handling TCN_SELCHANGING will aloow me to do anything different.
Thanks for the suggestions,
David Wulff
|
|
|
|
|
Hi ALL !!
please help me,
when i create CScrollView without CDocument in my ActiveX control
i had error and debug crash !!!
"Invalid Address specified to RtlValidateHeap"
m_clsGridView.Create(NULL, NULL, AFX_WS_DEFAULT_VIEW,
m_clsClientRect, this, AFX_IDW_PANE_FIRST + 1, NULL);
What not so ?
|
|
|
|