Salve a tutti.
Sto creando un programma in C++ che utilizza le librerie grafiche WxWidgets.
Ho trovato una libreria che implementa alcune funzioni che mi servono all'interno del mio programma. Tra queste funzioni, ce n'è una che richiede come argomento un oggetto di tipo HDC che credo sia un oggetto definito nelle Windows API, per disegnare un'immagine. Ecco la funzione:
codice:
void DrawBarcode(HDC hDC,int iX,int iY0,int iY10,int iY11,const COLORREF clrBar,const COLORREF clrSpace,const int iPenW)
Io sto utilizzando le librerie grafiche WxWidgets, ho creato un frame ed ho visto che esiste la funzione:
codice:
wxWindow::GetHandle
void* GetHandle() const
/*
Returns the platform-specific handle of the physical window.
Cast it to an appropriate handle, such as HWND for Windows, Widget for Motif, GtkWidget for GTK or WinHandle for PalmOS.
*/
Ho provato a fare una così:

codice:
HWND hwnd = (HWND) frame->GetHandle();
Ora, le mie domande sono queste:
1) E' corretto questo cast:
HWND hwnd = (HWND) frame->GetHandle();
tenendo conto che GetHandle ha questo prototipo:
void* GetHandle() const

2) Come uso l'oggetto di tipo HWND? E' possibile ottenere da questo un oggetto HDC?

Grazie mille, saluti