|
I have recently found that at least in my enviroment I cannot arbitrarly find a color that looks ok on my development machine and count that it will even show (other than black or white) on other machines the application is installed on.
I had been just defining a color with the RGB function:
CBrush PageBg;
PageBg.CreateSolidBrush(RGB(255,200,200));
When I do the above, the color may or may not map to anything but black or white.
I am using Chris Maunders ColourPopup and since it is also using defined colors via the RGB funciton, the base choices it shows are often only showing up as black and white.
I have modified this so the user can set ther own colors via a dialog box and then these are read each time the application starts.
CBrush PageBg;
PageBg.CreateSolidBrush(clrSheet);
This is fine for user customization, how ever it really is not how I want the inital exposure to the application to be. If this does not look right go try something and here is a dialog box to see what works
I would appreciate any comments (suggestions or pointers) on how does one set basic colors that they can count on being displayable.
How likely is it that the machines do not have the correct video drives for the cards installed. I know the general approach here is to use some stock setup disk images that are copied to the machines prior to delivery and I do not know how much updating is being done based on the actual hardware. Or am I to quick to pass the problem with this question? I still have to find a solution for my problem in any case.
Thanks Mike
Michael A Barnhart
mabtech@swbell.net
|
|
|
|
|
all i can think is that some users are running in crappy color modes ... some companies tech guys let the machines run in god awful modes (256 colors or worse) so check that first ... the app i'm working on uses hi-color buttons on the toolbar and other bits and it generally looks ok on a 256 color mode but on less it looks godawful
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
The modes is not the issue. I have verified several machines and all are at least "True Color" 16 bit.
Thanks,
Michael A Barnhart
mabtech@swbell.net
|
|
|
|
|
errr ... what kind of status you looking for?
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
hmmmm
i dont know for sure about this ... think about it ... an app goes funny and sits in an endless loop ... how would the system know it wasn't doing something it meant to do ... i can only guess that you would attach a hook dll to its main window and peek its message queue ... if it didn't process any for a given time period you could assume it wasn't responding ... god knows what that time out would be but i guess maybe 10 or 15 seconds would be a fair start
if there's a better way i'd like to know too
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
ID: Q231844
They suggest using SendMessageTimeout() and if it times out you know it is not
responding.
Stephen Kellett
|
|
|
|
|
Hello,
I was wondering if anyone knows of a way to get some kind of system id from a PC. I've looked at:
- GetVolumeInformation to get the hard-drive serial number but this is often the same if drives are ghosted from the same image.
- Netbios to get the MAC Address of the Ethernet Adapter. The problem is that Microsoft says that this "does not work reliably on Windows 95 or Windows 98".
Thanks,
Raed
|
|
|
|
|
How to write a WIN NT Service using MFC which will execute an application at bootup time?.
|
|
|
|
|
Hi ,
ODBC drivers Microsoft ODBC driver for Oracle or Oracle ODBC driver , which is best?
Thanks,
Kannan.A.
|
|
|
|
|
Anyone can tell me how i can compare the caption of string table element with a CString??
Thanks
|
|
|
|
|
Guess you could load the caption of the string resource into another CString with CString::LoadString(UINT nID) and go from there.
|
|
|
|
|
Hi,
I'm desperately seeking for a link where all DLL's are listed, installed by the Windows Installer.
Hope u can help me.
--
Alex Marbus
|
|
|
|
|
Hmmm...
On NT, in the Winnt\repair dir, there is a hidden setup.log file that might be useful if you're trying to see what windows itself has accumulated.
You'll have to weed through a lot of other files to find the dlls. I think there might be a reader utility somewhere - shouldn't be hard to write. Basically an .ini file with path, name, and checksum of installed files in the [Files.Winnt] section.
Also look for "Active Setup.log" on both NT and w2k.
|
|
|
|
|
i coded an application using hook events but when I trace events in debug mode, only the events sent by this application are catched!! The application doesn't catch others events from windows!!
My hook functions are in a dll, I don't understand!!
|
|
|
|
|
Hi
Anyone can tell me how i can grayed a Menu.
The problem is i don't have the ID
How can i do that.
Thanks
|
|
|
|
|
I look for a code sample using SetWineventHook() and SetWindowsEvent(). I've already samples from MSDN... Thanks!
|
|
|
|
|
hi,
Win2k protects the system files by detecting changes and replacing changed files from a cache. I see that there are ways to disable this feature. But is there a way to just disable this feature for one single file insted of all system files ?
thanks
karthik
ps: reason being inetinfo dlls stack size is set to 40000 , but some of my dlls need a stack size of 100000 ,so I want to change the stack size of this dll alone. win2k will not allow me to use this modified dll.
|
|
|
|
|
ummm ... i cant help wondering why such a huge stack is necessary ... is there a particular reason you don't want to allocate some memory or a memory mapped file?
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
In this software business there are times when you cant control what is already there, there are portions of code written years ago and no one knows a thing about it. you need to make things work first and then go do your research.
" This is what i call a "smart as*" syndrome, some one asks a question and the return is a wise as* question!"
|
|
|
|
|
hmmmmm
i know what u mean ... no offence taken ... i just get real nervous recompiling a system file as it will change with the next release or any other software that gets installed and uses the same file ... i would rather try to make the existing dll use a different stack or do the research and figure it out now ... it will prolly take no longer than farting around with the system files
imho
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
If you plan to distribute this, it would be against your EULA. You're not allowed to modify system DLL's.
Further, I can't help but think there has to be a different solution to the problem.
|
|
|
|
|
Is this simplified picture of message pumping correct?
1. The user clicks a mouse button.
2. The mouse driver puts an item into the system input queue.
3. A system thread, which handles user input, retrieves this item and, using
coordinates recorded by the driver, determines to which window this message
should be posted. Mouse messages are always sent to the window under the
cursor (unless another window has captured mouse input).
Given the window handle the system detemines the thread to which this window
belongs and posts WM_LBUTTONDOWN and WM_LBUTTONUP messages to the
message queue of this thread. Note, the message is posted to only one message
queue since the system knowns to which thread the window belongs.
4. The application object, derived from CWinApp, will pickup the message from its thread message queue. Then route this message to the appropriate controls/windows.
5. Button window procedure receives WM_LBUTTONUP message and do the following:
(i) update the display of the button (depressed state and then the release state.)
//QUESTION: SendMessage( ) OR PostMessage( )??
(ii) sends WM_COMMAND/BN_CLICKED notification to "the parent window" or a "particular" control.
(iii) posts WM_COMMAND/BN_CLICKED notification to the application/thread message queue.
5. Message map can be "expanded" to a subroutine that searches the message map upon reciept of a message/notification, then route the message to "appropriate" message handler in response a mapped message.
(This brings up the issue of message routing. ie. Things like searching the view class maps, then the document class, then the frame windows, then the app...)
//Example of a handler:
void CMyDlg::OnButton1()
{
// TODO: Add your control notification handler code here
}
Thanks
|
|
|
|
|
Can anyone explain why this template does not work with signed types?
template<class t=""> T IsolateBits(T x, int bit1, int bit2)
{
T v=0;
for(int b=0; b < bit2-bit1; b++)
{
v = (v << 1) | 0x01;
}
for(int b2=0; b2 < bit1; b2++)
{
v = (v << 1);
}
return (x & v);
}
Basically, the template is supposed to change all bits out of range bit1-bit2 to 0's...and it works perfectly unless the class inputed is signed. Any suggestions on how to fix this?
--Jesse
|
|
|
|
|
Your code won't work as a C function either.....I believe the high bit in signed integers is "latched" and will be rotated into the next bit position following a rotation.
|
|
|
|
|
How is this done? Do you have a link to an example?
|
|
|
|