|
I need to do some owner draw/ custom controls, and i dont have a clue
|
|
|
|
|
What king of control do you want? There are lots of sample in codeproject.
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
You may have a look at Chris' Creating Custom Controls or Create your own controls - the art of subclassing.
Regards
Thomas
Finally with Sonork id: 100.10453 Thömmi
Disclaimer: Because of heavy processing requirements, we are currently using some of your unused brain capacity for backup processing. Please ignore any hallucinations, voices or unusual dreams you may experience. Please avoid concentration-intensive tasks until further notice. Thank you.
|
|
|
|
|
Newbie Question!
I need the integer value in a 'command line char array' to increment with the for loop.
eg
On the first loop the cmdline[]="C:\\myexecutable --getmemory SM 1";
On the second loop the cmdline[]="C:\\myexecutable --getmemory SM 2";
On the third loop the cmdline[]="C:\\myexecutable --getmemory SM 3";
etc, for 10 loops.
I have tried the following
for(int i =1; i<=10; i++)
{
char strInitial[] = "C:\\myexecutable --getmemory SM ";
char cmdline[]=("%s [i]", strInitial);
...//snip
}
But I get the following error:
error C2440: 'initializing' : cannot convert from 'char *' to 'char []'
Or if I remove the ()'s
for(int i =1; i<=10; i++)
{
char strInitial[] = "C:\\myexecutable --getmemory SM ";
char cmdline[]="%s [i]", strInitial;
...//snip
}
Then I get the following error:
error C2040: 'strInitial' : 'char' differs in levels of indirection from 'char [49]'
Please help!
Thanks.
|
|
|
|
|
Try this
char szBuffer [256];
sprintf (szBuffer, "C:\\myexecutable --getmemory SM %i", i);
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
Works great, Thanks a million!
|
|
|
|
|
hi ,
My application's architecture is as follows :
CMainFrm-->CMDIChildFrame-->CDialog
The MainFrame has instances of the MDIChildFrame . The child Frames display a Dialog . I need to pass a message from the Dialog to the MainFrame. What is the exact way to send a notification from the Dialog and write ,register a handler in my mainframe .
Please help
|
|
|
|
|
how could i make a window transparent for win32 not MFC
ta, any help will be greatful.
|
|
|
|
|
You can set the WS_EX_TRANSPARENT ex_style, but this will only work for Windows2000 and above. You can also use SetWindowRgn to make your window appear that it has holes in it.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
any better ways to make the whole window 50% transparent
|
|
|
|
|
You may find a wonderful article from MAK Jeelani about transparent windows at:
http://www.codeproject.com/csharp/transparentwindowsincsharp.asp
It's in C# but if you writing MC++ is easy to follow!
Otherwise try this article from Franz Brunner:
http://www.codeproject.com/useritems/pellucid.asp
Hope this helps
Al
|
|
|
|
|
Hi,
What means this :
Optional feature not implemented
State:S1C00,Native ,Origin:[Microsoft][ODBC SQL Server Driver]
???? Is this any error ??
....
m_rec->Open(AFX_DB_USE_DEFAULT_TYPE,Sql.GetBuffer(0));
....
For connection to SQL server Iam using CDatabase+CRecordset
Thanks.
Wiizi
|
|
|
|
|
For the Successfull conection with the ODBC
You must
1)Create a CDatabase object
2)Connect the database with the ConnectionString inm the Format DSN;Username;password
3)Create a Recordset object
4)set the m_pDatabase member to the address of the database object
5)Open the Recordset with the Query
Follow the Steps ..
Good Luck..
try it now..
any doubts..??
Hai Friends me from Pandalam..and i think there is a sofware behind everything...
so enjoy with the codes...
|
|
|
|
|
Yes, I do it as you write ... Member function CRecordset::Open retured true -> but in debug window is :
Optional feature not implemented
State:S1C00,Native ,Origin:[Microsoft][ODBC SQL Server Driver]. I dont know if is any error in code or error in SQL server, SQL Server driver ??
Wiizi
|
|
|
|
|
please send the code ....
There is a Software Behind Everything
Renjith PDLM
|
|
|
|
|
See here
Best Regards
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
Thanks. Support the class transaction ?
Wiizi
|
|
|
|
|
What do you call Transaction, Stored Procedures?...;)
Regards
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
Update datas in database on server
Wiizi
|
|
|
|
|
Yes, you can do that...
Best Regards
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
we have been interrupted by the class private/public/protected static variables not getting initialized before control reaches main, when those variables initialization has been placed in the other dependent libraries instead of the current project.
It seem to us that, placing all the initialization statements in some header file say 'myheader.h' and adding this header to the main project, is better solution at the moment.
But, this activity is consuming large amount of time.
Can anyone inform us if we can initialize the class static variables in the other dependent libraries using other better way?
We know the following.
1) All global data including global static variables must be initialized before control reaches main function.
2) All local static variables will be initialized when the control calls the respective function for the first time.
What about class static variable? They have class scope. But they have program life time. Therefore, we guess our program is not proceeding further just because the class static variables in other dependent libraries are not getting initialized?
Is our assuption correct?
Any help in this regard would be highly appreciated.
Thanks in advance,
-Sarma
|
|
|
|
|
Static class data behave as global data in this respect. So, when the control hits main , these data must have been initialized. Possible reasons for the observed fiasco:- These static data are placed in a static library but the corresponding compilation unit is stripped out by the linker (because no symbol from that unit is explicitly linked from the program.)
- The data depends on initialization on other static data in a different
.cpp . As C++ does not guarantee any special order in the initialization of static data in each compilation unit, it could be that the dependent static data get initialized before the depended on data, thus resulting in strange results.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hello Friend,
In our case we have several static libs which are dependent on .exe. while running the .exe we want all the class static variables in the static libraries initialized before control reaches main. In Linux C++ compiler it is properly happening? How to make it happen in windows2000.
Any reply would be grateful.
Thanks,
-Sarma
|
|
|
|
|
Well, I'm afraid little more can be said with that information alone. As I said before, first you'd have to determine the cause of the problem (lib stripped out, interdependcy among static data initialization across several .cpp s, other.) If you could tell us something about the structure of your project or post some of the code of the offending library, that'd help a lot.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Link your program with a map file option. Then search to see if the .CPP file that contains the initialial values is included in the image.
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|