Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
L

LukeV

@LukeV
About
Posts
439
Topics
165
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Array of custom classes problem [modified]
    L LukeV

    No, the problem is that I can't retreive the object from the array. The returned object is always null. So I don't know if I'm storing the objects correctly in the array or if I retreive the object correctly... Thanks! :)

    ASP.NET help mysql data-structures

  • Array of custom classes problem [modified]
    L LukeV

    ??? :confused:

    ASP.NET help mysql data-structures

  • Array of custom classes problem [modified]
    L LukeV

    Hi! I have an array of custom classes. When I try to set a variable with one of the array item, I get this error: Microsoft VBScript runtime error '800a01a8' Object required: '[undefined]' I guess I'm not far off but I must be missing something. Here's my code ( Important lines are in bold ):

    class CReviews
     private m_IDProd
     private m_aReviews
    	
     public sub GetReviews(IDProd)
      i = 1
      m_IDProd = IDProd
      mySQL = "SELECT * FROM ProductReviews WHERE IDProd = " & IDProd & ";"
      set rs = conn.execute(mySQL)
    		
      if not rs.eof then
       m_aReviews = Array( i )
       rs.movefirst
    		
       do while not rs.eof
        ReDim m_aReviews( i )
    				
        Set review = New CReview
        review.GetReview( rs("ID") )
        Set m_aReviews( i ) = review
    				
        i = i + 1
        rs.movenext
       loop
      end if
     end sub
    	
     public function GetReviewCount()
      GetReviewCount = UBound( m_aReviews )
     end function
    	
     public function GetReview(nIndex)
      if nIndex > 0 AND nIndex <= GetReviewCount() then
       GetReview = m_aReviews( nIndex )
      else
       GetReview = nothing
      end if
     end function
    end class
    
    
    class CReview
     private m_ID
     private m_ReviewEn
    	
     public sub GetReview(ID)
      'do stuff
     end sub
    	
     public property Get ReviewEn()
      ReviewEn = m_ReviewEn
     end property
    end class
    
    
    sub GetReview(IDProd)
     Set reviews = New CReviews
     reviews.GetReviews( IDProd )
     response.Write( reviews.GetReviewCount() )
    	
     'This line generates the error
     Set review = reviews.GetReview( 1 )
     if review <> nothing then
      response.Write( review.ReviewEn() )
     end if
    end sub
    

    Thanks! Luc -- modified at 13:21 Saturday 29th July, 2006

    ASP.NET help mysql data-structures

  • FillRect with CBrush question
    L LukeV

    BitBlt did the trick... thanks! :)

    C / C++ / MFC question com graphics

  • FillRect with CBrush question
    L LukeV

    Hi! When I call FillRect with a brush created from a bitmap, the rect will get filled but the bitmap is tiled, even though the rect and bitmap size are the same (20 X 20). Is there a reason for that? I thought the bitmap would get displayed correctly! Screenshot at www.edovia.com/pictures/FillRect.png[^] //Draw thumb RECT rectThumb; hBitmap = (HBITMAP)LoadImage(NULL, m_szThumb, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE | LR_CREATEDIBSECTION | LR_DEFAULTSIZE | LR_LOADTRANSPARENT); bitmapThumb.Detach(); bitmapThumb.Attach( hBitmap ); bitmapThumb.GetBitmap( &bmp ); rectThumb.top = rectFill.bottom; rectThumb.bottom = rectThumb.top + bmp.bmHeight; rectThumb.left = roundf( ( rectClient.Width() - bmp.bmWidth ) / 2 ); rectThumb.right = rectThumb.left + bmp.bmWidth; brush.CreatePatternBrush( &bitmapThumb ); memDC.FillRect( &rectThumb, &brush ); brush.DeleteObject();

    C / C++ / MFC question com graphics

  • CTreeCtrl and WM_LBUTTONUP
    L LukeV

    Hi, for some reason I never receive the WM_LBUTTONUP message. I do receive the WM_LBUTTONDOWN message. Is this normal or I'm doing something wrong??? afx_msg void OnLButtonUp(UINT nFlags, CPoint point); void CVRGlobalView::OnLButtonUp(UINT nFlags, CPoint point) { CTreeView::OnLButtonUp(nFlags, point); } Thanks! :) -- modified at 9:30 Thursday 11th May, 2006

    C / C++ / MFC question

  • Side-by-Side configuration problems
    L LukeV

    Hi! My app used to work fine on another computer when I was using VS2k3 but since I've been using VS2k5-MFC8 my app just won't start! I used Dependency Walker to see what was going on and I got this error: Error: The Side-by-Side configuration information in "c:\myapp.EXE" I did put all the required files in the folder: mfc80.dll mfc80u.dll mfcm80.dll mfcm80u.dll msvcr80.dll I think this is related to the new manifest file used by Windows to know which dll version your app is using but right now I'm really stuck. I also tried to statically link to MFC with no luck. Anyone can help me? Luc

    C / C++ / MFC help c++ question announcement workspace

  • VStudio 2005 - Manifest file not working anymore?
    L LukeV

    Hi! I've migrated a project from VS2003 to VS2005 and since then the application doesn't have XP themes anymore. What do I need to do to fix this? Thanks! Luc

    C / C++ / MFC help question

  • Dependencies + VS .Net 2003
    L LukeV

    Hi! I'm trying to install my app on a computer where VS is not installed. For some reason it does not work. I tried to use depends.exe to find out where the problem is but I don't really know what to do with the results: GetProcAddress(0x77BA0000 [MIDIMAP.DLL], "midMessage") called from "WINMM.DLL" at address 0x76AE3AFE and returned NULL. Error: Procedure cannot be found (127). Second chance exception 0xE06D7363 (Microsoft C++ Exception) occurred in "KERNEL32.DLL" at address 0x7C81EB33. Exited "VRSOFT20.EXE" (process 0x584) with code -529697949 (0xE06D7363). Entrypoint reached. All implicit modules have been loaded. The dll have the same version on both computers. What's wrong??? Luc :)

    C / C++ / MFC help csharp c++ visual-studio question

  • weird registration problem
    L LukeV

    Hi! I've recently changed my computer and my project has some problem registering one of it's component ever since. I'm pretty sure the path is fine (used to be on h:, now on f:). All other components register fine. I get that error: error PRJ0019: A tool returned an error code: "Performing registration" If I try to do a regsvr32 mydll.dll in the Debug or Release folder, I get this error: LoadLibrary("mydll.dll") - The specified module could not be found. Now, if I try to debug that component by adding regsvr32 to the command line and $(TargetPath) for the parameters, I get a a different error: LoadLibrary("f:\some old path that I don't use for months") - The specified module could not be found. Finally, if I move mydll.dll to another folder (outside the project tree), it will register just fine! I suspect that $(TargetPath) is the culprit, but I don't know where to look for that value. Thanks!

    C / C++ / MFC help data-structures debugging announcement

  • Shell_NotifyIcon sometimes fails at startup
    L LukeV

    Hi! My application is automatically started when Windows is lauching. Sometimes Shell_NotifyIcon will fail. I do not have an error code since I haven't been to reproduce that bug very often. My guess is that the desktop is not ready or something. Do you think that it would be safe to do something like: BOOL bRes; do { bRes = Shell_NotifyIcon(...); }while(bRes = FALSE); Thanks!

    C / C++ / MFC help linux

  • Do you still develop apps for &lt; Win 2K?
    L LukeV

    Hey guys! do you still bother making your apps compatible with Win95/98/ME? If so, why? Are there still that many people still using those versions? I can't seem to find any good stats on Win95/98/ME usage. Thanks!

    The Lounge question

  • String problem in HKLM\MS\Windows\CurrentVersion\Run
    L LukeV

    No it's not using UNICODE. It's in bytes, not characters, but I think I found the solution by replacing sizeof() with _tcslen(). Is this safe?

    C / C++ / MFC question help

  • String problem in HKLM\MS\Windows\CurrentVersion\Run
    L LukeV

    I think I found the solution:

    lRes = RegSetValueEx( hKey, NTS_REG_STARTUP_NAME, 0, REG_SZ, 
    		(LPBYTE)szFullPath, /*sizeof( szFullPath )*/_tcslen( szFullPath ) );
    

    Replaced sizeof() with _tcslen()...

    C / C++ / MFC question help

  • String problem in HKLM\MS\Windows\CurrentVersion\Run
    L LukeV

    One thing I did notice is that when I set the key through the code, there's '...' at the end of the string! If I set the value manually, the '...' disapears!

    C / C++ / MFC question help

  • String problem in HKLM\MS\Windows\CurrentVersion\Run
    L LukeV

    I know! ;) This is how I've tested: I use InnoSetup for my app and it creates the MyApp key when installing my app. I reboot, everything is fine, app is launched at startup. Then, I let my code handle the key. First, it deletes the key with RegDeleteValue and then creates (or should I say sets it) it with RegSetValueEx (as shown above). I then restart Windows and although the key is there (and apparently with the same value), the app won't be launched! I thought the problem was that I didn't add a null character at the end of the string but it still doesn't work!

    C / C++ / MFC question help

  • String problem in HKLM\MS\Windows\CurrentVersion\Run
    L LukeV

    Hi, I have a weird problem where if I set a value in HKLM\MS\Windows\CurrentVersion\Run in my code, my app won't be launched. But if I double click on MyApp key, select the value, do a cut-paste of the same string, reboot the computer then it will work! HKLM\MS\Windows\CurrentVersion\Run Key: MyApp, Type: String, Value: "C:\Program Files\MyApp\MyApp.exe" (quotes are included in the string since there's a space in there). Here's my code:

    TCHAR szPath[MAX_PATH+1];
    TCHAR szFullPath[MAX_PATH+1];
    
    UTLGetAppPath( szPath, sizeof( szPath ) ); //returns the path
    _tcscat( szPath, NTS_ISMGR_EXE ); //adds the executable
    
    memset( szFullPath, 0, sizeof( szFullPath ) );
    
    _tcscpy( szFullPath, "\"" );
    _tcscat( szFullPath, szPath );
    _tcscat( szFullPath, "\"\0" );
    
    //Add to run
    lRes = RegSetValueEx( hKey, NTS_REG_STARTUP_NAME, 0, REG_SZ, 
    			(BYTE*)szFullPath, sizeof( szFullPath ) );
    

    What is wrong??? Thanks! :)

    C / C++ / MFC question help

  • Running processes events?
    L LukeV

    Hi! is there some kind of events we can use to know when a new process is running? thanks! :)

    C / C++ / MFC question

  • remove installed programs programmatically?
    L LukeV

    Is this possible? If so how?:confused:

    C / C++ / MFC question

  • Microsoft AntiSpyware Beta
    L LukeV

    You have good points. Although I have nothing against Microsoft directly and I would hold the same attitude towards any company that acts the same as them. I'm not complaining about Linux or Apple because I don't use them very much and don't know their attitude as far as unfair competiting goes. I guess I'm mad because I do work in the same area as GIANT was and that there's no way to compete against Microsoft since we don't have their financial resources.

    The Lounge csharp php html database visual-studio
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups