Please shed some light on the procedure one must take to pull values (i.e. from database or variables with default values to a dialog. I am trying to pull values to a dialog using "strcopy(tempvariable, "Value");" but it is not working.

Please help me.
Nis

Recommended Answers

All 2 Replies

#include <iostream>
#include <windows.h>
using namespace std;
int MsgBox(struct HWND__* hwnd,char* title,unsigned int type,char* str,...);
int MsgBox(struct HWND__* hwnd,char* title,unsigned int type,char* str,...)


    {
    	char* string = new char [ strlen(str) + 5000 ];
    	va_list list;
    	va_start(list, str); 
    	vsprintf((char*)string,str,list);
    	va_end(list);
    	MessageBox(hwnd,string,title,type);
    	delete [] string;
    	string = 0;
    	return (0);
}

int main()


    {
    	MsgBox(NULL,"The Title",MB_OK | MB_ICONINFORMATION ," the string \n the number (%i) \n %s",1,"hehe");
    	return (0);
    	
}

I forgot to mention that I declared it in the member variables class wizard as CComboBox. This declaration is the cause of the assertion problem. Can you advise me please? Should this class cause an error? Please explain.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.