Answer Questions
AdnanAs Graphics Issue
Hey, For my final project for school, I decided to program the known game SOKOBAN in Visual C++. We didn't learn much about graphics but it's vital i'll use it. So, what I have so far is all the classes for the game ready, and their implemntation, reading a level from a .txt file and import it to a viewable level by printing bits of images into a whole level (the level printing is being done by the BitBlt function) My next thing to d ...Show All
Sino-Gary How can I receive VK_UP and VK_DOWN message from keyboard in a dialog window?
In a dialog application without any buttons,I only use the dialog to draw 3-D drawing of OpenGL,I can receive VK_ADD and VK_SUBSTRACT keyboard message,but I can not receive VK_UP and VK_DOWN message,please tell me why By the way in a CView application,I can receive both of the above keyboard message. My code is as follow: void CDialogGLDlg::OnKeyDown(UINT nChar, UINT nRepCnt, &nb ...Show All
chricosta beginner c++
dear all, i have questions why everytime i create a cpp files i must save into diff workspace.if not there will be an error mentioned " c:\age.cpp(23) : warning C4508: 'main' : function should return a value; 'void' return type assumed Linking... what is the use for workspace Thanks in advance. This is not related to whether you are using a workspace. Your warning level is set differently between the command-line invoc ...Show All
J.P. Picture editing.
I created a thread a little while ago asking for some good jpg tutorials. Rather than use jpgs, I decided to work with bitmaps -they're simpler, and as far as I can tell built into the API already. The problem that I am having is that when I try to use LoadImage, it returns a handle instead of the HBITMAP that I think I need in order to draw the image to a DC. Can I overcome this with a simple cast In addition, how would I save the pict ...Show All
eugene7_11 Importing enum under C++/CLI
I am trying my first attempts with C++/CLI but I have a minor problem. I am building a wrapper usable by all .NET languages which is importing unmanaged C/C++ code and is linking with a custom library file. I am creating a ref class as: public ref class CMyTest { public: int Init() { ...call old style function } } This function returns an integer. This integer is encoded as a old style typedef'd enum: typedef enum _errors { .. } Errors; I ...Show All
Tony Wu Problem with a program I am writing...
I am writing a simple program for a c++ course I am taking and can not seem to get my vector string to initialize correctly. Below is what my main looks like. void main(void) { double dblResult = 0; vector <string> strTestCase1; //****************************** //* TEST CASE ONE //****************************** strTestCase1 = {".....", ".....", "..B..", &nbs ...Show All
A Govind failed to start because the application configuration is incorrect
Hello! I am wondering if it is possible to configure visual studio 2005 to not require a bunch of external dll files to run the exe. Also is there any way to figure out exactly what the external files it needs are When i try to run an exe on a computer that does not have visual studio 2005 on it, i get the message: "failed to start because the application configuration is incorrect". I have succeded to solve this on some computers by putting a ...Show All
hirahih Random behavior of VS2005 RC1 compiler
We have an application is running fine in VS2003. This application is a mix of native code and CLR code. I recompiled everthing with VS2005. However, when I run it, it crash right away (event before my first line of code!). The exception is not very usefull: First-chance exception at 0x7c81eb33 (kernel32.dll) in EvSurface.exe: Microsoft C++ exception: EETypeLoadException at memory location 0x0012e68c.. First-chance exception at ...Show All
SmileyMicros Making an Enum a Public Assembly member
I have an assembly, Shared, that contains an enum named MyEnum. I want to be able to define this enum once in the Shared assembly and then use it in other assemblies by referencing the Shared assembly. Is this possible I thought enums where managed types but I used the following code with no luck because it said that "an assembly access specifier can only be applied to a managed type" so I have to remove the public keyword. namespace Shared { & ...Show All
Trojanfan20 ATL Server problems in VC8.0
Dear Sir! I am converting a few apps from VC6/VC7 to VC8.0. During this process I have discovered a problem with ATL Server based apps. The same problem can also be seen in the "SoapTransport" sample that comes with VS2005 MSDN. The sample is located on the VS2005 DVD at this location: \msdn\Samples\VC80Samples.zip\ATL Server\SoapTransport\SoapTransport.sln The problem is that every second call (during the same session) from ...Show All
yizhixiaozhu How can I get a notification about a "display turn off" event (WinXP)?
Hi, I would like to write a program that gets a notification for when the laptop display is turned off, either manually by the user or automatically by the system power management. Is this posible, and how Thanks, Osnat Thanks. You have both been helpful. Osnat Below URL might give you some idea http://msdn.microsoft.com/library/default.asp url=/library/en-us/power/base/about_power_management.asp ...Show All
perjorgen File I/O : Which one to use? CFile or fstream
Hi Jahfer! I need to write the following structure to a file in binary mode. struct EmployeeData { char strName[50]; UINT nAge; float fSalary; }; First you should be sure that the alignment is always the same! I would recomment: #pragma pack(push, 1) // your struct #pragma pack(pop) For that, which class that I will use CFile or fstream ...Show All
xu.richard Embedding an edit control into a tab control
I want to embed four different edit controls into four different tabs. How do I do that When you say "doubles your tabs" do you mean that it has two sets of the same tabs, i.e. tab1/tab2/tab3/tab1/tab2/tab3 or do you mean that you see two rows of tabs If the first, then it must mean that your code it getting called twice, put it in a place that only gets called once on initialization. ...Show All
Shabaneh How Design Line(or Function like Sin(x)) in Picture Box??
Hi! I don't Know that VC++ has a control for design line or... like VB please help me! I just can design line on DialogBox.I want design in Static variable (like PictureBox or StaticText). Alireza_Izadimehr wrote: Hi! I don't Know that VC++ has a control for design line or... like VB please help me! I just can design line on DialogBox.I want design in Static variable (like PictureBox or StaticText). ...Show All
Thundermaker dialogs
hello, i just started programming using this software and i was wondering if anyone could help me. given i have 2 dialogs. how do i add the 2nd dialog class as a variable to the first dialog class thanks! Like any variable. To create an int int x; To create an instance of a class called TheDialog: TheDialog dlg; vani, thanks for the reply. how do you create an instance ...Show All
