- Strength to Increase Rep
- +7
- Strength to Decrease Rep
- -1
- Upvotes Received
- 39
- Posts with Upvotes
- 38
- Upvoting Members
- 19
- Downvotes Received
- 3
- Posts with Downvotes
- 3
- Downvoting Members
- 3
these is the VB6 function for RayCasting: Private Sub DrawRays() Dim StepX As Double Dim StepY As Double Dim VertX As Double Dim VertY As Double Dim HorizX As Double Dim HorizY As Double Dim MapX As Long Dim MapY As Long Dim HorizDist As Double Dim VertDist As Double … |
|
How use and declare CopyMemory() API function VB2010? |
|
how can i convert cursor files to image? i need see the cur\ani on picturebox?(just for learning) Private Sub btnChooseImage_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnChooseImage.Click If (ofdChooseFile.ShowDialog = Windows.Forms.DialogResult.OK) Then If (ofdChooseFile.FilterIndex = 6) Then Dim cur As New Cursor(ofdChooseFile.FileName) PicShowImage.Image = cur 'error yes Else … |
|
how can i convert these C line: (py>>6)<<6) to VB6? |
|
heres my RayCasting function: Private Sub DrawRays2() Dim AY As Double Dim AX As Double Dim StepX As Double Dim StepY As Double Dim VertX As Double Dim VertY As Double Dim HorizX As Double Dim HorizY As Double Dim MapX As Long Dim MapY As Long Dim HorizDist As … |
|
i'm using CreateDIBSection(): Public Function NewImage(ByVal ImageWidth As Long, ByVal ImageHeight As Long, Optional color As ColorConstants = vbBlack) As Long If (Width > 0 Or Height > 0 Or hBitmap > 0 Or PointerPixelData > 0) Then DeleteImage Width = ImageWidth Height = ImageHeight 'Criar HDC MemoryHDC = CreateCompatibleDC(0) … |
|
how send parameters on CreateThread()? on a class: Option Explicit Private Declare Function CreateThread Lib "kernel32" (lpThreadAttributes As Any, ByVal dwStackSize As Long, ByVal lpStartAddress As Long, lpParameter As Any, ByVal dwCreationFlags As Long, lpThreadID As Long) As Long Private Declare Function TerminateThread Lib "kernel32" (ByVal hThread As Long, ByVal … |
|
i have tried several ways, but i always get an overflow error :( how can i combine the ARGB color elements? Public Function ARGB(ByVal alpha As Byte, ByVal red As Byte, ByVal green As Byte, ByVal blue As Byte) As Long Dim color As Variant color = CDec(alpha) * 256 … |
|
see these 'for' loop: Public Function SetTransparentColor(color As Long) Dim X As Integer Dim Y As Integer Dim c As Long Dim h As Long Dim w As Long Dim temp As BGRAQUAD ' substitua BGRColor pelo tipo de dado correto usado em bDibBGRA h = Height - 1 w … |
|
using the Circle method and knowing the start angle(playerangle-30) and end angle (playerangle+30), in degrees, how can i draw the arc? |
|
heres a sample of using pointers on VB6: Option Explicit Private Const BI_RGB = 0 Private Const CBM_INIT = &H4 Private Const DIB_RGB_COLORS = 0 Private Const USE_BITMAP_ALPHA = &H1000000 Private Type BITMAPINFOHEADER biSize As Long biWidth As Long biHeight As Long biPlanes As Integer biBitCount As Integer biCompression As … |
|
i build a class for create a static control(label). and i't cool. but why the SetTextColor() and SetBkColor() are ignored? case WM_PAINT: { PAINTSTRUCT ps; HDC hdc = BeginPaint(inst->hwnd, &ps); // TODO: Add any drawing code here... SetBkColor(hdc, RGB(0,255,0)); SetBkMode(hdc,TRANSPARENT); SetWindowText(inst->hwnd,"hello"); EndPaint(inst->hwnd, &ps); } the inst is the class(label) pointer … |
|
Re:
I'm 11 years old and I'm absouloutly LOVE programming. I'm learning C++, but I heard that C++ is used for creating games. Where can I learn game development online for free. |
|
i have code for write on console and change the text color and backcolor and clear screen(and much more) inside of a nice class console. these function change the text color and back color: void SetColorAndBackground(int ForgC, int BackC=0) { SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), ForgC|(BackC<<4) ); } but is there any way for … |
|
without use DirectX, how can i get rendering\graphics speed? i created an Image class that uses DIB's... but something seems wrong for i draw in a pixel way.. too slow, maybe because i'm trying getting the line, 3D, points. maybe someone can give me more info: Friend Sub DrawImageRectanglePoints(DestinationHDC As … |
|
i have 1 function that give me an array of a line points... on these array, how can i get the array size without using the UBound() and LBound()? |
|
if i have X,Y(10,20) and the speed is 2, will be: X = X + 2 Y = Y + 2 ? same goes for Z or it depends on direction?(Y or X rotation) |
|
i'm learning Math for 3D... for now i can draw a plane and convert 3D to 2D(the screen is 2D): Private Function ConvertPositon3DTo2D(Position As Position3D, World3DSize As Size3D) As POINTAPI Dim ConvertedPosition As POINTAPI Dim PosZZDepth As Long PosZZDepth = Position.Z + World3DSize.Distance If (PosZZDepth = 0) Then PosZZDepth = … |
|
why, on windows 10, some touchpad drivers(even updated by windows) don't activate the vertical\horizontal scrool move.... i have them activated, but don't work.... when i use the finger, instead scrool, the move moves.. yes i have seen the scrool area. how can i fix the problem? |
|
how can i print 3 values(without knowing their string\number size) in same column using cout? i'm using these code: cout <<"\n" << "show tokens\n"; for(unsigned int i=0;i<Tokens.size(); i++) { cout << "Token: " << Tokens[i].Token <<right<<setw(20-Tokens[i].Token.size())<< "Type: " << Tokens[i].Type <<setw(40) << fixed << "Position Line: " << i<<"\n"; } … |
|
i'm creating a program using Code Blocks with GNU\GCC compiler. i'm using Windows 10 with Windows Defender. my program create a txt files(instead a text files, we can speak binary files too), but the Windows Defender can delete the file(and i have sure), for avoid these problem i must disable … |
|
Re:
Hi, I'm learning C and I was trying to print this program using if-else statement: void main() { char* opinions; printf("What do you think of me?"); scanf("%s",&opinions); if (opinions="Ugly") { printf("Huh, I'm way more beautiful than your heart"); } else if (opinions="Blacksheep") { printf("Sometimes Blacksheeps end up shining the most!"); … |
|
Re:
Recently I realized that I not receive any email notification from DaniWeb. When I check on the User Settings, I saw this alert message > We have been having problems emailing you. Has your email address changed? Please update your email address to begin receiving email from us again. After … |
|
the question seems simple, but isn't. think that i have the functions list and it's parameters and the variables on vectors(inclued it's types.. it's a structure). now see these string(yes i have the words\operators count): function1 ( function2 ( ) , function3 ( parameter1 ) , parameter3 ) the count, … |
|
i create the read(...) function for read to variables. but i need too the read()(without arguments) for press enter before continue\exit. void read() { //wait if the enter key is pressed: cin.ignore(); cin.get(); } template<typename first_t, typename... rest_t> void read(first_t &first, rest_t... rest) { std::cin >> first; read(rest...); //function is … |
|
i'm trying using the GNU compiler with command lines( using the ShellExecuteEx()). when i do: string FileName1="C:\\Program Files\\mingw-w64\\x86_64-7.2.0-win32-seh-rt_v5-rev1\\mingw64\\bin\\x86_64-w64-mingw32-g++.exe"; run(FileName1,"-c \"C:\\Users\\Cambalinho\\Documents\\CB\\testfolder\\bin\\Debug\\test2.cpp\""); the object file is created. these line creates the exe: run(FileName1,"-o C:\\Users\\Cambalinho\\Documents\\CB\\testfolder\\bin\\Debug\\test2.exe C:\\Users\\Cambalinho\\Documents\\CB\\testfolder\\bin\\Debug\\test2.o"); (tested) but the exe have some dependencies... so seen the Code Blocks: x86_64-w64-mingw32-g++.exe -Wall -g -std=c++14 -c … |
|
i'm using Windows 7. the battery icon is showed on toolbar. when i move the mouse the percent is showed, but no the time remain... why? |
|
heres my actual code for find\search a folder: string FindDirectory(std::string FindDirectoryName[2], std::string StartDirectory="C:") { WIN32_FIND_DATA file={0}; string str=StartDirectory+ "\\*"; HANDLE search_handle = FindFirstFile(str.c_str(), &file); static bool blnFindDirectoryName=false; static string strFolderName =""; //testing if the folder is valid: if (search_handle != INVALID_HANDLE_VALUE) { do { //if the folder was founded, then … |
|
how avoid memory leaks? from here: http://www.winprog.org/tutorial/bitmaps.html i learned: GetDC() - ReleaseDC() BeginPaint() - EndPaint() CreateCompatibleDC() - DeleteDC() i must get the old selected object. select it when isn't needed and then delete it. so seen these constructor and desctructor: image(const int width, const int height) { if (isimgused==true) delete … |
|
i have these GNU macro: #if defined __GNUC__ #define EVENT [[gnu::weak]] #elif defined __clang__ #define EVENT [[llvm::weak]] #endif #define IS_EVENT_DEFINED(sym) (static_cast<bool>(sym)) these macro works fine. and help me test if the function(even with a prototype) was defined. my problem is can i convert [[gnu::weak]] to Visual Studio code(for be compatible)? … |