Which Windows API in C++ will help me in identifying which Dialog Class the Current ComboBox is using?

  • Thread starter Thread starter yans7936
  • Start date Start date
Y

yans7936

Guest
I am Having a Desktop Windows Application Written in C++. Currently, I am running that application in Windows 10 and I can see few of the COmbo Boxes are not displaying the items properly. I noticed that our application is using a different kind of Dialog Classes for Different Windows. We are using CDialog, CdialogEx, and Dialogxyz(This is an in-house one and it's non-MFC). I have a function related to DropDown and inside this function, one of my tasks will be I need to retrieve information about what Dialog Class the Current DropDown is using. Based on that Info I need to decide how I am going to draw or set certain ComboBox features. So my question is, is there any Windows API which can retrieve which Dialog the ComboBox is using? A code snippet below will give a better understanding. I will really appreciate if you can enlighten me at the earliest. - Thnaks, Yan


====Snippet====

Combo_DoSomeManipulation( HWND hldg , int n )

{

/*"hldg" is the handler of the Current ComBobox and this is the only relevant information I have in this function */

LPTSTR lpClassName;

int nMaxCount = 256;

GetClassName(hldg , lpClassName , _count_of(nMaxCount));

/*This will assign "CComboBox" as value in lpClassName */

Similarly as above is there any Windows API which I can use where can pass the "hdlg" as parameter and get the Dialog Class Name used by the ComBoBox ? something like

GetDialogClass(hldg) ??



}


I want to use the Name of the Dialog Class used by the ComboBox for further programmatic uses, where depending on the DIalog Class I want to do specific things to that ComboBox.

Continue reading...
 
Back
Top