Tomasz, I've already tried that but it has led me nowhere. If you use spy++ on it there is nothing there. It recieves no messages, has no window, etc. The creation for each of the six windows is the same except for the coordinates and a different id. I do not understand why it would stop working after the 3rd instance of that CPanel class. I stepped through the Creation of the window and everyhting seems normal.It is a window and has a valid handle. Its just when the windows finally get painted there is nothing there. I am really lost here.....but thank you. Nice screensaver BTW Regards, Eric "DWORD my man!"
eric kaminski
Posts
-
Difficulties with dynamically created dialogs -
Difficulties with dynamically created dialogsHey all, First off i'll try and give you as much background wihtout dragging on too much. I wanted to create a custom I/O control for one of my applications. Basically it looks like an altimeter. It has an analog dial, an led section and a buttons section. Still with me? So i wrote a CPanel Class that allows the end user to either create an input or an output control by using some functions to change its behavior. Now I need six of these bad boys on the screen at once. This control is graphic intensive(lots of bitmaps) and it sucks GDI resources down by a sizeable amount but we are still in the green. Now when i use the Create(..) functions to get 6 of these on the screen, at first it looks like i get them however, just playing with the control elements tells you otherwise. I get 3 of my controls that function normally and then I get 3 "ghost images" of my control. These ghost images are basically like a bitmap of what the control should be but they are not active. They dont respond to any input, they dont show up in the tab order..they are essentially not there. This is driving me nuts...any ideas? All six panels are sharing the same resources.CPanel is comprised of 3 other dialogs. CLedPanel, CDisplay1 and CDisplay2. CDisplay1 and CDisplay2 are switched based on what mode oyu are in. Ony one will be displayed at a time. I know this is a shot in the dark but i had to try thanks for any input you may have :confused: "DWORD my man!"
-
Are there performance issues(resource or otherwise) in using CStatic controls to display bitmaps?hey guys, Is there a performance issue in using a CStatic::SetBitmap() to display Bitmaps? I mean it is so much easier that messing around with device contexts ans BitBlt's. I suspect there is a penalty because life is never easy. BTW, I am having massive resource issues using this method for displaying a lot of bitmaps. Am i correct in assuming this? thanx for any input you may have :confused: "DWORD my man!"
-
Is it possible to make a BitmapButton from a user defined region?Hey guys, Once again I need your help. I am desiging this funky gui control that requires me to create this odd region for buttons. Basically take a square and superimpose a circle in the center offset from the borders of the suare by 5 pixels. Got a vague picture in your head? Ok now with that picture in your head, think of the space left at each of the 4 corners...there are my button regions that i created. Now my next hurdle is to overlay a bitmap over that region. Any ideas on how i could do it? It has to be possible. Thank you for any input :confused: "DWORD my man!"
-
Need Help with using CString to read string registry keysJim thank you for all your help and effort. I took your advice and used a good old character array and my problem magically went away. Lol, it is still bugging me though as to why that debug assertion ig getting thrown...lol i'll play around with it once i meet my deadline. Thank You once again! :-D "DWORD my man!"
-
Need Help with using CString to read string registry keysHey guys, I'm new to using MFC and to programming in general. I'm having great difficulty with Using CString to read off reg_sz values from the registry. I keep getting this Debug assertion after i leave the function i have these registry reads in Program: MyApp File: dbgheap.c Line:1011 Expression:_CrltsValidHeapPinter(pUserData) exception 03h in my MyApp.exe heres the function snippet: DWORD dwType =0, dwSize=256; ......... ....... float ftemp; for(int i=0; i<6 ;i++) { //open key ...... RegQueryValueEx(tempKey,"Label", NULL, &dwType,(BYTE*) RegRead.GetBuffer(256), &dwSize); RegRead.ReleaseBuffer(); //convert string to float value ftemp=atof(LPCTSTR(RegRead)); m_sClass->Function(i,ftemp,value); ....... m_sClass->Function1(i,ftemp,value,value2); } Once i leave the function this loop is contained in, the compiler throws that degug assertion. If i remove all references to this operation i dont get the assertion. Therefore i assume im using CString wrong somehow. Am i? What is the proper way to make the registry read then? Background: I am trying to retrieve a float value i wrote to the registry as a REG_SZ and then use it. This may be a stupid question but it's not to someone new at this. I appreciate any help :confused: "DWORD my man!"