windows - RegisterClassEx crashes - C++ -


i working windows library, i'm new it, i'm gettin error googled enough , don't know what's going on.

here code:

lresult callback wbwindow::st_wind_callback(hwnd hwnd, uint message, wparam wparam, lparam lparam) {  // code callback static function return 0; } wbwmresult wbwindow::create() { // put in class values our window class_window_instance.cbsize = sizeof(wndclassex); class_window_instance.lpfnwndproc=wbwindow::st_wind_callback; class_window_instance.lpszclassname = window_name; class_window_instance.style = null; class_window_instance.cbclsextra = 0; class_window_instance.cbwndextra = 0; class_window_instance.hbrbackground = (hbrush)(color_window+1); class_window_instance.hcursor = loadcursor(null, idc_arrow); class_window_instance.hicon = loadicon(null, idi_application); class_window_instance.hiconsm = loadicon(null, idi_application); class_window_instance.hinstance = main_instance; class_window_instance.lpszmenuname = null;  if(!registerclassex(&class_window_instance)){     messagebox(0,"there error registering window-classname.","critical error!",mb_iconstop | mb_ok);     return wbe_classreg; }  window_instance = createwindowex(ws_ex_staticedge,window_name,window_title,ws_overlappedwindow,cw_usedefault,cw_usedefault,window_width,window_height,null,null,main_instance,null); if(window_instance == null){     messagebox(0,"there error creating window.","critical error!",mb_iconstop | mb_ok);     return wbe_wincreation; }  created = wbtrue;  return wb_success; } 

the error get, it's error debugger: unhandled exception, says it's problem bad pointer @ .lpszmenuname, works in may examples, don't know why.

what's going on , how can fix it?
thanks

lpszclassname , lpwindowname defined lpcstr -- window_name , window_title have valid string values? defined?


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -