-
- custom dialog
by giuseppe500
- 7 Replies
- Last post
by giuseppe500
- hello. I would create a custom dialog in c++ 6.0 for localization. This dialog add extra method that get the caption for stringtable and a method that iterate the controls and get the control's caption's from the string table. is possible otherwise is possible create a custom control(an activex)and set in the .rc file the properties now i not be able to set any properties , even the caption disapp
-
- problems with directinput
by fighter92
- 6 Replies
- Last post
by fighter92
- Hi, I have a very weird problem with directinput. Here's the code: while(1) { ZeroMemory( &MState, sizeof(MState) ); hr = MouseDev->GetDeviceState( sizeof(DIMOUSESTATE2), &MState ); if( FAILED(hr) ) { // If input is lost then acquire and keep trying hr = MouseDev->Acquire(); while( hr == DIERR_INPUTLOST ) hr = MouseDev->Acquire(); } x=x+MState
-
- textBox - 2 questions
by Yosef Karasik
- 6 Replies
- Last post
by Yosef Karasik
- Hi all.
I have a textBox controler in my win app that i write in c++.
I insert data into the textBox in runtime.
2 Questions:
1) Is it possible to insert the data in LIFO
that means that if i insert line "bla bla bla" then new line and then "yada yada yada" it will appear as
yada yada yada
bla bla bla
Is it possible without clearing the box each tim
-
- Loading a combobox win32 vc++ 6.0
by adii28
- 2 Replies
- Last post
by adii28
- Hi, I am trying to create a combo box on a dialog using win32 api in vc++ 6.0. I added the combo box control using the dialog resource editor with type as Dropdown and owner draw set to 'No'. Then I add data to it programatically. I have the following classes [code]
class CmbBox: public SimpleControl { public: CmbBox (HWND hwndParent, int id, BOOL initialState=TRUE) : SimpleControl (hwndP
-
- Working with very large files
by Dman832
- 4 Replies
- Last post
by Simple Samples
- I am working in Visual Studio 2005 in C++ and I must deal with files in excess of 2^32 bytes. I am using an __int64 to store the length of the file, but, I am unable to give a 64 bit integer value to malloc, CFile::read or CFile::write. How am I supposed to work with files that are this big I was unsuccessful in finding an answer while searching through msdn help.
-
- Circle reference issue
by r&#228
- 8 Replies
- Last post
by n0n4m3
- Hi! As a complete newbie programmer, I've run into a, what I think is, a basic problem. I'm working on a small Windows Forms Application in VC++ Express. As you know, VC++ by default creates a class (initially called Form1) for the GUI. What I need is to use this type, Form1, as an argument in some of the methods in my own classes, which I define in a separate header. This is because I want to do
-
- LNK2019 Linker error
by VS228
- 8 Replies
- Last post
by einaros
- I have written a String class with String.h as the header and String.cpp as the implementation. I have a file called Main.cpp to exercise the string class. When I copy the contents of String.cpp into Main.cpp and exclude String.cpp from the project and build the project the project compiles fine. However, if the implementation is in String.cpp then for all the String member functions I get a LNK20
-
- Different beaviour in debug and release version
by Mephisto187
- 3 Replies
- Last post
by Mephisto187
- I have a float type parameter which is used for some continuous calculations. Because of the rounding errors it is not that useful to use float parameter for compare operations. To solve this problem I use to round the parameter each time before comparing it.
Here's the code I use for rounding:
float CRoundedFloat::Round(float fVal) { float fExp = (float)pow(10, m_iPrecision); float fRounded
-
- error C3861: 'ASSERT': identifier not found
by ru_um
- 2 Replies
- Last post
by Marius Bancila
- How can i slove this ...
my code is
#include <assert.h>
ASSERT( GetStatus() == valid );
ASSERT( time.GetStatus() == valid );
-
- 1>LINK : warning LNK4001: no object files specified; libraries used
by ubernoir
- 10 Replies
- Last post
by Simple Samples
- i'm new to c++ and i can build and run charles petzold's hello world message box in Microsoft visual c++ 6 but not 2005 i get this linker error 1>LINK : warning LNK4001: no object files specified; libraries used 1>LINK : error LNK2001: unresolved external symbol _mainCRTStartup
-
- Question about OVERLAPPED SOCKET's behavior
by remedios_
- 0 Replies
- Last post
by remedios_
- Hi, Are there any one who explains socket's behavior that while the overlapped socket is receiving data, if in another thread should send data in blocking socket mode.
For example,
SOCKET hSocket;
(thread 1) GetQueuedCompletionStatus(..) // receive data WSARecv(hSocket,...); // --> overlapped mode(non-blocking)
(thread 2) WSASend(hSocket...); // --> blocking mode
-
- Cpp Error code:error C2228 & warning code: C4244
by cnr5
- 6 Replies
- Last post
by MBroida
- Hi i was wandering if anyone can help me with this code as no matter what i do i can't get it to work.I have taken out part of the code as it isn't the cause of the problems. The code snippet is where the problem is and the errors/ warning are in red any help would be greatly appreciated.
Code Snippet
#include <c:\cpp\input.h> #include < time.h>
#define SIZE 20
str
-
- Securing .Net class library (dll)
by Charles Tam
- 1 Replies
- Last post
by Kenny Kerr
- Using C++/CLI, I've written a .Net class library outputted as a DLL file. It will be used by a C++/CLI app.
How do I secure the DLL from being reverse engineered Do I even have to secure it
-
- Decimal value of a char in Visual c++
by JGLP
- 8 Replies
- Last post
by Simple Samples
- Hi everybody I need to input a char and then return the decimal value of it. so i use this code: AllocConsole(); ConsoleKeyInfo cki; cki = Console::ReadKey(); //click 'a' for this example.the decimal value of 'a' is 97 String^ aux = cki.KeyChar.ToString(); //i need the aux to be 97, and not 'a' Using the debug step-by-step i see the variable cki {_keyChar = 97 'a' _key=A _mods=0} and the
-
- CHtmlView - how to get session
by m1n
- 1 Replies
- Last post
by Bite Qiu - MSFT
- Hi, How can I get CHtmlView session, i want to read and write session variables. Thanks.
-
- Resource Helper
by keitaro42
- 7 Replies
- Last post
by keitaro42
- I try to create a wizard that acts like MFC class wizard
And my template dialog resouce(MyWizard\Templates\1033\dialog.rc) looks like this:
DIALOGEX 0, 0, 257, 200 STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Dialog" FONT 8, "Tahoma", 0, 0, 0x0 BEGIN DEFPUSHBUTTON "OK",IDOK,92,181,50,14 PUSHBUTTON "Cancel",IDCAN
-
- Error Message when debugging in Visual C++ Express Edition
by Genocidal
- 4 Replies
- Last post
by reena vade
- I have Visual C++ Express Edition installed on my computer, as the title suggested. For quite a while now, actually.
Now whenever I try to debug a program (writing a Win32 Console Application), I get the following message:
---
Unable to start program 'c:\... \program.exe'.
Access is denied.
---
The function "start without debugging" is working just fine,
-
- atlhost.h and NO_STRICT gives C2440
by Blair Sutton
- 7 Replies
- Last post
by Simple Samples
- Hi all, I am trying to port some code from VS2003 to VS2005 but I am having some problems (to be clear: the code compiles without error on VS2003). I have narrowed the problem down to this simple test case: - cl -c -MD -DNO_STRICT test.cpp where test.cpp only contains: - #include <atlbase.h> #include <atlhost.h> When I compile this I receive the following error: - C:\Program File
-
- how to retrieve VC++ DLL source code for better understanding
by nu2vcpp
- 4 Replies
- Last post
by nu2vcpp
- I came to know that it is possible to retrive source code for dlls using some third party s/w. Is it safe and is there any reliable software for looking into a VC++ DLL.
-
- Linking error in Visual C++ 7.1
by Robertis Tongbram
- 6 Replies
- Last post
by Robertis Tongbram
- Hi all, I'm using Visual C++ 7.1 (the one that comes with Visual Studio . NET 2003). I get a linking error asking for msvcirt.lib ( msvcirtd.lib - during a debug build ) when I tried to build a project that was originally written in earlier versions of VC++ (6 or 5). When I looked at the lib folders I don't see these lib files and the corresponding msvcirt.dll. And I came across this link: http://
-
- Gdi plus Problem
by krishnasamy
- 6 Replies
- Last post
by krishnasamy
- Hi,
I have coding for the Wsq compression using Gdiplus(c++) concept. When I invoke the function from the java which returns "Access violation" errors has occur.
Here I given that code,
Gdiplus::Rect rect(0, 0, p_bitmap->GetWidth(), p_bitmap->GetHeight());//Problem Occur line
Gdiplus::BitmapData lockedBitmapData;
p_bitmap->LockBits( &rect, Gdiplus:
-
- VS C++ 2005 express code
by Tuk
- 6 Replies
- Last post
by einaros
- Hi, I have some questions regarding VS C++ 2005 IDE:
a)What is the difference between the compiler in the 'Express Edition' and the 'Full Version', as far as I can understand the only difference is that you cannot compile projects to create stand-alone applications(projects that will run without the IDE)
b)If a) is true.. is it possible to import an 'Express Project' into the 'Full Version I
-
- console app shuts when it executes
by MJB3K
- 4 Replies
- Last post
by Ghost (C/C++/VC++)
- Hi, when i run a simple console application that I have created, it opens like it should, but it shuts straight away. Why is this doing this
this is the code...
Code Snippet
#include <iostream>
using namespace std;
int main ()
{
// declaring variables:
int a, b;
int result;
// process:
a = 5;
b = 2;
a = a + 1;
result =
-
- SetTimer problem for TCP/IP packet sending
by _Chrissy_
- 5 Replies
- Last post
by _Chrissy_
- Hi all, I am working on a network trafic generator and for a certain type of flow there is a certaine amount of time between each packet, the Inter Packet Gap.
Code Snippet
void send_time (int tpflow, int fid, long plength) { /* calls a random sending time and sets a timer to count down that value, when it is done, it sends the packet */ MSG msg; SetTimer (hwnd,
-
- More than 30 threads in an ATL application
by Darren Morby
- 9 Replies
- Last post
by Simple Samples
- Hi. We have a DCOM data service that is implemented in ATL. The problem is that we cannot create more than 30 objects on this data service; if we call CreateObject more than 30 times, it returns E_OUTOFMEMORY, even though the service is not using up all the memory.
I had heard that each object gets its own thread in the service, so I would have thought that we were limited to the total numb