|
mbatra31 wrote: For a computer with smaller screen size, it will not be properly visible. That's rather obvious. You should always check the Window, Client or Screen size depending on where you want your controls positioned.
|
|
|
|
|
Hi,
Its done..! Issue was with the positioning only.
Thanx for the help.
Regards,
Mbatra
|
|
|
|
|
From what Richard replied, and re-reading your message, I guess you have a button, and a picture control on your dialog, and they overlap.
What you need is a button which shows its own picture. You can attach an icon to the button from the resource editor, or you can use one of the many picture button controls available here:
http://www.codeproject.com/KB/buttons/[^]
Iain.
I am one of "those foreigners coming over here and stealing our jobs". Yay me!
|
|
|
|
|
Hi Iain,
I have a button and a bitmap. I am using CSkinButton class to set normal & hover state bitmaps on the button. I want to position the button on the right of the screen (similar to "feedback" button we normally see on various websites.) Now my computer screen size is larger, So when I position the buttons on the right side according to my computer screen size, its ok , but if I use this exe on some other computer which has a smaller screen size, button are not visible properly.
I want to place the buttons in the middle-right of the screen.
Regards,
Mbatra
|
|
|
|
|
Just position it somewhere where the controls don't overlap. You can have overlapping controls but it's really not worth the hassle. By the way, you can always get the size and position of your other control and do some math to figure out the proper placement of the button under it (if you're creating the controls at run-time).
|
|
|
|
|
I find that if the UI thread is block. it will be blocked when call CListCtrl::GetItemCount().
I want to know how the MFC low level to achieve this function?
If I use the MsgWaitForMultiObjects to block UI thread. How to set the QS_ALLINPUTS?
|
|
|
|
|
I'm not sure if I understand you correctly.
But you can see how wait functions work here - Halt! Who Goes There?[^]
|
|
|
|
|
Low level of MFC is the Win32 API. Open the context menu by right clicking on a call to CListCtrl::GetItemCount() and choose 'Go to definition'. You will see that it is an inline function that sends the LVM_GETITEMCOUNT message to the list control window. This message is not processed while your GUI thread is blocked.
A general rule is: Never block GUI threads. If you have to wait for events, do this in worker threads.
|
|
|
|
|
Hi Jochen Arndt,
You are very nice. But why I cannot see the source code of CListCtrl::GetItemCount()?
My develop tools is visual studio 2008.
|
|
|
|
|
I don't know why. You may also place the cursor on the call and press F12. With VS 2003 here, the MFC CListCtrl::GetItemCount() code is located in the VC subdirectory atlmfc\include\afxcmn.inl.
I suggested to look on the MFC sources so that you can see that most functions will only (or besides other tasks) just send messages.
If you don't have used the 'Go to definition' feature so far, give it a try. It is very useful. Not only for MFC functions, but also for your own ones to quickly see the source.
|
|
|
|
|
Thank you Jochen Arndt
I search the visual studio installed folder, and then find this file. It's greatly thing to see the MFC controls source.
|
|
|
|
|
plz i want a code that detect if an image is RGB or not
|
|
|
|
|
|
Hi All,
Can any one help me out to work on zlib compression.
Thanks in advance!
|
|
|
|
|
Start here[^], and study the documentation.
|
|
|
|
|
This question is both vague and applicable to that very specific library. Why don't you read the manual and come back with more specific questions?
|
|
|
|
|
hi every one ...
i have written com dll i want to debug the dll i dont how to do it .
please reply
Best Regards
sarfaraz
|
|
|
|
|
hi every one ...
i have written com dll i want to debug the dll i dont how to do it .
please reply
Best Regards
sarfaraz
|
|
|
|
|
1) Write a exe program that uses your COM.
2) Launch the exe.
3) Open your COM Project is Visual Studio
4) Attach the already running exe with the Project.
5) Keep the break points and start debugging it.
|
|
|
|
|
see am not able to understand the 4th step.
attach in the sense by changing the configuration properties in that debugging and then
command and passing the path of the exe. if this the way then its control not coming to break point or i may be wrong to the exe ....
Best Regards
Sarfaraz
|
|
|
|
|
You can debug your code by loading the DLL directly into your application rather than using it in registered mode: see the CoLoadLibrary function[^].
|
|
|
|
|
hi ,thanks ...
one more thing i want to ask how to register the dll .
am getting the error message that DLL has loaded but entry point DllRegisterserver was not found ...
but am wtritten the code for it
AFX_MANAGE_STATE(AfxGetStaticModuleState( ));
HRESULT hr = RegisterServer (AfxGetInstanceHandle(), CLSID_CCmpnt, g_szFriendlyName, g_szVerIndProgID, g_szVerDndProgID);
return hr;
its in a function name STDAPI DllRegisterServer(void)
the control not coming in this function what might be cause please reply
Best Regards
Sarfaraz
|
|
|
|
|
|
STDAPI DllRegisterServer(void) this i used
in this only i written the code
|
|
|
|
|
Used where? Please show the actual declaration. Also make sure that you are exporting this correctly in your build.
|
|
|
|