|
I have a little problem with WinForms.
I've created a Managed C++ app. Then I wanted to add a WinForm but I couldn't find the appropriate function. So I decided to see the samples.
I find the solution but I still cannot use the designer as in C# or VB.Net.
Does anybody know how to add a WinForm to VC++.Net which can be modified in the designer.
Thanks in advance
|
|
|
|
|
Nish has some article about it.
http://codeproject.com/useritems/mcppwinforms01.asp
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
|
|
|
|
|
When calling GetOpenFileName w/ multi-select enabled, is there a way to determine the buffer space required by the lpstrFile pointer ?
|
|
|
|
|
I don't think so.
GetOpenFileName() returns FALSE if you specify a buffer that's too small. I ran into this annoying problem some time ago, and now always allocate a generous (64K) buffer when I call the multiselect version of GetOpenFileName() .
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
<click> This link is solution that works for win 98. I am trying to figure out how to do this with W2K without much luck so far.
---
CPUA 0x5041
Sonork 100.11743 Chicken Little
It may be that your sole purpose in life is simply to serve as a warning to others.
|
|
|
|
|
Hey guys
I have a list view control in report mode for a project im doing i want to be able to edit the text on sub items ie ones in not teh main column. I doesn't allow this is tehre away to enable this or am i gonna have to write a custom control.
Peter
|
|
|
|
|
See this article.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
The code below generated some errors in linking:
#include "dao.h"
void main()
{
try
{
static CDaoDatabase *base = new CDaoDatabase;
base->Open("c:\\biblio.mdb");
CDaoRecordset *rst = new CDaoRecordset(base);
rst->Open(1, "select * from authors");
for(int i=0; i<5; i++)
{
printf("%d, %s\n", i+1, rst->GetFieldValue(1));
rst->MoveNext();
}
}
catch(CDaoException e)
{
}
}
--------------------Configuration: dao - Win32 Debug--------------------
Compiling...
dao.cpp
Linking...
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex
Debug/dao.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.
dao.exe - 3 error(s), 0 warning(s)
And the header file contains:
#include <stdio.h>
#include <afxdao.h>
Although I checked Microsoft Knowledge Base for Q126646, the problem hadn't been solved. Can somebody offer more suggections?
|
|
|
|
|
Are you linking with one of the multi-threaded CRT libraries?
LIBCMT.LIB or MSVCRT.LIB
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!
|
|
|
|
|
I'm not sure at all, but I would have checked the Project Settings. Project menu -> Settings... -> C/C++ tab -> Category: 'Code Generation' -> Use run-time library: 'Multithreaded' (or 'Debug multithreaded' for debug mode)
Sprudling
|
|
|
|
|
Does anybody know how to give a service parameters at startup???
|
|
|
|
|
When you popup the property page for a given service, there is an edit box at the bottom that allows you to specify start parameters. This can only be done if the service is stopped.
Michel
It is a lovely language, but it takes a very long time to say anything in it, because we do not say anything in it, unless it is worth taking a very long time to say, and to listen to.
- TreeBeard
|
|
|
|
|
True, but this is pretty unusual way to handle service parameters. Usually, the parameters are placed in the registry, and services read them from there.
I vote pro drink
|
|
|
|
|
Using VC++, How to i write the output of a pipe to a text file?
Thanks
|
|
|
|
|
I could not find any thing specific to let you write the output directly from the pipe to a file, but since the Read and Write functions are the same for both apipe and a file in Win32, it should be fairly simple for you to read from a pipe, and turn right around and write the same data to a file.
If you wanted to reduce this to one step you memory map you file, and you will then recieve a pointer that you can pass into the pipe function. When you read the data from the pipe, you can access it from your mapped memory pointer, and when you are done, the data will already be written in your file.
Good Luck
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!
|
|
|
|
|
For reasons which are too complex to talk about here , I want to develop and compile a static library with VC++ .net and then link it into a VC++ V6 app . I get lots of link errors. Anyone know if it is possible to do what I want ? I am kind of hopeing there is a compiler switch for the library. Also I make the library now with VC++ 6 and its 1.5 MB , recompile under VC++ .net and it goes up to 5.5MB , any ideas why ?
|
|
|
|
|
I've asked a question just like it.A russian shouted a lot of russian which i don't understand at me.I think there should be someone else knows about how to do it here.
modified 1-May-21 21:01pm.
|
|
|
|
|
What do you mean by stealth?
Do you mean it will not show up on the taskbar? If so simply remove the WS_EX_APPWINDOW style from your window. Coincidentally, if you want more than one window of your application to show up in the taskbar, just add this style to the window. This is how Microsofts Multi-threaded SDI applications work (The new document-centric model they use in their office products).
Good Luck
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!
|
|
|
|
|
Question about software signing (for internet download):
What´s the difference of signing a .cab file with or without the timestamp (-t option) ? Will the users download the cab and compoenents even if the cab is not timestamped ?
Mauricio Ritter - Brazil
Sonorking now: 100.13560 Trank
I´ll take your brain to another dimension, I´ll take your brain to another dimension, I´ll take your brain to another dimension... Pay close attention...
|
|
|
|
|
In my project,When I execute debug program,the result is which I just want.But if execute release prgram,to my surprise,the result is what I can't image.
What I mean is that the debug program get the result which I expect,but the release program seems somewhere have errors(but I can't find it).In the debug mode all the parameter is right(I use CDWordArray for the parameter).
I want to know how to find the error.
Thank you for help!
Don't look at me in that way!
|
|
|
|
|
Take a look at your variable initialisation. In debug mode they get set to 0 by default, in relase, they are random. Sounds like you are relying on a value being set to 0 somewhere.
Also, of that doesn't work, try turing all optimizations of in the release build.
Joseph Newcomer has written an artical on this. I dont have the URl handy, but its on this site somewhere
Roger Allen
Sonork 100.10016
yet to be identified being from the planet Paltinmoriumbanfrettybooter
|
|
|
|
|
|
i want to know that is there any utility that converts the C code to C++ code , not whole programs or projects, but atleast the minimal language constructs.
if anybody know abt that do tell me abt that and feel free to contact me at
m_khawar@yahoo.com
Thanking In Advance.
RANA KHAWAR
|
|
|
|
|
What kind of conversion are you asking about, mallocs into new's, C style casting into C++ casting?
I very much doubt it exists except for converting the simplest of code.
Michael
|
|
|
|
|
I don't know of any utilities, but you can start by renaming your ".c" files to ".cpp". The rest will be up to you. C++ is such a flexible language that it's almost impossible to write a utility that can, for example, group a bunch of your global functions into one class. Still, it shouldn't be difficult for you to do and it's actually a highly useful exercise, IMHO.
Regards,
Alvaro
Kinda hard to sign my name without anything to write with. Anyone got a pen?
|
|
|
|