|
Thank You very much
It works a treat.
|
|
|
|
|
Hi,
I have a text editor (CHtmlEditView) with a current font selection combobox on the toolbar so that the user can change the font type.
However when the cursor is placed on a row with different font than the current selection in the combobox, the combobox must be programmatically updated.
All this works fine except that the focus stays with the updated combo. In this case a second click is necessery to get back the cursor to the desired position ( after the first click the focus goes to the combo) and this might be annoying to the user.
I tried calling SetFocus on the mainframe but this does not place the cursor back to its previous position.
Please help!
R.
|
|
|
|
|
Hello, was anyone successful in adding a spin control to a ListCtrl? I only see people adding drop-down boxes or the standard edit controls, but I need a spin control (or a scroll bar, whatever). I'd appreciate any help on this.
Thank you in advance,
Dennis
MCP, MCSD
|
|
|
|
|
Hi
I'm trying to draw a line and two small circle at both end of that line. When I zoom in, I want only the lenght of the line to be extended and the circle size to be the same. But what happen was the circle size also increase. Anyone know how to fix that circle size even when zooming?
Thanks.
Newbies
|
|
|
|
|
make the circle size inversely proportional to your zoom level
-c
For men use, if they have an evil turn, to write it in marble:
and whoso doth us a good turn we write it in dust.
-- Sir Thomas More
|
|
|
|
|
Thanks! very good solution.
Newbies
|
|
|
|
|
I want to add icons to a CImageList from a precompiled DLL, such as shell32.dll or a dll I compiled myself. I will know the index of the icon. Anyone know how I can do this? I don't want to have to compile the icons into the app so I can easliy update the icons.
- Matt Newman / Windows XP Activist
-Sonork ID: 100.11179
"You can't seriously believe that you could get away with suing someone over quoting text from a message posted in a public forum, can you?" - John Simmons
|
|
|
|
|
Try with ExtractIconEx or LoadLibraryEx with LOAD_LIBRARY_AS_DATAFILE flag.
Tomasz Sowinski -- http://www.shooltz.com
Free your mind and your ass will follow.
|
|
|
|
|
Thanks, ExtractIconEx worked perfectly
- Matt Newman / Windows XP Activist
-Sonork ID: 100.11179
"You can't seriously believe that you could get away with suing someone over quoting text from a message posted in a public forum, can you?" - John Simmons
|
|
|
|
|
I'd use ExtractIconEx
Regards,
Brian Dela
|
|
|
|
|
Thanks for the advice.
- Matt Newman / Windows XP Activist
-Sonork ID: 100.11179
"You can't seriously believe that you could get away with suing someone over quoting text from a message posted in a public forum, can you?" - John Simmons
|
|
|
|
|
Matt Newman wrote:
Thanks for the advice.
No hassel
Regards,
Brian Dela
|
|
|
|
|
The easiest way (AFAIK) is to use ExtractIconEx() . However, this will not let you specify the color depth or dimensions of the device image you wish to load (other than the system-defined large and small sizes), so if you're using non-standard sizes (i.e. for toolbar buttons) then my next suggestion would be using LoadLibrary() and LoadImage() .
Shog9
|
|
|
|
|
Thanks fro the advice!
- Matt Newman / Windows XP Activist
-Sonork ID: 100.11179
"You can't seriously believe that you could get away with suing someone over quoting text from a message posted in a public forum, can you?" - John Simmons
|
|
|
|
|
Hi,
I am writing a DLL for a game engine, and I want to include the option to disable task-switching while the game is being played. In other words, I want to disable:
alt-tab
ctrl-alt-delete
ctrl-esc
(The main reason for this is that graphics drivers bugs tend to show up after task switching, and also I am using a file packer that can be cracked quite easily if you can task-switch.)
My question is, what is the best way to go about this? I have seen a lot of stuff about using SystemParametersInfo and SPI_SCREENSAVERRUNNING, but this unfortunately only works on Win95/98/Me, and I want my DLL to work on all platforms. I have seen some code about low-level keyboard hooks for NT too, but so far I have unable to get any of this working properly (I have Win Me myself).
If anybody could give me some suggestions/pointers or just tell me the simplest or most effective way of doing this, I would be very grateful.
Many thanks,
KB
|
|
|
|
|
|
dont forget ctrl+shift+esc, and all the predefined windows keys (win+e ...)
int x=1, y=5;
x^=y^=x^=y;
<a href="http://www.codeproject.com/tips/StupidXORTrick.asp" target="_blank">ClickHereForHelp();</a>
|
|
|
|
|
I've got 2 applications that load the same dll. The 2 instances of the dll communicate with each other using shared memory.
#pragma data_seg(".shared")<br />
...<br />
#pragma data_seg()
But this only works for base types like integers and doubles. What I would like to have is a shared linked-list, containing a list of objects. Those objects have the basic linked list members (*prev, *next) and an extra char* for the name.
In fact, a linked list is not required, it can be a vector too, or another type ...
What's the best way to do this?
What classes or typelibrary would I have to use?
stl?
[VISUAL STUDIO 6.0] [MFC] [WIN98/2]
Bluute tette!
|
|
|
|
|
From Visual C++ help:
However, if you need to share a C++ class instance, you should use a memory-mapped file, because each time a process attaches to the DLL, the constructor for the object is called. For example:
#pragma data_seg(".myseg")
_declspec(dllexport) CTest Counter1(0);
_declspec(dllexport) short Counter2 = 0;
#pragma data_seg()
Assume that the variables Counter1 and Counter2 are incremented in a function in the DLL. The value of Counter2 increases as expected, but on each process attach, the constructor for Counter1 is called reinitializing it to zero. In order to share Counter1, you must use a memory-mapped file. For more information about memory-mapped files, see File Mapping in the Win32 SDK documentation.
I guess you could use data_seg with pointer to linked list, but this would introduce problems with different heaps each dll instance uses.
[edit]
Disregard the idea with pointer - it would have no meaning, since actual object would live in address space of one process. Seems that going with File Mapping is only choice.
Tomasz Sowinski -- http://www.shooltz.com
Free your mind and your ass will follow.
|
|
|
|
|
File mapping, that's it allright
I hope that's not too buggy, that ms lib.
tnx!
[VISUAL STUDIO 6.0] [MFC] [WIN98/2]
Bluute tette!
|
|
|
|
|
Grote Smurf (aka frisco) wrote:
I hope that's not too buggy, that ms lib
File mapping is a feature implemented at OS level - so it's hardly a 'lib'
Tomasz Sowinski -- http://www.shooltz.com
Free your mind and your ass will follow.
|
|
|
|
|
So, it's really "core"-gates stuff? I'm already having a breakdown ...
[VISUAL STUDIO 6.0] [MFC] [WIN98/2]
Bluute tette!
|
|
|
|
|
|
Almost finished ...
It's not so hard cause I don't need to syncronise between processes. One process writes and another reads. While one process writes, the read processes can be disposed without further action.
With syncronisation, that's another pair of sleeves
[VISUAL STUDIO 6.0] [MFC] [WIN98/2]
Bluute tette!
|
|
|
|
|
Hello,
I need to include instructions of compiling different kinds of files to others. I have all those compilers on my computer, but how can I tell my makefile or visual studio where they are. I know I could put the path in front of the compiler name, but the problem is that some of those use preprocessors and those I don't call myself.
-Janetta
|
|
|
|