|
In addition to Joaquín's suggestion, you may also want to look at ExtractAssociatedIcon documentation.
Roger Stewart
"I Owe, I Owe, it's off to work I go..."
|
|
|
|
|
I have a dialog app that uses timers. It updates fine at first, but then after running for a while it some times doesn't draw all the objects that are on the page. Also, the drop down arrows becomes 6s and some of the buttons just completely disappear. I thought there maybe the system was too busy, but I?ve looked and there is lots of idle time.
Anybody have any clues as to why this is happening? I?m hoping I don?t have to take over drawing each and every object, but if I have to how?
Thanks all!
|
|
|
|
|
Almost surely you're leaking GDI objects (could be fonts, DCs, brushes, etc.) Follow this trail.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I really haven't done anything with DC or painting or really any kind of handling of drawing.
One think though...I'm using ButtonST from this site...any problems with that?
HELP!!!!!!
|
|
|
|
|
I don't think it is CButtonST , which seems a thoroughly tried control. What exactly are you doing in your OnTimer ? If the code for this handler is short enough maybe you could post it here.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
This is one of the smaller timers that I use. Most of the timers are like this one with the exception that they have many more items to check.
if(nIDEvent == 1122)
{
for(short i = Temp_RX; i<(Perm_DR+1); i++)
{
m_mcontrol[i].m_MouseOnButton = iControlstatus[i];
m_mcontrol[i].Invalidate(TRUE);
m_mcontrol[i].UpdateWindow();
}
}
Thanks for the help, much appriciated.
|
|
|
|
|
This is weird! To make sure the problem does not lie in CButtonST , you might want to replace it (for testing purposes) with standard CButton (you'll have also to comment out the code specifically related to CButtonST ). If the error persists, the problem is elsewhere.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hello
I'm trying to run a program from inside my program. I thought that createprocess would be the best way to go. But i'm having a hard time trying to figure it out please help
|
|
|
|
|
try this:
STARTUPINFO siInfo;
PROCESS_INFORMATION piInfo;
siInfo.cb = sizeof(STARTUPINFO);
siInfo.lpReserved = 0;
siInfo.lpDesktop = NULL;
siInfo.lpTitle = NULL;
siInfo.dwFlags = STARTF_USESHOWWINDOW;
siInfo.cbReserved2 = 0;
siInfo.lpReserved2 = NULL;
CreateProcess("F:\\path\\program.exe", "", NULL, NULL, false, NORMAL_PRIORITY_CLASS, NULL, "F:\\path\\", &siInfo, &piInfo);
|
|
|
|
|
thank you i'll try it. what include statements do i need to show
Richard
|
|
|
|
|
Have you ever tryed:
WinExec ("CMD.EXE /C PROGRAM_NAME.EXE",SW_SHOW);
Much easier
|
|
|
|
|
Sorry if i have bothered you so much, but i'm in deep thought on how to change the cursor when the mouse pointer is on a button or on a notified picture...
here's a part of my code ...
case WM_SETCURSOR:
{
HWND hwndStaticw = (HWND) lParam;
if (hwndStaticw = GetDlgItem(hwnd, IDC_WL))
{
SetCursor(LoadCursor(hInstance, MAKEINTRESOURCE(IDC_CURSOR1)));
break;
}
}
return TRUE;
where IDC_WL is the notified picture,
What am i doing wrong... i thing a lot! Please Help...
I'm trying to be calm....
|
|
|
|
|
Where is this code implemented?
Seems like are you assuming that lParam holds a handle to the control below the cursor and, if my mind serves me right, this is not how this message works..
eperales
|
|
|
|
|
Hello ,
I want to create an application similar to the VC++ Dialog Editor.
Can anyone please point me the location of it.
Thanks in advance
Cheers
|
|
|
|
|
|
Hi
I would like to know how can I enable printing options in my application.
It basically has to print a BMP file and bunch of lines on it.
thanks
Ehsan Behboudi
|
|
|
|
|
|
Hello
i'd like to add a feature to my viewer, that if it is ran with a parameter, and the app is already running that it would not run another time but it would send an param to the 1st one. I have no idea how to make it, and i could not find any article about it.
Something like IE when you click on jpg files, all of them open in one window instead of opening a new one for each pic.
thank you in advance
mirex
|
|
|
|
|
|
Hi,
I draw a rectangle in my ownerdraw control. I need to fill it with the current background, a brush I guess (it's for resizing or ungly paint artifacts can stay on my dialog). How would I clear area with current background? ....I already have my DC and and the client rectangle.
CBrush brBackground(??????);
dc.FillRect(pRect, &brBackground);
Thx
|
|
|
|
|
Use the WS_EX_TRANSPARENT style for your control. It will make sure that all of the controls below yours gets painted first.
Then you will need to override your WM_ERASEBKGND message to not do anything. Simply return TRUE in the handler for this function. Then in your paint routine, do what you wanted to do on the control.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
I have written a program that works great with Windows XP. A friend of mine tried it on Windows ME and nothing worked, from static controls, list box scroll bars, etc. Should I be concerned that I will have the same problems on Windows 95/98/2000 or should I put my confidence in that Windows ME is the worst windows ever and is to blame for everything.
|
|
|
|
|
I think your program has huge bugs. Test it on at least some 9x platform and w2k/NT4.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Are you saying that it has huge bugs due to the above mentioned, or you have actually tried it and are basing your conclusions as such? I am on my way to test it, see ya later!
|
|
|
|
|
There is no reason to believe that the problem is being caused by ME. That is just wishful thinking. In general, there is no reason to ever believe a problem is caused by the operating system. It does no good to start a debugging process with that attitude. It is always best to assume it is your software. Only after you have proof that it is an operating system problem, should you even venture down that path.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|